Hello Guest it is December 08, 2024, 12:31:54 AM

Author Topic: "Plasma torch" and "marking torch" offsets.  (Read 4629 times)

0 Members and 1 Guest are viewing this topic.

"Plasma torch" and "marking torch" offsets.
« on: July 25, 2009, 08:09:11 AM »
Do you have any ideas on how the following will be done?
Suppose that we have "plasma cutting" and "plasma marking" torches, both to a machine.
First the marking should be done and after the cutting.

The G code has "macro" commands before and after marking.
The Zero point is given at the cutting torch.
So, before marking, there should be an offset movement (this will be the distance between cutting and marking at both axis).
And after marking, also there should be a movement back to the original values.

Has anybody faced that?
Any ideas would be helpfull.

I allready have tried the following:
This is before marking:
a=GetOEMDRO(83)
b=GetOEMDRO(84)

c=GetUserDRO(2012) 'axonas X offset plasma
d=GetUserDRO(2013) 'axonas y offset plasma

e=a+c
f=b+d

SetDro(0,e)
SetDro(1,f)

code "G0 X" &a
code "G0 Y" &b
While ismoving()
Wend


And this is after marking:
a=GetOEMDRO(83)
b=GetOEMDRO(84)

c=GetUserDRO(2012) 'axonas X offset plasma
d=GetUserDRO(2013) 'axonas y offset plasma

e=a-c
f=b-d

SetDro(0,e)
SetDro(1,f)

code "G0 X" &a
code "G0 Y" &b
While ismoving()
Wend


Re: "Plasma torch" and "marking torch" offsets.
« Reply #1 on: July 28, 2009, 07:50:19 AM »


Finally, found a solution:

Before "marking" is executed the following code

a=getuserdro(2012)  'gets the X offset from a user DRO
b=getuserdro(2013)  'gets the Y offset from another user DRO
code "G91"  'enables incremental movement
code "G0 X" &a &"Y" &b   'moves the machine exactly as the user offset DROs
While ismoving()
Wend
code "G90"   'enables absolute movement
setoemdro(47,a)  'sets work X offset as the user DRO
setoemdro(48,b)  'sets work Y offset

And after "marking" the next

a=getuserdro(2012)
b=getuserdro(2013)
code "G91"
code "G0 X" &-a &"Y" &-b  'moves the same distance back
While ismoving()
Wend
code "G90"
setoemdro(47,0) 'resets the work offsets
setoemdro(48,0)

My VB is awfull, i know...  ;D

Regards, giannis.
If you have any better solution, please let me know...