Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: adscnc on February 12, 2016, 08:45:41 AM

Title: Arc ok signal in Mach4
Post by: adscnc on February 12, 2016, 08:45:41 AM
I have a CSMIO system set up and running.
I will be using in on a small plasma table, I do not want to use THC.

My process is:

Torch moves to position.
Torch moves to pierce height.
Fires torch (m03)
Waits for ARC OK (good arc)  ( digital input signals to 1 and 14?)
System pauses for pierce time (g04 p1.0)
Torch moves to cut height
Torch cuts part.

How best do I setup it so that it waits for the waits for "ARC OK" before  proceeding?

Many Thanks
Title: Re: Arc ok signal in Mach4
Post by: DazTheGas on February 12, 2016, 01:45:09 PM
If you already have a way of getting the signal into mach4 then you could add to the m03 at the end mc.SignalWait command to halt all untill the ARC OK signal is recieved.

DazTheGas
Title: Re: Arc ok signal in Mach4
Post by: adscnc on February 12, 2016, 03:58:07 PM
Yes do have a way of getting signal in, but not totally up to speed with scripting.
what would it look like exactly ?
Title: Re: Arc ok signal in Mach4
Post by: DazTheGas on February 12, 2016, 04:21:27 PM
If you go into the docs directory of mach4 and open the api docs there is an example there on how to use it, just change the input1 its using to the input you are using, but because you are waiting for a signal you must change the time setting to something more realistic or it will timeout too  fast.

you will need to put this as the last line of the m3 function not last line of script.

DazTheGas
Title: Re: Arc ok signal in Mach4
Post by: adscnc on February 13, 2016, 12:11:37 PM
Thanks Daz
Some good progress.

I have it waiting for 20 secs (test). if I give it a signal during the 20 secs we get motion which is great.
However after 20 secs if no signal is received  it moves anyway which is not what I want.
I also want motion to stop if the signal is lost at any time.

Hope you can help?

Cheers.
Al.
Title: Re: Arc ok signal in Mach4
Post by: BR549 on February 13, 2016, 12:25:25 PM
GUYS Teh ArcOk signal is an internal function of teh controller. YOU should not have to program for it as it runs automatically when the THC function is turned on. With THC on the lack of teh signal simply blocks motion until it sees it. AND IF you loose teh signal it will stop motion again.

Just a thought, (;-) TP
Title: Re: Arc ok signal in Mach4
Post by: adscnc on February 13, 2016, 12:45:30 PM
Ok, I understand that.
But, I don't want to run an actual THC system.
Will it be alright to fool in it some way ?
Title: Re: Arc ok signal in Mach4
Post by: adscnc on February 13, 2016, 12:47:31 PM
A bit more info.
It is a very,very small table. It does not need thc, in fact there is no Z axis.
Title: Re: Arc ok signal in Mach4
Post by: BR549 on February 13, 2016, 12:50:15 PM
IF you have no Z then having the THC on is not a problem (;-)
Title: Re: Arc ok signal in Mach4
Post by: BR549 on February 13, 2016, 01:07:58 PM
I would suggest you talk to CS about how best to handle teh function as THEY are the one that writes teh plugin to control it.

(;-) TP
Title: Re: Arc ok signal in Mach4
Post by: DazTheGas on February 16, 2016, 02:57:41 AM
Sorry been snowed under this end,

Have a look at the example again, its using the switch command so you can convert this in lua to an if statement.

use it in the form of

rc = mc.mcSiganalWait..........
if rc == MERROR_TIMED_OUT then
disable machine and update history with error
else
continue with gcode
end

DazTheGas