Beginner adding output

More
02 May 2012 21:32 #19745 by eshuang
Hi everyone,

My name is Eric and I recently began using the sherline 2000 with EMC2 in my biomedical engineering lab. Instead of using the CNC system for CNC applications, I would like to modify it to be used with my printer head. I've physically attached a printer head to the Y axis but need a way to control it from the computer. I currently use the sherline stepper driver to control the X and Z axis. As a result, I would like to use the unused parallel port pins and pull them out to an external circuit board where I can control the printer head. I need five pins (binary) to control these. I am wondering what the easiest way to achieve this is. Ideally, I would like to use the existing G-code.

For example:

G1 X1 Y0 Z0
Print channel - 1
Print channel - 2
G1 X2 Y0 Z0

Is there any way to add binary output from the Gcode? Any help will be greatly appreciated. Thanks in advance!

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

More
03 May 2012 11:48 #19753 by BigJohnT
Replied by BigJohnT on topic Re:Beginner adding output
Digital output is handled by M62-65 codes (part of the G code language).

John

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

More
03 May 2012 20:00 #19785 by eshuang
Replied by eshuang on topic Re:Beginner adding output
Hey thanks for the quick response. I will try those codes when I get a chance later today :).

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

More
03 May 2012 20:55 #19786 by andypugh
Replied by andypugh on topic Re:Beginner adding output
One thing that isn't immediately obvious from that manual section is that the effect of the analogue and digital outputs is to change (or read) the values of HAL pins in the Hardware Abstraction Layer, and that those pins need to be connected in HAL to the required components or physical device drivers.

the pins are part of the "motion" module, and their names are here:
linuxcnc.org/docview/html/man/man9/motion.9.html
motion.digital-out-NN , motion.digital-in-NN, motion.analog-out-NN, motion.analog-in-NN.

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

More
07 May 2012 02:32 #19893 by eshuang
Replied by eshuang on topic Re:Beginner adding output
Thanks for the help; I really appreciate it. I made the changes and can now properly control a few parallel port pins! :)

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

Time to create page: 0.071 seconds
Powered by Kunena Forum