Stop coolant during pause
- ristokoiva
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
14 Jan 2014 22:36 #42768
by ristokoiva
Stop coolant during pause was created by ristokoiva
Hi,
I am using v2.5.3 with Axis standard GUI. I noticed that during program pause the coolant is not stopped.
What would be the best way to automatically stop coolant (issue M9) when the program execution is paused and to turn the coolant (with correct type M7 or M8) back on after resume, but only if it was enabled before pause in the first place?
Thank you for your help!
Risto
I am using v2.5.3 with Axis standard GUI. I noticed that during program pause the coolant is not stopped.
What would be the best way to automatically stop coolant (issue M9) when the program execution is paused and to turn the coolant (with correct type M7 or M8) back on after resume, but only if it was enabled before pause in the first place?
Thank you for your help!
Risto
Please Log in or Create an account to join the conversation.
15 Jan 2014 01:14 - 15 Jan 2014 01:14 #42776
by andypugh
Rather than issue an actual M9, you can use some HAL logic.
The pins halui.program.is-running or halui.program.is-paused are probably what you need.
You will need to alter this to suit your machine, it assumes a parport and a particular pin. I don't even know if pin 12 is even an output
Replied by andypugh on topic Stop coolant during pause
What would be the best way to automatically stop coolant (issue M9) when the program execution is paused and to turn the coolant (with correct type M7 or M8) back on after resume, but only if it was enabled before pause in the first place?
Rather than issue an actual M9, you can use some HAL logic.
The pins halui.program.is-running or halui.program.is-paused are probably what you need.
loadrt and2
...
addf and2.0 servo-thread
...
net coolant-raw iocontrol.0.coolant-flood and2.0.in0
net coolant-latch halui.program.is-running and2.0.in1
net coolant-latched and2.0.out parport.0.pin-12-out
You will need to alter this to suit your machine, it assumes a parport and a particular pin. I don't even know if pin 12 is even an output
Last edit: 15 Jan 2014 01:14 by andypugh.
Please Log in or Create an account to join the conversation.
- ristokoiva
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
15 Jan 2014 04:26 - 15 Jan 2014 04:28 #42785
by ristokoiva
Replied by ristokoiva on topic Stop coolant during pause
Thanks for a swift reply!
I really appreciate your example, that gave me a solid base to work on!
I believe the example although does block the manual coolant usage also in MDI mode, am I correct?
But, this could be IMHO fixed with (pseudo-code):
As HAL does not provide directly a NOR-gate, separated the function to NOT and OR:
And written down long:Is the syntax correct (assuming coolant-flood on parport.pin12)?
Cheers!
I really appreciate your example, that gave me a solid base to work on!
I believe the example although does block the manual coolant usage also in MDI mode, am I correct?
But, this could be IMHO fixed with (pseudo-code):
coolant-output-pin = halui.program.is-paused NOR (NOT iocontrol.0.coolant-flood)
As HAL does not provide directly a NOR-gate, separated the function to NOT and OR:
coolant-output-pin = NOT (halui.program.is-paused OR (NOT iocontrol.0.coolant-flood))
And written down long:
loadrt or2
loadrt not
...
addf or2.0 servo-thread
addf not.0 servo-thread
addf not.1 servo-thread
...
net program-paused halui.program.is-paused or2.0.in0
net coolant-flood-inv iocontrol.0.coolant-flood not.0.in
net coolant-flood-inv-in-or not.0.out or2.0.in1
net coolant-flood-nor or2.0.out not.1.in
net coolant-flood-latched not.1.out parport.0.pin-12-out
Cheers!
Last edit: 15 Jan 2014 04:28 by ristokoiva.
Please Log in or Create an account to join the conversation.
15 Jan 2014 05:26 #42786
by andypugh
Yes, that way should work, but I would do it with lut5, because it's cleaner and makes it easier to expand.
In the example below I have expanded it to turn off coolant if the door is open. (via a door-is-open signal created elsewhere in the logic)
I am also using the option to give functions custom names, and showing how to link a signal that is linked to its "writer" elsewhere in the hal file.
www.linuxcnc.org/docs/html/man/man9/lut5.9.html
Then the truth-table is fairly simple, 1 if input 0 is set, and no other input.
000 = 0
001 = 1
010 = 0
011 = 0
100 = 0
101 = 0
111 = 0
Replied by andypugh on topic Stop coolant during pause
Yes, that wasn't part of the specI believe the example although does block the manual coolant usage also in MDI mode, am I correct?
But, this could be IMHO fixed with (pseudo-code):
coolant-output-pin = halui.program.is-paused NOR (NOT iocontrol.0.coolant-flood)
Yes, that way should work, but I would do it with lut5, because it's cleaner and makes it easier to expand.
In the example below I have expanded it to turn off coolant if the door is open. (via a door-is-open signal created elsewhere in the logic)
I am also using the option to give functions custom names, and showing how to link a signal that is linked to its "writer" elsewhere in the hal file.
www.linuxcnc.org/docs/html/man/man9/lut5.9.html
loadrt lut5 count=2 names=flood-logic,mist-logic
addf mist-logic servo-thread
addf flood-logic servo-thread
...
net f0 iocontrol.0.coolant-flood flood-logic.in-0
net f1 halui.program.is-paused flood-logic.in-1
net door-is-open flood-logic.in-2
Then the truth-table is fairly simple, 1 if input 0 is set, and no other input.
000 = 0
001 = 1
010 = 0
011 = 0
100 = 0
101 = 0
111 = 0
setp flood-logic.function 0x2
The following user(s) said Thank You: ristokoiva
Please Log in or Create an account to join the conversation.
15 Jan 2014 05:55 #42788
by newbynobi
Replied by newbynobi on topic Stop coolant during pause
I haven't looked, but why not use a remap ?
I do not know if remappig of M7 ,M8, or M9 is possible.
Norbert
I do not know if remappig of M7 ,M8, or M9 is possible.
Norbert
Please Log in or Create an account to join the conversation.
15 Jan 2014 09:29 #42793
by andypugh
Replied by andypugh on topic Stop coolant during pause
I just remembered, I made a public Google spreadsheet for calculating LUT5 parameters:
docs.google.com/spreadsheet/ccc?key=0Ahj...&usp=drive_web#gid=0
Just put 1 or 0 in the yellow column for each input combination.
docs.google.com/spreadsheet/ccc?key=0Ahj...&usp=drive_web#gid=0
Just put 1 or 0 in the yellow column for each input combination.
Please Log in or Create an account to join the conversation.
Time to create page: 0.080 seconds