Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: jcoldon 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
-
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?
-
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
-
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
-
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
-
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?
-
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.
-
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
-
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
-
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
-
Okay. I'll walk you through it.
Open the screen editor. Operator --> Edit Screen
Then look at the attached pictures.
1. Be sure that you highlight the screen name at the top of the "screen tree manager".
2. Select the 2nd tab of the "Properties".
3. Open the PLC Script.
Put the code at the end of the PLC Script, just above the Last Line stuff from Mach4. As good practice. Put the Date and your initials by your new code to keep track of what you added. Exp. CB 3-7-18
-
I want to first thank you for your help. I can’t make this work I’m not a software person I’ve always been a hardware guy 30 years with communication equipment. I removed the code it does not do anything. I also can’t use input 1 2 3 there used for Torch high control. I made the inputs 4 still doesn't work out puts are fine after putting everything back .with no code I just tried to see if this would do a simple tool change just typing t2 m6 that does nothing. Funny thing I have mill loaded and a t2 m6 does a tool change on the screen but not with the arch pro screen that vital system has.I thinking vital system removed the tool change feather from the system. when I load there arch pro screen everything changes to their plasma setup they have arch pro on their site to down load free. But to use the THC it has to be turned on in the controller with a code they gave me after I paid for it. So I’m thinking maybe a tool change won’t work they have it locked I don't know.
I asked them they said they can do the feature for a price per hr. so I don't know I’m starting to hate Mach 4 to much bs to make it work the way I want. maybe there plasma screen will be fine I don't know what’s in it. I will say if they don’t put a feature in there for an engraver I know a lot of plasma guys that will not use it every one do the engraver off the z this is nothing new Linux is looking better I starting to see why command cnc got away from Mach went Linux. Maybe even a masso controller no pc needed... the whole way with the build Mach 4 has been a pain in the ass to setup the wire ing and the vital system controller was fine no problems there Mach 4 does not even have a post processor for sheet cam I have to use the Mach 3 one How long has this soft were been out there no post processor still for Mach 4. this is the stuff I went through the last several months just basic setup information is not there. Sorry for my rant this is why people are just not going to go Mach 4 I can’t even get help. I guess if I want to keep going down the Mach 4 path I have to pay vital systems to build me a setup for it if I knew what the new plasma screen had I would wait on it The funny thing the built in engraver that’s in Mach mill works fine its new with the latest down load But it only does what you type in the box its useless. unless you just want like a serial number I sure the mach 4 program is grate if you’re a lua programmer. all us users are not. the cad drawing programs are enough Mach 4 needs to be easier to use and setup im getting ready to do a mill retro I don’t think im going to use mach 4 and im tired of support telling me to read the manual who understands how to deal with all the code crap in there its stupid Again im sorry its not your fault cbyrdtropper I just had enough goofing around with the mach program I use it like it is and build another controller that I can setup easyer with no mach in it
I see why the mill maker like HAAS went linux
Thanks Jeff coldon
-
Jeff. I understand your frustration. It just takes time to learn things.
Mach4 is very powerful and very flexible. There is an entire thread on the forum about people's opinions. In whether Mach is hobby or not. Part of your frustration you have mentioned has not be uncommon among users. It's the amount of time you want to spend making something to fit your exact needs.
I'm still willing to help you get this engraver working. Maybe send over your plasma profile that is working without the engraver and I can see if I can add in a tab for the engraver information. I'm and an advocate for Mach4, and I want to see them grow more.
-
ok I can give you what you need were can I send the file I assume you want the pro I have an email of koollakes@koollakes.com if you want to use that I can reply I can copy to a thumb drive
un less you want me to post the filr on hear that's fine
-
im happy to report my vital system hilcon controller and arch pro plasma screen can now change tools . with the m6 command thanks to Cbyrdtopper who did the code I will say I learned a lot
of how things work in mach 4 now when activating a code in sheet cam my x y z now responds to the tool offset triggers an out put and has a button for over ride
and works fine now I have the ability to have 99 tools don't need that many in plasma lol