Hello Guest it is June 18, 2019, 09:29:57 PM

Author Topic: Plasma Torch Start Macro  (Read 2619 times)

0 Members and 1 Guest are viewing this topic.

Plasma Torch Start Macro
« on: July 07, 2015, 06:40:03 PM »
Hello everyone.  I have been working on a M4 macro to start the torch on a plasma table running Mach3.  I think I've finally worked out all of the problems with it and would like to know how well you think it is written.

I look forward to hear what everyone has to say.

------------------------------------

'Macro to start plasma torch

'Checks dry run status
If GetOEMLED(52)Then
 Message "Dry Run"
Else

'Define
 Const PierceDlyDro = 177
 Dim PierceDly

'Read the PierceDlyDro
PierceDly = (GETOEMDRO(PierceDlyDro)* 1000)
Message "Using Pierce Delay of: " & (GETOEMDRO(PierceDlyDro)) & " Seconds"

'Main
DeActivateSignal(Output2)   'Turns off Rotary Cutter
ActivateSignal(Output3)   'Lowers head
Sleep (1000)   'Wait 1 second for the Torch Head to lower
StartTHC()
ActivateSignal (Output1)   'Turns on Torch
Sleep(GETOEMDRO(PierceDlyDro)* 1000)   'Pauses for pierce delay interval

'Wait for Arc OK signal
i = 0
While (Not GetOEMLED(36)) And (i < 400)   'Wait for Arc OK or 4 seconds
  sleep 10
  i = i + 1
Wend

'Arc OK/ No Arc routine
If GetOEMLED(36) Then
  Message "Arc Started"
 Else
  Message "Arc Failed"
  DeActivateSignal(Output1)   'Turn off torch
  DeActivateSignal(Output3)   'Raise head
  Code ("M30")
 END IF

end if

Offline BR549

*
  •  6,873 6,873
    • View Profile
Re: Plasma Torch Start Macro
« Reply #1 on: July 07, 2015, 07:40:06 PM »
Most of what you are doing is ALREADY controlled from inside of Mach3 OR from Gcode  so I am not sure what you are trying to do.

(;-) TP
Re: Plasma Torch Start Macro
« Reply #2 on: July 08, 2015, 04:20:11 PM »
TP

I tried to start the torch without doing all this work but I had nothing but problems.  I tried looking for setup instructions but only found bits and pieces without any clear explanation of how things are setup and what happens on the forum or in any documentation.  I've spent many many hours to get these machines running and this is what I've ended up with.

If you know of any instructions on how to setup the plasma torch to startup as described above in my M4 macro I would love to hear it.  The system is very simple:

1, an air cylinder to raise and lower the head,  Output 3
2, a relay to turn the torch on and off, Output 1
3, a relay to turn a rotary cutter on and off, Output 2
4, a set of contacts in the torch to signal Arc OK, Input 1 /THC On

That's it, it should be simple.  Instead i have had to create this monster code. It works and right now that is all I care about.

If you know of anything that describes how to set up starting up a plasma torch, I would LOVE to hear where I can find it.

Offline BR549

*
  •  6,873 6,873
    • View Profile
Re: Plasma Torch Start Macro
« Reply #3 on: July 08, 2015, 09:50:43 PM »
First you are going to have trouble FINDING the TOM(top of material) without Z axis control. THAT is assuming you don't have a Z.

Set up the ouputs to activate the air cylinder and torch on
Setup the input for arckOK signal (THCon)

Set up the M3 to activate the signals for air cylinder(lower torch), then activate the the Torchon signal.


Your gcode would be

G0 X10 Y10  ( move to cut start point()
M3  (lower cylinder and  torchON )
G4P1  ( pierce dwell)
G1 X20  (start cutting
etc
etc
M5  (torch off, raise torch)

When you have THCon turned on Mach3 senses for an arkOK signal, when found it allow Mach3 to start motion. IF you loose ArcOK it stops.

YOu can set up the rotary cutter as M4.


(;-) TP