420
G-language Commands
Section 7-3
7-3-20 G60: ARITHMETIC OPERATIONS
Performs arithmetic operations on position data and registers.
Format
G60_<first term = second term operator third term>
Operands
The following table shows the possible settings for the operands.
Description
This command performs arithmetic operations on numerical values, position
data, or the contents of registers. When the first term is a register, the second
and third terms will be integers. (Non-integer values are rounded to the near-
est integer.)
Example
If G60: E00 = 0.4 + 0.4 is executed, then zero will be substituted at E00.
When the first term is a position data address, the second and third terms will
be real numbers and values below the fifth decimal place will be rounded off.
Example
If G60: A0000 = 1.2345 x 1.01 is executed, then zero will be substituted at
A0000.
The possible values for the result are as follows:
–39,999,999 to –0.0001
0
0.0001 to 39,999,999
An error will occur if the first term’s data is not within the acceptable range.
The possible values for the first term are as follows:
When the first term is position data:
–39,999,999 to +39,999,999
When the first term is a register:
0000 to 1999
Registers are cleared to zero if the power is turned ON or the system is
restarted.
Substitute values when registers are used.
Programming Example
The following example shows subtracting 500 from the value at A1000 and
substituting the result at A0000.
:
:
N010
G60
A0000=A1000–500
:
:
Operand
Possible settings
First term
A0000 to A1999
E00 to E31
Second term
A0000 to A1999
E00 to E31
±
39,999,999
Operator
+, –, *, or /
(addition, subtraction, multiplication, or division)
Third term
A0000 to A1999
E00 to E31
±
39,999,999
Summary of Contents for CS1W-MC221 -
Page 1: ...Motion Control Units Cat No W359 E1 04 CS1W MC221 V1 421 V1 OPERATION MANUAL ...
Page 2: ...CS1W MC221 V1 421 V1 Motion Control Units Operation Manual Revised February 2008 ...
Page 3: ...iv ...
Page 5: ...vi ...
Page 11: ...xii ...
Page 15: ...xvi ...
Page 19: ...xx ...
Page 27: ...xxviii Conformance to EC Directives 6 ...
Page 133: ...106 Installation Section 2 2 2 2 4 Dimensions CS1W MC421 CS1W MC221 ...
Page 173: ...146 Connecting Peripheral Devices Section 2 7 ...
Page 227: ...200 Command Area Section 3 6 ...
Page 351: ...324 Interface Specifics Section 5 4 ...
Page 513: ...486 Absolute Encoder Interface Specifications Section 9 7 ...
Page 575: ...548 Error Log Section 12 6 ...
Page 589: ...562 Performance Appendix A ...
Page 655: ...628 Control Bit Flag Timing Charts Appendix E ...
Page 683: ...656 Origin Search Patterns Appendix F ...
Page 685: ...658 Encoder Divider Rate and Rotation Speed for OMRON Servo Drivers Appendix G ...