1. ## macro variables

Certain variables are always integer (such as a loop counter), and certain others are always real (such as an axial distance). Is a differentiation made between integer and real macro variables? For example, is the following a valid statement:
#100=1.0
G#100 X... Y... F...
Is this a valid G01 statement or we have to define #100=1 (an integer)?
Are 1.0 and 1 always equivalent in macro expressions, the control automatically interpreting it as either real or integer, as appropriate?

2. That would be an ok statement for that varaible. I have gone as far as this:

G#100 X#101 Y#102 Z#103 A#104 C#105 F#106 S#107 M#108

#100 = 1
#101 = 3.5
#102 = 2.5
#103 = 1.
#104 = 45
#105 = 15
#106 = 4000
#107 = 40000
#108 = 303

3. You can also use it for drill cycles

#1=73.

G#1

4. Ok. So, it is automatic 'rounding' of macro variables whereever appropriate (1.0 being interpreted as 1, to suit a G code). But is it true for non-macro statements also? For example, can you please check on your machine if G1.0 does not give any error, and is same as G01? I am making this request because the original Fanuc control is not accessible to me at this point of time.

5. G1.0 is not a valid G-code on any Fanuc (as far as I know), so it should result in an error (P/S 010 on 16i, 18i, and 21i, for example).

If you assign #100=1, or #100=1., or #100=1.0, then G#100 is a valid g-code because the value of 1 is used. If you assign #100=1.1 then you should get an alarm when G#100 is read.

6. Originally Posted by dcoupar
G1.0 is not a valid G-code on any Fanuc (as far as I know), so it should result in an error (P/S 010 on 16i, 18i, and 21i, for example).

If you assign #100=1, or #100=1., or #100=1.0, then G#100 is a valid g-code because the value of 1 is used. If you assign #100=1.1 then you should get an alarm when G#100 is read.
Thanks. You have exactly answered my query.
Actually, in any high-level computer language, you cannot give a real value in place of an integer value (though integer for real is permitted), and this was the source of my confusion.