
4 PROGRAM CODES
4 - 2
NJ/NY-series G code Instructions Reference Manual (O031)
4-1
Calculation and Logic Operation
This operator adds numbers. This is a binary operator and cannot be used as a unary operator.
This operator subtracts numbers, or converts the polarity of a number. It performs subtraction when
used as a binary operator, or conversion when used as a unary operator.
This operator is a binary operator that multiplies numbers.
4-1-1
Operator priority
Priority
Operators
Combination order
High
- (Unary)
!
*, /, %
Left combination
+, -
Left combination
==, !=, <, >, <=, >=
&&
Low
||
4-1-2
Arithmetic operators
Addition (+)
L3=L1+L2 // OK
L2=+L1 // NG
L2=+1 // OK. Just numerical value
Subtraction and positive/negative inversion (-)
L3=L1-L2 // OK
L2=-L1 // OK
L2=-1 // OK. Just numerical value
Multiplication (*)
L3=L1*L2 // OK
Summary of Contents for NJ501-5300
Page 13: ...11 CONTENTS NJ NY series G code Instructions Reference Manual O031...
Page 28: ...Revision History 26 NJ NY series G code Instructions Reference Manual O031...
Page 40: ...2 G Code 2 2 NJ NY series G code Instructions Reference Manual O031...
Page 72: ...2 G Code 2 34 NJ NY series G code Instructions Reference Manual O031...
Page 108: ...3 M Code 3 2 NJ NY series G code Instructions Reference Manual O031...
Page 112: ...3 M Code 3 6 NJ NY series G code Instructions Reference Manual O031...
Page 124: ...3 M Code 3 18 NJ NY series G code Instructions Reference Manual O031...
Page 128: ...3 M Code 3 22 NJ NY series G code Instructions Reference Manual O031...
Page 136: ...4 PROGRAM CODES 4 8 NJ NY series G code Instructions Reference Manual O031...
Page 141: ......