how to use emc2 linked with external software

More
27 Nov 2009 16:59 #1213 by gouxosor
Hello,

I am building a small cnc 3 axis, with a hobbycnc card that I control with EMC2.
My main goal is to make an animated film. I put my digital camera on this machine.
I have written a small program in C + +, using the gphoto2 and ffmpeg library.
This program allows me to take a photo, bring it into the computer and then writing it to the end of a video file.
Now I'd like to move my camera a few steps, take a picture, put it to the video file , move a few steps, take a picture automatically....

My question:

Is it possible to write (in the gcode) a statement that would launch an external application.
Or is it possible to send an external instruction to advance emc2.

Thanks

Please Log in or Create an account to join the conversation.

More
28 Nov 2009 08:19 #1214 by alex_joni
You can use custom M-codes (check the manual how to set them up).
M101..M200 are available if I'm not mistaken.
Basicly those are any type of executable (bash script for example) which you place in your NC program folder (specified by PROGRAM_PREFIX in the ini), and you can call them from G-code.
There should be 2 examples already included.

Regards,
Alex

Please Log in or Create an account to join the conversation.

More
28 Nov 2009 15:42 #1215 by gouxosor
Thanks,
that was exactly what i am looking for.

Please Log in or Create an account to join the conversation.

More
02 Dec 2009 04:04 #1227 by BMG
Sounds like a pretty cool application. Let us know how your project develops.

Brian

Please Log in or Create an account to join the conversation.

Moderators: cncbasher
Time to create page: 0.077 seconds
Powered by Kunena Forum