- Configuring LinuxCNC
- Basic Configuration
- plasma arc goes out mid cut.... how to pause program, reprobe, and restart?
plasma arc goes out mid cut.... how to pause program, reprobe, and restart?
28 Sep 2018 07:27 #118093
by jimmyrig
title says it all. I've got an issue where the plasma arc will go out randomly during the middle of a cut, particularly when the consumables are showing their age. i've looked around but havnt found a way to run a macro after a pause. Any ideas, does anyone currently have a solution? hopefully their is a easier option than my idea below....
step one would be pausing the program when i lost arc.....this alone would make things easier as i could manually stop the program and restart from the line it failed on without having to watch the machine nonstop (current method)
my rough idea would be to have the servo thread constantly monitor the arc start (spindle on pin) and arc -ok pin...pausing the program when the arc ok stopped but the Arc Start pin was still on......this seems somewhat like an external pause button but with different pins.... forum.linuxcnc.org/forum/38-general-linu...nal-buttons-function ....my only concern is what happens during initial probe? would it catch the arc start firing before the arc ok? would their be any way to code in some delay time?
something along the lines of this?
loadrt and2 count=1
addf and2.0 servo-thread
net my-sigin1 and2.0.in0 <= arc-Start
net my-sigin2 and2.0.in1 <= arc-ok
net both-on halui.program.pause <= and2.0.out
worse case i could have an arduino monitor the arc start and arc ok pins and pause the program via an external pin exactly as in the example....this would allow me to code in any delay needed.
step two is restarting....this is the one i have no good idea, it seems halui can run mdi commands but that seems to require taking linuxcnc out of auto mode, executing the command, and restarting auto mode.....
would something like this work? im not sure how the hal file reads in commands and in which way it would execute the sequence of commands......it seems like a bad idea
loadrt and2 count=1
addf and2.0 servo-thread
net my-sigin1 and2.0.in0 <= arc-Start
net my-sigin2 and2.0.in1 <= arc-ok
net both-on halui.program.resume <= halui.mode.auto <= halui.mdi-command-<00> <=halui.mode.mdi <=halui.program.pause <= and2.0.out
Thanks in advance,
Jimmy
step one would be pausing the program when i lost arc.....this alone would make things easier as i could manually stop the program and restart from the line it failed on without having to watch the machine nonstop (current method)
my rough idea would be to have the servo thread constantly monitor the arc start (spindle on pin) and arc -ok pin...pausing the program when the arc ok stopped but the Arc Start pin was still on......this seems somewhat like an external pause button but with different pins.... forum.linuxcnc.org/forum/38-general-linu...nal-buttons-function ....my only concern is what happens during initial probe? would it catch the arc start firing before the arc ok? would their be any way to code in some delay time?
something along the lines of this?
loadrt and2 count=1
addf and2.0 servo-thread
net my-sigin1 and2.0.in0 <= arc-Start
net my-sigin2 and2.0.in1 <= arc-ok
net both-on halui.program.pause <= and2.0.out
worse case i could have an arduino monitor the arc start and arc ok pins and pause the program via an external pin exactly as in the example....this would allow me to code in any delay needed.
step two is restarting....this is the one i have no good idea, it seems halui can run mdi commands but that seems to require taking linuxcnc out of auto mode, executing the command, and restarting auto mode.....
would something like this work? im not sure how the hal file reads in commands and in which way it would execute the sequence of commands......it seems like a bad idea
loadrt and2 count=1
addf and2.0 servo-thread
net my-sigin1 and2.0.in0 <= arc-Start
net my-sigin2 and2.0.in1 <= arc-ok
net both-on halui.program.resume <= halui.mode.auto <= halui.mdi-command-<00> <=halui.mode.mdi <=halui.program.pause <= and2.0.out
Thanks in advance,
Jimmy
Please Log in or Create an account to join the conversation.
28 Sep 2018 12:44 - 28 Sep 2018 12:44 #118109
by andypugh
Replied by andypugh on topic plasma arc goes out mid cut.... how to pause program, reprobe, and restart?
I think that your logic should consider the value on the motion.motion-type pin.
linuxcnc.org/docs/2.7/html/man/man9/motion.9.html
(it's listed in the debugging pins, but isn't going to go away, it's too useful)
At that point it is likely that a custom HAL component will make sense, then you can easily add delays etc.
Note that you can't simply delay in the comp file, that has to run to completion ever time it is called (every mS) or your entire PC will lock up![:-) :-)](/media/kunena/emoticons/smile.png)
This is typically done with a state-machine, something like this.
linuxcnc.org/docs/2.7/html/man/man9/motion.9.html
(it's listed in the debugging pins, but isn't going to go away, it's too useful)
At that point it is likely that a custom HAL component will make sense, then you can easily add delays etc.
Note that you can't simply delay in the comp file, that has to run to completion ever time it is called (every mS) or your entire PC will lock up
![:-) :-)](/media/kunena/emoticons/smile.png)
This is typically done with a state-machine, something like this.
...
;;
static int state;
switch state{
case 0: // normal operation
if (conditions indicate arc fault) {
state = 1;
timer = 1000;
maybe_set_some_pins;
}
break;
case 1: // fault detected, running time delay
timer -= fperiod;
if timer <= 0 {
state = 2;
feed_hold = 1;
}
break;
case 2: // timer expired;
if (reset conditions) {
state = 0; // back to normal running
feed_hold = 0;
}
}
Last edit: 28 Sep 2018 12:44 by andypugh.
The following user(s) said Thank You: jimmyrig
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 18564
- Thank you received: 6220
28 Sep 2018 17:51 #118134
by tommylight
Replied by tommylight on topic plasma arc goes out mid cut.... how to pause program, reprobe, and restart?
You did not mention what config you are using, but there are already 2 configs that have fully automated plasma controlls.
There is one done by me for stepper and servo drives but it must have a stepper on the Z axis, that has everything one needs on a plasma cutter and more, and it has no macros or remaps or similar, it has automatic restart and stop at lost arc signal and it will retry automatically if it stops during a cut. It is being used every day on over 15 machines, it never fails.
The other is made by the user nick named Grotius, it is very nicely put together and he did a lot of coding to make it as usable and versatile as possible, but i am not sure if it has auto restart, i think it does. He also did a nice GUI for it.
There is one done by me for stepper and servo drives but it must have a stepper on the Z axis, that has everything one needs on a plasma cutter and more, and it has no macros or remaps or similar, it has automatic restart and stop at lost arc signal and it will retry automatically if it stops during a cut. It is being used every day on over 15 machines, it never fails.
The other is made by the user nick named Grotius, it is very nicely put together and he did a lot of coding to make it as usable and versatile as possible, but i am not sure if it has auto restart, i think it does. He also did a nice GUI for it.
The following user(s) said Thank You: jimmyrig
Please Log in or Create an account to join the conversation.
28 Sep 2018 18:55 - 28 Sep 2018 19:43 #118138
by Grotius
Replied by Grotius on topic plasma arc goes out mid cut.... how to pause program, reprobe, and restart?
Hi Tom,
Thanks to Rodw, and you. And many others.
Thank you. Auto restart has to be finished and tested on my next project in about 2-4 weeks.
But the gui is tested, and i am convinced that it's work's better then Mach, following my experience'e over the years.
But importanter for me is that the wife of Rodw is recovering healty at this periode.
The same for other people. Healty in life is the most important. We never talk about that on this forum, i will brake the ice.
The auto restart function in the Grotius gui will go move the machine a little bit back ward's in time (restart back-time is user selectable) on the cutting path and it will restart. The user can select up to 1 to plenty restart times.
This final code is also suited with the hypertherm modbuss connection protocol. Source code for this is provided by
our forum user, the gentleman Pedro : forum.linuxcnc.org/cb-profile/grijalvap
So in the end. We will rock a plasma machine like a chicken :
That's all.
Thanks to Rodw, and you. And many others.
Thank you. Auto restart has to be finished and tested on my next project in about 2-4 weeks.
But the gui is tested, and i am convinced that it's work's better then Mach, following my experience'e over the years.
But importanter for me is that the wife of Rodw is recovering healty at this periode.
The same for other people. Healty in life is the most important. We never talk about that on this forum, i will brake the ice.
The auto restart function in the Grotius gui will go move the machine a little bit back ward's in time (restart back-time is user selectable) on the cutting path and it will restart. The user can select up to 1 to plenty restart times.
This final code is also suited with the hypertherm modbuss connection protocol. Source code for this is provided by
our forum user, the gentleman Pedro : forum.linuxcnc.org/cb-profile/grijalvap
So in the end. We will rock a plasma machine like a chicken :
That's all.
Last edit: 28 Sep 2018 19:43 by Grotius.
The following user(s) said Thank You: jimmyrig
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 18564
- Thank you received: 6220
28 Sep 2018 21:45 #118153
by tommylight
Replied by tommylight on topic plasma arc goes out mid cut.... how to pause program, reprobe, and restart?
Vini Vici, nice choice, i listen to them often when i work or in my car.
Please Log in or Create an account to join the conversation.
28 Sep 2018 22:59 - 29 Sep 2018 07:49 #118159
by jimmyrig
I was using Gmoccapy plasma but am not sure how to hook everything up on the plasma side. is that what you were referring too? if not could you send me the links to the configs? (EDIT - i found them link below for others) id love to take a look at them.
my machine is currently running 2.8pre, it has 4 stepper motors running off a gekko g540 drive, the 4 inputs from the gekko drive are for the homing switches. Currently the machine is running in gantry mode and is squaring the gantry on home (XXYZ). For the touchoff it has floating head with both a ohmic touch off (not working....not sure how to wire it up yet) and a switch to detect torch/z axis separation.
I do not have a torch height controller yet. My rough idea was to use an arduino to send the voltage via serial if possible or ethernet if not to a PID loop in linuxcnc. my first attempts haven't gone well but will retry this weekend (voltage from powermax45xp fried my ads1115 despite being in the "safe range"....shouldnt be a hard fix to harden the circut alittle better i just figured that was done in the powermax which it doesnt appear to be. ) I can currently send arduino values through hal up to the gui so that part is working.
The machine so far has been running fantastic, cut my first 4x4 sheet with no issues despite not having a THC, arc did not flame out either. i was using another plasma at a makerspace that accelerates really slow 30in/s^2 vs my 100 on X and 250 on Y and the difference in dross is amazing. No dross with my machine vs covered in dross with the makerspace machine. Same feed speeds and plasma. I just know the longer i wait on the more of an issue it will be as the slats start to wear our and warp.
Hope that answers your question
Jimmy
EDIT
i found your config working my way through it now, will get it working first then might play around with the arduino serial THC for the fun of it. (will have arduino output up/down for now)
forum.linuxcnc.org/49-basic-configuratio...g-that-works?start=0
Replied by jimmyrig on topic plasma arc goes out mid cut.... how to pause program, reprobe, and restart?
You did not mention what config you are using, but there are already 2 configs that have fully automated plasma controlls.
There is one done by me for stepper and servo drives but it must have a stepper on the Z axis, that has everything one needs on a plasma cutter and more, and it has no macros or remaps or similar, it has automatic restart and stop at lost arc signal and it will retry automatically if it stops during a cut. It is being used every day on over 15 machines, it never fails.
The other is made by the user nick named Grotius, it is very nicely put together and he did a lot of coding to make it as usable and versatile as possible, but i am not sure if it has auto restart, i think it does. He also did a nice GUI for it.
I was using Gmoccapy plasma but am not sure how to hook everything up on the plasma side. is that what you were referring too? if not could you send me the links to the configs? (EDIT - i found them link below for others) id love to take a look at them.
my machine is currently running 2.8pre, it has 4 stepper motors running off a gekko g540 drive, the 4 inputs from the gekko drive are for the homing switches. Currently the machine is running in gantry mode and is squaring the gantry on home (XXYZ). For the touchoff it has floating head with both a ohmic touch off (not working....not sure how to wire it up yet) and a switch to detect torch/z axis separation.
I do not have a torch height controller yet. My rough idea was to use an arduino to send the voltage via serial if possible or ethernet if not to a PID loop in linuxcnc. my first attempts haven't gone well but will retry this weekend (voltage from powermax45xp fried my ads1115 despite being in the "safe range"....shouldnt be a hard fix to harden the circut alittle better i just figured that was done in the powermax which it doesnt appear to be. ) I can currently send arduino values through hal up to the gui so that part is working.
The machine so far has been running fantastic, cut my first 4x4 sheet with no issues despite not having a THC, arc did not flame out either. i was using another plasma at a makerspace that accelerates really slow 30in/s^2 vs my 100 on X and 250 on Y and the difference in dross is amazing. No dross with my machine vs covered in dross with the makerspace machine. Same feed speeds and plasma. I just know the longer i wait on the more of an issue it will be as the slats start to wear our and warp.
Hope that answers your question
Jimmy
EDIT
i found your config working my way through it now, will get it working first then might play around with the arduino serial THC for the fun of it. (will have arduino output up/down for now)
forum.linuxcnc.org/49-basic-configuratio...g-that-works?start=0
Last edit: 29 Sep 2018 07:49 by jimmyrig.
Please Log in or Create an account to join the conversation.
29 Sep 2018 20:08 #118195
by Grotius
Replied by Grotius on topic plasma arc goes out mid cut.... how to pause program, reprobe, and restart?
Hi Jimmy,
The problem with Gmocappy plasma is huge. I don't know a single linux candidate over the year's
that is convinced of this plasma version. It is usable for M3 and M5.
To become integrated in the current source code of linuxcnc with this plasma version is a miracle for me as outsider.
But that's why they like me !!!
The problem with Gmocappy plasma is huge. I don't know a single linux candidate over the year's
that is convinced of this plasma version. It is usable for M3 and M5.
To become integrated in the current source code of linuxcnc with this plasma version is a miracle for me as outsider.
But that's why they like me !!!
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 18564
- Thank you received: 6220
29 Sep 2018 23:48 #118208
by tommylight
Replied by tommylight on topic plasma arc goes out mid cut.... how to pause program, reprobe, and restart?
I think Rodw uses gmoccapy on his now gone plasma machine, as he sold it not long ago.
Rodw, did i recall that correctly ?
Rodw, did i recall that correctly ?
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 18564
- Thank you received: 6220
29 Sep 2018 23:49 #118209
by tommylight
Oh yes we do like you ! A lot.
Replied by tommylight on topic plasma arc goes out mid cut.... how to pause program, reprobe, and restart?
But that's why they like me !!!
Oh yes we do like you ! A lot.
Please Log in or Create an account to join the conversation.
30 Sep 2018 04:42 - 30 Sep 2018 07:30 #118217
by jimmyrig
Replied by jimmyrig on topic plasma arc goes out mid cut.... how to pause program, reprobe, and restart?
im trying to understand your code, want to learn linuxcnc to build other machines in the future, not just for this plasma........im totally lost on how you got the pause/probe restart to work, i assume it was in the thc.hal file somewhere.....is this is? if you wouldnt mind giving me a basic rundown on how it works i should be able to figure it out from their. Im trying to get it to the point where all the settings are in fusion 360 so they can be set once (i switch material a lot). So far pierce height, delay, and cut height all work. if i get the arduino THC working (tried again today, think i know what to build now) thc voltage will be on fusion as well. eventually get the serial connector on the hypertherm plasma we can control amps and mark/cut settings. hopefully that will give us machine temp as well. My goal is to have every setting in gcode so i dont have to remember to set it....cause i will forget.....and that way it is much easier to train future employees.
net FloatSwitchEstop and2.4.out => logic.0.in-02
net FloatAndTorchOn and2.5.out => or2.2.in1
net TorchAndFloat and2.6.out => flipflop.0.set
net PosAndFloat and2.7.out => or2.5.in1
net IgnitionEstop comp.2.out => logic.0.in-01
net StartTorchOn and2.8.out => and2.3.in0
net OriginalPosZ-cmd axis.2.motor-pos-cmd => mux2.5.in0 sum2.2.in1
net JointPoz-cmd axis.2.joint-pos-cmd => sum2.2.in0
net CHLTriggered comp.0.out => and2.0.in0
net AtPosition comp.1.equal => and2.7.in0
net VelX ddt.0.out => hypot.0.in0
net VelY ddt.1.out => hypot.0.in1
net FloatSwitchSet flipflop.0.out => or2.3.in1 and2.7.in1
net ModeIsAuto halui.mode.is-auto => mux2.5.sel
net VelXY hypot.0.out => minmax.0.in comp.0.in0
net TriggerEStop logic.0.or => estop-latch.0.fault-in b
net MaximumVelocity minmax.0.max => mult2.1.in0
net TurnTorchOn motion.spindle-forward => xor2.0.in0 and2.8.in0 and2.6.in0 mux2.4.sel not.0.in
net HeightAdjustment mult2.0.out => mux2.3.in1
net VelocityThreshold mult2.1.out => comp.0.in1
net HeightOffset mux2.0.out => sum2.1.in1
net AdjustmentDirection mux2.1.out => mult2.0.in1
net PositionSnapshot mux2.2.out => sum2.1.in0 mux2.2.in0
net SelectedAdjustment mux2.3.out => mux2.0.in1
net PosZ-cmd mux2.4.out => stepgen.2.position-cmd comp.1.in1
net PosSelectB mux2.5.out => mux2.4.in0
net PosSelectC mux2.6.out => mux2.4.in1
net TurnTorchOff not.0.out => and2.5.in0 or2.7.in0 updown.0.reset
net ReversedArcOK not.1.out => minmax.0.reset
net PierceDelayElapsed oneshot.0.out-not => and2.2.in1
net IgnitionTimer oneshot.1.out => edge.0.in or2.8.in0
net AdjustHeight or2.0.out => xor2.2.in1 and2.1.in0
net TakeSnapshot or2.1.out => mux2.2.sel
net TriggerLimit or2.2.out => axis.2.neg-lim-sw-in axis.2.pos-lim-sw-in axis.2.home-sw-in
net ProbeOrArcOK or2.3.out => mux2.6.sel
net PAFOrArcOK or2.5.out => and2.3.in1
net EstopOrArcOK or2.6.out => flipflop.0.reset
#net ExtEStop parport.0.pin-15-in => logic.0.in-00
net ExtEStop => logic.0.in-00
#net LimitZ parport.0.pin-15-in => or2.2.in0
net ThresholdPercentage scale.0.out => mult2.1.in1
net PosZ-fb stepgen.2.position-fb => axis.2.motor-pos-fb mux2.2.in1 comp.1.in0
net PierceOffset sum2.0.out => mux2.0.in0
net DestinationHeight sum2.1.out => mux2.6.in1
net JointAxisDiff sum2.2.out => sum2.3.in1 sum2.4.in1
net StepCordsTH sum2.3.out => mux2.5.in1
net StepCordsML sum2.4.out => mux2.6.in0
net FeedHold xor2.0.out => motion.feed-hold
net CHLSwitched xor2.2.out => and2.1.in1
net ArcOKTimer oneshot.2.out => xor2.1.in0
net PierceLatch flipflop.1.out => mux2.0.sel oneshot.0.in
net IgnitionCounterS32 updown.0.count => conv-s32-float.0.in
net IgnitionCounterFloat conv-s32-float.0.out => comp.2.in1
net IgnitionTimerOff oneshot.1.out-not => updown.0.countup
net TorchOff not.2.out => flipflop.1.reset
net TorchTurnedOffOrTimeout or2.7.out => or2.6.in1
net IgnitionTimeout edge.0.out => or2.7.in1
net ExtinguishTimer oneshot.3.out edge.1.in
net ExtinguishLatch flipflop.2.out or2.8.in1
net ExtinguishTimeout edge.1.out flipflop.2.reset
net Timers or2.8.out => or2.4.in0
net FloatSwitchEstop and2.4.out => logic.0.in-02
net FloatAndTorchOn and2.5.out => or2.2.in1
net TorchAndFloat and2.6.out => flipflop.0.set
net PosAndFloat and2.7.out => or2.5.in1
net IgnitionEstop comp.2.out => logic.0.in-01
net StartTorchOn and2.8.out => and2.3.in0
net OriginalPosZ-cmd axis.2.motor-pos-cmd => mux2.5.in0 sum2.2.in1
net JointPoz-cmd axis.2.joint-pos-cmd => sum2.2.in0
net CHLTriggered comp.0.out => and2.0.in0
net AtPosition comp.1.equal => and2.7.in0
net VelX ddt.0.out => hypot.0.in0
net VelY ddt.1.out => hypot.0.in1
net FloatSwitchSet flipflop.0.out => or2.3.in1 and2.7.in1
net ModeIsAuto halui.mode.is-auto => mux2.5.sel
net VelXY hypot.0.out => minmax.0.in comp.0.in0
net TriggerEStop logic.0.or => estop-latch.0.fault-in b
net MaximumVelocity minmax.0.max => mult2.1.in0
net TurnTorchOn motion.spindle-forward => xor2.0.in0 and2.8.in0 and2.6.in0 mux2.4.sel not.0.in
net HeightAdjustment mult2.0.out => mux2.3.in1
net VelocityThreshold mult2.1.out => comp.0.in1
net HeightOffset mux2.0.out => sum2.1.in1
net AdjustmentDirection mux2.1.out => mult2.0.in1
net PositionSnapshot mux2.2.out => sum2.1.in0 mux2.2.in0
net SelectedAdjustment mux2.3.out => mux2.0.in1
net PosZ-cmd mux2.4.out => stepgen.2.position-cmd comp.1.in1
net PosSelectB mux2.5.out => mux2.4.in0
net PosSelectC mux2.6.out => mux2.4.in1
net TurnTorchOff not.0.out => and2.5.in0 or2.7.in0 updown.0.reset
net ReversedArcOK not.1.out => minmax.0.reset
net PierceDelayElapsed oneshot.0.out-not => and2.2.in1
net IgnitionTimer oneshot.1.out => edge.0.in or2.8.in0
net AdjustHeight or2.0.out => xor2.2.in1 and2.1.in0
net TakeSnapshot or2.1.out => mux2.2.sel
net TriggerLimit or2.2.out => axis.2.neg-lim-sw-in axis.2.pos-lim-sw-in axis.2.home-sw-in
net ProbeOrArcOK or2.3.out => mux2.6.sel
net PAFOrArcOK or2.5.out => and2.3.in1
net EstopOrArcOK or2.6.out => flipflop.0.reset
#net ExtEStop parport.0.pin-15-in => logic.0.in-00
net ExtEStop => logic.0.in-00
#net LimitZ parport.0.pin-15-in => or2.2.in0
net ThresholdPercentage scale.0.out => mult2.1.in1
net PosZ-fb stepgen.2.position-fb => axis.2.motor-pos-fb mux2.2.in1 comp.1.in0
net PierceOffset sum2.0.out => mux2.0.in0
net DestinationHeight sum2.1.out => mux2.6.in1
net JointAxisDiff sum2.2.out => sum2.3.in1 sum2.4.in1
net StepCordsTH sum2.3.out => mux2.5.in1
net StepCordsML sum2.4.out => mux2.6.in0
net FeedHold xor2.0.out => motion.feed-hold
net CHLSwitched xor2.2.out => and2.1.in1
net ArcOKTimer oneshot.2.out => xor2.1.in0
net PierceLatch flipflop.1.out => mux2.0.sel oneshot.0.in
net IgnitionCounterS32 updown.0.count => conv-s32-float.0.in
net IgnitionCounterFloat conv-s32-float.0.out => comp.2.in1
net IgnitionTimerOff oneshot.1.out-not => updown.0.countup
net TorchOff not.2.out => flipflop.1.reset
net TorchTurnedOffOrTimeout or2.7.out => or2.6.in1
net IgnitionTimeout edge.0.out => or2.7.in1
net ExtinguishTimer oneshot.3.out edge.1.in
net ExtinguishLatch flipflop.2.out or2.8.in1
net ExtinguishTimeout edge.1.out flipflop.2.reset
net Timers or2.8.out => or2.4.in0
Last edit: 30 Sep 2018 07:30 by jimmyrig.
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Basic Configuration
- plasma arc goes out mid cut.... how to pause program, reprobe, and restart?
Time to create page: 0.158 seconds