Controlling lube pump & a second parallel post

More
15 Jun 2011 08:55 - 15 Jun 2011 09:10 #10523 by ArcEye
Hi

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
Last edit: 15 Jun 2011 09:10 by ArcEye. Reason: typographical dislexia !!

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

More
15 Jun 2011 16:04 #10535 by TarHeelTom
ArcEye wrote:

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.

More
15 Jun 2011 18:44 #10537 by TarHeelTom
Wrote two M codes, M100 and M101. After I got the permissions set, they don't throw an error, but also don't work, either at the bob, or at the Hal Watch pins.

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.

More
15 Jun 2011 19:23 #10539 by BigJohnT
If you do setp parport.1.pin-16-out True from the Show Hal Screen does that work?

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.

More
15 Jun 2011 19:46 #10541 by TarHeelTom
BigJohnT wrote:

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.

More
15 Jun 2011 20:27 #10542 by BigJohnT
Try M100 in a short g code program...

John

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

More
15 Jun 2011 21:15 #10545 by BigJohnT
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

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

More
15 Jun 2011 21:45 #10551 by TarHeelTom
BigJohnT wrote:

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.

More
15 Jun 2011 21:47 #10552 by BigJohnT
I've just noticed that I had to shut down EMC after fixing the M100 file or I kept getting the same error. Might not reload it or something every time.

John

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

More
15 Jun 2011 21:50 #10553 by BigJohnT
I just removed the eval and now mine works fine...

John

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

Time to create page: 0.193 seconds
Powered by Kunena Forum