How to put coordinates from external program into

More
29 Apr 2010 11:04 #2750 by Comandante_Che
Hello. I need to position tool into position with coordinates, measured by vision. Is it possible in EMC2 to send coordinates from external image recognition program into G-code program?

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

More
12 May 2010 11:49 #2847 by andypugh
Comandante_Che wrote:

Hello. I need to position tool into position with coordinates, measured by vision. Is it possible in EMC2 to send coordinates from external image recognition program into G-code program?


Probably...

There are "analog input" pins in EMC2 which can be read by the G-code M66 command.
See www.linuxcnc.org/docview/html//gcode_mai...ec:M66-Input-Control
And the Wiki for more information.

The more complicated part is getting your values into a form visible inside HAL. How would you like to present your numbers to EMC2?

The possible ways that spring to mind are from the serial port using pyserial or possibly using a user-defined M-word that calls a script to do the work.
(Look at M100-M199 further down that same page).

The HAL part of the script file would be: halcmd setp motion.analog-in-00 $1
(Or similar)

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

Time to create page: 0.178 seconds
Powered by Kunena Forum