Hello Guest it is July 12, 2020, 04:18:54 PM

Author Topic: mach 4 plasma tool change engraver setup  (Read 1436 times)

0 Members and 1 Guest are viewing this topic.

mach 4 plasma tool change engraver setup
« on: March 06, 2018, 08:44:30 PM »
I have a mach 4 vitalsystem controller hilcon   I trying to figure out how to add an engraver  what I figured out so far.     is if I do an m6 T2 in the mdi  the screen changes to the T 2 tool.    I assume the off set settings in the tool list for x y z.  so what ever I put in there the tool  the x y z will move to when M6 T2 in pushing cycle start.   then I will need to add a button to turn on an output  and add that command to the M6 t2 command   then an off command also  is this correct    I using sheet cam  so if I add a code for M6 T2 it should move
to the settings in the tool set for the x y z  then turn on the engraver then turn off after cycle    is this correct   I not sure what I am doing   realy not sure how to setup the on off commands   
Re: mach 4 plasma tool change engraver setup
« Reply #1 on: March 06, 2018, 09:41:34 PM »
jcoldon,
As far as the offset for X, Y, and Z; Yes.  When you're Sheet Cam posts out code, make sure it outputs a G43 H2 after the T2M6 line; this will turn on cutter compensation.  It also adjust the X and Y position.  I just tested this myself.

There are more than a couple ways to turn on and off the engraver.  Turning it on should be pretty easy.  Turning it off will be the challenge.

When do you want it to turn off? 
  


Chad Byrd
Re: mach 4 plasma tool change engraver setup
« Reply #2 on: March 06, 2018, 09:49:12 PM »
One way to do it is to add an M64 P# (# being the output for your engraver) to turn on your engraver.  M65 P# to turn off your engraver.

Example:
T2M6
G43 H2
M64 P1 (Output 1 On)
ENGRAVE CODE HERE
M65 P1 (Output 1 Off)
M30
Chad Byrd
Re: mach 4 plasma tool change engraver setup
« Reply #3 on: March 06, 2018, 09:54:57 PM »
I would engrave first then do a cut if I cut a part  so it would turn off after it does the engraving  code   putting in codes in sheet cam seams easy I can make a sniplet and in cert it in the layer    
 so what you said above is if I do an m6 t2 in the mdi it just changes the tool does not go to its off set   but if I put in m6 t2 g43 h2  it will change and go to what ever I put in the x y z  there are off set settings in mach for this  so I wont need the offsets in sheet cam
then once I built a togel switch assign an output  I could use the code in m6 window to turn on  then to turn off ill have to do some thing some thing else

what controller you using for this  you doing plasma
Re: mach 4 plasma tool change engraver setup
« Reply #4 on: March 06, 2018, 10:06:16 PM »
I try this tomorrow in mdi       I can make this code in sheet cam as a snippet  and do the off snippet in the layer before  the cut starts   once it turns off I assume the tool moves the off set back
I don't use torch THC in sheet cam  just THC on and THC off  vital systems hilcon does it on the screen  so it makes it easy   
 
Re: mach 4 plasma tool change engraver setup
« Reply #5 on: March 06, 2018, 10:11:28 PM »
I don't do plasma.  I'm using the HiCON Controller from Vital System for some mills and lathes.

You can set the X, Y, and Z Offsets in the tool table in Mach4.  You will have to open the tool table; open the view tab; and select the Optional Fields.  This allows you to see and utilize the X and Y Offsets.  The Z offset is the tool length.

As far as turning on and off the engraver.  You can add some code to the PLC script in the Mach4 screen that turns on the Engraver Output while T2 is active and will shut off while T2 is not active.   This will be a very easy snippet of code to add to the PLC script.

There is a potential problem with this code, this will keep the engraver on as long as T2 is active.  So anytime T2 is active, your engraver will be on.  Is that okay?
Chad Byrd
Re: mach 4 plasma tool change engraver setup
« Reply #6 on: March 06, 2018, 10:18:33 PM »
Here is the code to turn the engraver on while T2 is active.  Add this towards the end of the PLC Script in the screen editor.

local tool = mc.mcToolGetCurrent(inst)
local Engraver = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT1)
if tool == 2 then
     mc.mcSignalSetState(Engraver, 1)
else
     mc.mcSignalSetState(Engraver, 0)
end       


What I would also do is add a button that will toggle an input on and off.  This input will override the engraver output.
That way you can turn off the engraver if you don't need it on while T2 is active. 
I'll work on some code for this and get back with you.
Chad Byrd
Re: mach 4 plasma tool change engraver setup
« Reply #7 on: March 06, 2018, 10:28:14 PM »
the engraver can only go on when its ready to cut  and off when finished   because it has a air slide that activates when in goes on  the z has do drop to a set point.  then when it goes on with air then it drops down all the same time  wile its running.. its just a air valve
if it goes on before the gantry gets to the start point it will drag  I has to go on at the start point and off at the finish point 
Re: mach 4 plasma tool change engraver setup
« Reply #8 on: March 06, 2018, 10:45:45 PM »
Okay.

Still.  Just because, it's good to learn new things.   Here is the new PLC Script Code

local tool = mc.mcToolGetCurrent(inst)
local Engraver = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT1)

local hSig = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT1)
local Input1State = mc.mcSignalGetState(hSig)
if Input1State == 1 then
     if tool == 2 then
         mc.mcSignalSetState(Engraver, 1)
     else
         mc.mcSignalSetState(Engraver, 0)
     end
else       
     mc.mcSignalSetState(Engraver, 0)
end


and then make a button that has this code in it.  It will toggle Input1 on and off.  Input 1 on allows the engraver to be turned on.  Input 1 off overrides the engraver and shuts it off.

local inst = mc.mcGetInstance()

local Input1 = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT1)
local hSig = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT1)
local State = mc.mcSignalGetState(hSig)
if State == 1 then
     mc.mcSignalSetState(Input1, 0)
else
     mc.mcSignalSetState(Input1, 1)
end       
Chad Byrd
Re: mach 4 plasma tool change engraver setup
« Reply #9 on: March 06, 2018, 11:21:17 PM »
im not sure were to install this plc code  im confused          I thaught I would use the t2 m6 code g 43 h2 in the script in sheet cam to make the tool active  then add a togel button for on and off  for in put 1  I got that 

then the  script plc script turns on out put 1  the code were does it go in out put 1  not sure