M05 and flood off

More
14 May 2010 21:16 #2858 by tklocke
M05 and flood off was created by tklocke
Hi,

we've got an old CNC mashine. This Mashine has a lot of hard wired relay stuff in the back. The Problem is, that when I'm commanding an M05 command it will also turn off the flood. Well, the software doesn't know that. I have to teach the software that if it turns of the spindle it has to change the state of the flood.

I tried to do that using the HALUI. Made a net like the following (it's out of my mind. Ignore mistakes)

net SpindleOff (Input true when Spindle off) halui.flood.off

This is working in manual and mdi mode. in automatic mode i've got an error. It could not be executed while interpreter is waiting. And this is my question: Why and how can i solve it?

Thanks,

Tobi

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

More
14 May 2010 23:13 #2859 by BigJohnT
Replied by BigJohnT on topic Re:M05 and flood off
It would help to know exactly the error and exactly the code you used.

John

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

More
15 May 2010 15:54 - 15 May 2010 15:55 #2861 by tklocke
Replied by tklocke on topic Re:M05 and flood off
Hi John,

the error message is:

can't do that(EMC_COOLANT_FLOOD_OFF) in auto mode with the interpreter waiting"


I am using the following nets to turn the flood off, if the spindle is turned off.

net motion-enabled motion.motion-enabled motenc.0.out-05 and2.2.in1
net SpindleIsOn halui.spindle.is-on not.1.in
net SpindleIsOff not.1.out and2.2.in0
net MaschineOnAndSpindleOff and2.2.out halui.flood.off


Thank you so much for helping me.
Last edit: 15 May 2010 15:55 by tklocke.

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

More
15 May 2010 16:54 #2862 by BigJohnT
Replied by BigJohnT on topic Re:M05 and flood off
Why not use M7 and M9 and connect your flood output to iocontrol.0.coolant-flood?

John

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

More
15 May 2010 18:27 #2863 by tklocke
Replied by tklocke on topic Re:M05 and flood off
You are right thats the way to do it.

But my problem is as follow:
If I command a M03 followed by a M08, that will turn on the spindle and activate the flood. That's working.

I have to explain a little bit more about the maschine. I have 4 Pins to send commands to the maschine and a 5th pin to activate the signal. These four pins are switching some relays in the hard wired stufed to turn on these functions.

But if I command a M05 the relays are switch in a way wich will turn off the spindle and the flood. That's the way it is and I won't change it, if I dont have to. So far so good. But the Software doesn't know, that the flood is off. Because of this I tried the nets, to tell the software that the flood is off.

Hope I could explain it in a good way. If not tell me, I'll try to do it better.

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

More
15 May 2010 18:33 #2864 by tklocke
Replied by tklocke on topic Re:M05 and flood off
ahh and I forgot to say. My flood is connected to iocontrol.0.coolant-flood, or in my way I am generating the 4bit pattern and sending it to the maschine. I can controll the flood by its own.

Again, the only problem is that the software doesn't know that the flood is turned off by the maschine when sending the bit pattern for M05 to the maschine. That causes an inconsistent status between the software and the maschine.

Example:

M03 S1000
M08

Maschine status:
-Spindle on
-Flood on

Software status:
-Spindle on
-Flood on

M05
Maschine status:
-Spindle off
-Flood off

Software status:
-Spindle off
-Flood on


In fact I can't turn it on again, because the software is thinking that the flood is still on

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

More
15 May 2010 21:47 #2868 by BigJohnT
Replied by BigJohnT on topic Re:M05 and flood off
Even though your hardware does not require it why not just say M9 with your M5 so they stay in sync? or don't use iocontrol use halui instead for your flood.

John

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

More
17 May 2010 15:49 #2882 by andypugh
Replied by andypugh on topic Re:M05 and flood off
tklocke wrote:

In fact I can't turn it on again, because the software is thinking that the flood is still on

If the coolant is switched off every time the spindle stops why not use an edge detector on spindle-is-on?
www.linuxcnc.org/docview/html//man/man9/edge.9.html
That can be configured to send a pulse to halui.flood-off every time the spindle transitions from on to off.
(Better still would be an edge detector on the actual state of the coolant pump, of course)

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

More
17 May 2010 19:13 #2889 by tklocke
Replied by tklocke on topic Re:M05 and flood off
BigJohnT wrote:

Even though your hardware does not require it why not just say M9 with your M5 so they stay in sync? or don't use iocontrol use halui instead for your flood.

John


Users can make mistakes, that's why I want to stay in sync as long as I can. iocontroll doesn't offer an input signal for the flood. so it won't help me to use iocontroll instead of halui.

andypugh

If the coolant is switched off every time the spindle stops why not use an edge detector on spindle-is-on?
www.linuxcnc.org/docview/html//man/man9/edge.9.html
That can be configured to send a pulse to halui.flood-off every time the spindle transitions from on to off.
(Better still would be an edge detector on the actual state of the coolant pump, of course)


An edge detector would do the same i am doing at the moment. maybe it's looking nicer. but i won't prevent the error i'm getting.

Note, I'm getting the error only in auto mode, running a program.

Thanks

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

More
20 May 2010 20:39 #2934 by tklocke
Replied by tklocke on topic Re:M05 and flood off
Hey,

it seems that we can't find a solution for this. But thank you so far for helping me.

Thanks.

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

Time to create page: 0.071 seconds
Powered by Kunena Forum