How to bind M62-M65 codes to parallel port?
www.linuxcnc.org/docview/html/gcode_main.html#sec:M62-to-M65
I want to be able to drive the pin on a parallel port, which then triggers my solder paste machine to dispense a drop of solder paste on my PCB.
I have searched the forum for driving output pin / parallel port, but have not come across what I'm looking for. I want to be able to bind these M codes to drive a pin on a parallel port, but I am not sure what steps are needed to configure EMC2 to allow this.
Any and all help is greatly appreciated. Thanks.
Please Log in or Create an account to join the conversation.
You need to read the Integrators Manual highlighted in the link you posted and then probably re-read!
It's a steep learning curve.
The pins which are set are motion.digital-in-00 and motion.digital-out-00 (00 to 03 unless extended) for M62-65
These can be linked in your hal file as required ( parport.x.pin-nn-in/out ?)
regards
Please Log in or Create an account to join the conversation.
I'll start reading...and then read it again.
Please Log in or Create an account to join the conversation.
linuxcnc.org/docs/html/gcode_main.html#sec:M100-to-M199:
Rick G
Please Log in or Create an account to join the conversation.
Instead of motion.digital-in-00 => parport.1.pin-02-out
I had to create a dummy signal and tie it to motion and my output pin. (Don't have my HAL config file next to be, but this is basically what I had to do.)
newsig foo bit
net foo motion.digital.in-00
net foo parport.1.pin-02-out
This worked exactly like I wanted, outputted the signal to Parallel Port #2, Pin 2.
The documentation says 'newsig' is an obsolete command, but it worked for me, so I'm happy.
Anyone know why the "obsolete" way worked, and the "correct" way didn't?
Please Log in or Create an account to join the conversation.
Instead of motion.digital-in-00 => parport.1.pin-02-out
I had to create a dummy signal and tie it to motion and my output pin. (
Anyone know why the "obsolete" way worked, and the "correct" way didn't?
net foo motion.digital-in-00 => parport.1.pin-02-out
You are tying pins together, think of foo as the wire that connects them
regards
Please Log in or Create an account to join the conversation.
Everything I read said to use a signal and pin (signal => pin), which is what I tried and didn't work.
Hope they update the documentation since people who follow it, like myself, will get stuck.
Thanks. -ArcEye
I am on my way at having a solderpaste dispenser. Did an air run with the mill and it worked flawlessly. Feedback LED lit every time!
Now I just have to add the solder paste hardware to the mix.
Please Log in or Create an account to join the conversation.
.....I don't recall seeing anywhere in the documentation that a "wire is needed ....."
It doesn't say that anywhere, that's just how I think of it to get the syntax right!!!
Glad you have done what you wanted
regards
Please Log in or Create an account to join the conversation.
EMC V2.4 Integrator Manual
6.1.4
Chapter 6. Getting Started
net
The command "net" creates a "connection" between a signal and and one or more pins. If the signal
does not exist net creates the new signal. This replaces the need to use the command newsig. The
direction indicators "<= and =>" are only to make it easier for humans to follow the logic and are not
used by the net command.
The syntax and an example:
net <signal-name> <pin-name> <opt-direction> <opt-pin-name>
net both-home-y <= parport.0.pin-11-in
Rick G
Please Log in or Create an account to join the conversation.
This did not work for me in the way that I expected or in the way I read in documentation.
Instead of motion.digital-in-00 => parport.1.pin-02-out
I had to create a dummy signal and tie it to motion and my output pin. (Don't have my HAL config file next to be, but this is basically what I had to do.)
newsig foo bit
net foo motion.digital.in-00
net foo parport.1.pin-02-out
This worked exactly like I wanted, outputted the signal to Parallel Port #2, Pin 2.
The documentation says 'newsig' is an obsolete command, but it worked for me, so I'm happy.
Anyone know why the "obsolete" way worked, and the "correct" way didn't?
Any correct way will work. digital in needs to be connected to an input pin from the parallel port. the <=> mean nothing as you will see when you read the basic hal very short chapter.
Have you read this chapter on basic hal?
linuxcnc.org/docview/html/hal_basic_hal.html
John
Please Log in or Create an account to join the conversation.