Controlling lube pump & a second parallel post
Ref the charge pump problem, stepconf has never produced a .hal file for my machines that worked because of the charge pump in the BOB, this is what I came up with.
net charge-pump => parport.0.pin-01-out
net charge-pump <= charge-pump.out
net estop-out iocontrol.0.user-enable-out
net estop-ext <= parport.0.pin-10-in-not
net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in
Ref your second parport, unless it will not operate in full I/O mode I would define it as 0x1008 in
No-one normally runs short of output pins but inputs are hens teeth, the extra ones on the second card would enable you to run a pendant for example, which is what I do.
Information on the M100 - M199 user codes is in the main EMC2 G Code manual
linuxcnc.org/docs/2.4/html/gcode_main.html section 2.11
The first 2 examples are all you need, just change the pin address to suit your output pin to activate the relay
I wouldn't get hung up on buttons and tick boxes, the time it takes to move your hand from the keyboard and onto the mouse is wasted time, you could have pressed F5 and entered "M7" before you were half way there.
(or indeed used the relevant function key)
M7 and M8 plus M9 are all you need for coolant, whether in MDI or AUTO mode and writing a user Mcode for your vacuum will enable you to control it in the same way
regards
Please Log in or Create an account to join the conversation.
- TarHeelTom
- Offline
- Premium Member
- Posts: 91
- Thank you received: 1
Hi
Ref your second parport, unless it will not operate in full I/O mode I would define it as 0x1008 in
No-one normally runs short of output pins but inputs are hens teeth, the extra ones on the second card would enable you to run a pendant for example, which is what I do.
<snip>
I originally had it as "in", but that seemed to make pin 17 unusable as charge-pump on the second parport. In the end, I'll pick up the charge-pump OK signal from my first bob, but have been waiting for a header cable to make the first bob work. I've got five limit switches I'd like to bring in on separate pins, so really could use extra input pins...
Information on the M100 - M199 user codes is in the main EMC2 G Code manual
linuxcnc.org/docs/2.4/html/gcode_main.html section 2.11
The first 2 examples are all you need, just change the pin address to suit your output pin to activate the relay
I wouldn't get hung up on buttons and tick boxes, the time it takes to move your hand from the keyboard and onto the mouse is wasted time, you could have pressed F5 and entered "M7" before you were half way there.
(or indeed used the relevant function key)
M7 and M8 plus M9 are all you need for coolant, whether in MDI or AUTO mode and writing a user Mcode for your vacuum will enable you to control it in the same way
regards
Adding a pair of M codes sure seems easy, I'll try it here in a few minutes. What I remember from the cnc seminar last year was creating an M code, then working for days in the ladder. Now that I'm actually trying to do something with it, it seems quite easy.
Now here's an off the wall question:
What the heck does this line mean: #!/bin/sh
Seems like that line starts with a comment, so it could be completely removed from the file and have no effect. But something tells me that's not the case.
Thanks for the direction here.
Tom
Please Log in or Create an account to join the conversation.
- TarHeelTom
- Offline
- Premium Member
- Posts: 91
- Thank you received: 1
M100
#!/bin/sh
#File to turn on shop vac receptacle port 1 pin 16
halcmd setp parport.1.pin-16-out True
exit 0
M101
#!/bin/sh
#File to turn off shop vac receptacle port 1 pin 16
halcmd setp parport.1.pin-16-out False
exit 0
Anyone got any idea what I'm doing wrong?
Thanks
Tom
Please Log in or Create an account to join the conversation.
And the file name is M100 with no extension?
And what happens when you type M100 in the MDI tab?
Otherwise it looks right to me.
John
Please Log in or Create an account to join the conversation.
- TarHeelTom
- Offline
- Premium Member
- Posts: 91
- Thank you received: 1
If you do setp parport.1.pin-16-out True from the Show Hal Screen does that work?
Yes, this works. Makes it happen on the show screen and the watch screen
And the file name is M100 with no extension?
Correct. M100 with no extension
And what happens when you type M100 in the MDI tab?
Nothing happens at all. Got an error the first couple of times, until I moved the two files into the correct directory.
Otherwise it looks right to me.
John
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
- TarHeelTom
- Offline
- Premium Member
- Posts: 91
- Thank you received: 1
I just tried my M100 collet open and it would not work in 10.04 until I added eval in front of each halcmd.
John
I'll try that in a moment.
I've written a short Gcode program to try the M100 and M101, but can't get it to run at all.
Much head scratching going on here.
Tom
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.