Hello Guest it is December 08, 2024, 04:30:04 AM

Author Topic: Button Problem- Cannot use g53 incremental  (Read 6541 times)

0 Members and 1 Guest are viewing this topic.

Button Problem- Cannot use g53 incremental
« on: December 10, 2010, 07:35:52 AM »
Hi All

I have created a button on my manual screen to move the machine to my regular start position. However, it gives an error message "Cannot use g53 incremental "
If I replace the g53 with g91 it works perfectly, but i need the machine to move to an absolute position! Please help?

Herewith my code for the button:


'Moves machine to an slab Start Position
Dim Action As String
Dim Machine_Z,Stone_Thick,Above_Stone,Tool_Table,Home_Z,SafeJOG_Z,x_move,y_move,z_move,a_move As Double


x_move = 200
y_move = 200
z_move = 0
a_move = 0
Machine_Z = GetABSPosition(2)
'MsgBox "Machine Z is " & Machine_Z
Stone_Thick = GetOEMDRO(2000)
'MsgBox "Stone_Thick is " & Stone_Thick
Tool_Table = GetOEMDRO(2001)
'MsgBox "Tool_Table is " & Tool_Table
Above_Stone = GetOEMDRO(2002)
'MsgBox "Safe height above stone is " & Above_Stone
Home_Z = 0
SafeJOG_Z = Stone_Thick + Above_stone - Tool_Table
'MsgBox "SafeJOG_Z is " & SafeJOG_Z & " and Home_Z is " & Home_Z

Action = "G53G0X" & x_move & "Y" & y_move & "Z" & z_move & "A" & a_move
'msgbox "Action is " & Action

If Machine_Z < SafeJOG_Z Then
MsgBox "Move Blade above stone first to Safe height of at least " & SafeJOG_Z
Else
Code Action
End If