how to use emc2 linked with external software
27 Nov 2009 16:59 #1213
by Goulven
how to use emc2 linked with external software was created by Goulven
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
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.
28 Nov 2009 08:19 #1214
by alex_joni
Replied by alex_joni on topic Re:how to use emc2 linked with external software
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
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.
28 Nov 2009 15:42 #1215
by Goulven
Replied by Goulven on topic Re:how to use emc2 linked with external software
Thanks,
that was exactly what i am looking for.
that was exactly what i am looking for.
Please Log in or Create an account to join the conversation.
02 Dec 2009 04:04 #1227
by BMG
Replied by BMG on topic Re:how to use emc2 linked with external software
Sounds like a pretty cool application. Let us know how your project develops.
Brian
Brian
Please Log in or Create an account to join the conversation.
Moderators: cncbasher
Time to create page: 0.068 seconds