Hello Guest it is March 28, 2024, 08:13:29 AM

Author Topic: How to add 1 to axis movment inline ?  (Read 2958 times)

0 Members and 1 Guest are viewing this topic.

How to add 1 to axis movment inline ?
« on: May 04, 2007, 05:17:21 PM »
I got a program SOMTHING like this (SEE BELOW)

I'm trying to route LEVEL my work area.

I must add 1 to Y position and move Y 1 position more each loop
I do ... g00 y[+#1]  (Where #1 = 1 each loop and adds to the current value of Y)

and it's an error on the line.

I got to use a variable in the line position that changes each time I call the routine.

How do I do it ?

Thanks.


--------------------------------------------------
M98 P1001 L11.9844

M30
O10001

M98 P1002 L1
M98 P1003 L1

g00 x0
M99
;-------------------------
O1002
g00 x-1  (only moving 1.0 units)
M99

;-------------------------
O1003
g00 y[+#1]     ; THIS IS AN ERROR HERE HOW DO I DO IT ?
M99

« Last Edit: May 04, 2007, 05:20:59 PM by deleteallusers »

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: How to add 1 to axis movment inline ?
« Reply #1 on: May 05, 2007, 02:03:19 PM »
Try it like this :-

O1003
#1=#1+1
g00 Y#1     ; THIS IS AN ERROR HERE HOW DO I DO IT ?
M99

or

O1003
G91
G00 Y1.
G90
M99

Graham.
« Last Edit: May 05, 2007, 02:08:47 PM by Graham Waterworth »
Without engineers the world stops