Hello Guest it is December 16, 2019, 03:18:56 AM

Author Topic: m03 floating head programing  (Read 19724 times)

0 Members and 1 Guest are viewing this topic.

m03 floating head programing
« on: May 11, 2012, 10:44:07 PM »
I need some help programing the m03 macro

I want my torch to come down and touch the plate until the switch is triggered then retract to Pierce height.

I have my switch connected to the mach3 probe input

I guess I need to know
how to make the torch move up and down
how to read the switch
how to zero the z axis
How to put a value into the z axis

Any help would be greatly appreciated

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: m03 floating head programing
« Reply #1 on: May 11, 2012, 11:25:08 PM »
You really don't want it to do it EVERY time the M3 is called(;-) do you??? You will spend more time finding the TOM than cutting.

Just a thought, (;-) TP

Re: m03 floating head programing
« Reply #2 on: May 11, 2012, 11:28:13 PM »
I am cutting some thin plate that warps so yes I want to set my z axis to proper Pierce height every time
Re: m03 floating head programing
« Reply #3 on: May 11, 2012, 11:31:28 PM »
I have a proma Thc so I do not have a problem with cutting just tired of having to baby sit the machine when making multiple cuts
« Last Edit: May 11, 2012, 11:33:32 PM by shag »

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: m03 floating head programing
« Reply #4 on: May 12, 2012, 12:03:57 AM »
This should get you close to what you wanted. You will have to adjust the switch offset to match your machine and the Feedrate to what you want.

'M3 Macro for TOM G31 Version
Cfr = GetDro(18)
Code"G31 Z-5 F20"
While Ismoving()
Wend
Code"G92 Z0"
While Ismoving()
Wend
Code"G0 Z .080"     'Switch offset
While Ismoving()
Wend
Code"G92 Z0.000"
While Ismoving()
Wend
COde" G0 Z0.120"    'Pierce Height
While Ismoving()
Wend
SetDro(18,Cfr)
While Ismoving()
Wend
DoOemButton(110)  'Fires Torch reset THC height
END

Re: m03 floating head programing
« Reply #5 on: May 12, 2012, 12:08:15 AM »
Thank you
Re: m03 floating head programing
« Reply #6 on: May 12, 2012, 11:41:12 PM »
The code worked perfectly. Thank you so much

Offline Tony Spencer

*
  •  8 8
  • Male Ipswich suffolk
    • View Profile
Re: m03 floating head programing
« Reply #7 on: May 13, 2012, 10:05:40 AM »
Hi
Re MO3 macro, could the G31 be replaced with G28.1 ? I have read that the G28.1 might be better in this sort of routine. Do you have a G28.1 version of the macro?
I am new to plasma and any help would be appreciated.

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: m03 floating head programing
« Reply #8 on: May 13, 2012, 10:27:05 AM »
YES the G28.1 can be used BUT with a G31 routine you can STILL have the Z home to the top AND the G68 part rotation will work. With the G28.1 method those 2 functions will not work.

G28.1 version

'M3 Macro for TOM G31 Version
Cfr = GetDro(18)
Code"G28.1 Z0 "
While Ismoving()
Wend
Code"G92 Z0"
While Ismoving()
Wend
Code"G0 Z .080"     'Switch offset
While Ismoving()
Wend
Code"G92 Z0.000"
While Ismoving()
Wend
COde" G0 Z0.120"    'Pierce Height
While Ismoving()
Wend
SetDro(18,Cfr)
While Ismoving()
Wend
DoOemButton(110)  'Fires Torch reset THC height
END

Offline Tony Spencer

*
  •  8 8
  • Male Ipswich suffolk
    • View Profile
Re: m03 floating head programing
« Reply #9 on: May 13, 2012, 02:18:16 PM »
Thanks for the prompt reply. I have a floating head switch so z homes to the surface plus some free travel and then trips. On the mach plasma screen I have added four extra DRO, Pierce height, Pierce delay, Cut height and z offset. Reading some of your old post and others, on plasma set up, I am trying to understand the code.
At the moment I have a macro adapted from one that I think was written by you (not sure):-
PierceHeight =GetUserDRO(1000)
CutHeight= GetUserDRo(1001)
PierceTime=GetUserDRO(1002)
Zoffset=GetUserDRO(1003)
Code “G28.1Z0”
While IsMoving( )
Wend
Code”G92 Z0” (set z to 0)
While IsMoving( )
Wend
Code”GO Z”&Zoffset ( Retract to top of material)
While IsMoving( )
Wend
Code”G92 Z0” (set z to 0)
While IsMoving( )
Wend
Code”GO Z”&PierceHeight
While IsMoving( )
Wend
DoSpinCW( )  (Turn torch on)
While IsMoving( )
Wend
Code”G4P”&Pierce Time (Pierce delay)
While IsMoving( )
Wend
Code”GOZ” &CutHeight (Go to cut height)
While IsMoving( )
Wend
End
If I run this macro step by step in the VB editor it appears to run OK but on the actual machine I get variable results in the cut height setting. Very new to macros and on a steep learning curve! Is the macro correctly structured?
Thanks for your help