next up previous contents index
Next: 13.3 Changing Variable Values Up: 13. Programming With Variables Previous: 13.1 Types of Variables   Contents   Index

13.2 Units of Variables

No units are implied by the value assigned to a variable. Variables simply contain numbers. As an example, if variable #1000 as we have defined it above were referenced in a part program after a (g) as we have done in the following line, it would refer to a coordinate system. In this case g55.

G#1000

If it were referenced after an (x, y, or z) it would refer to a positive distance on the named axis. That distance would depend on whether you had defined distance in inches or millimeters or some other unit.

X#1000

If #1000 were referenced after a (b) for a rotary axis it would refer to a positive rotation of 55 degrees. And if it were referenced after a (t) it would refer to a tool slot.

T#1000 M6

One consequence of the valuelesness of variables is that they will change meaning when you change from inches to millimeters in a program.


next up previous contents index
Next: 13.3 Changing Variable Values Up: 13. Programming With Variables Previous: 13.1 Types of Variables   Contents   Index
root 2003-05-26