Com (2’s complement), Function, N is a number – Yaskawa LEGEND-MC User Manual
Page 94
Advertising
84
LEGEND-MC User’s Manual
@COM (2’s Complement)
[Function]
DESCRIPTION:
@COM returns the complement of a number or variable which is inserted in square brackets. Note that the
@COM command is a function, which means that it does not follow the convention of other commands,
and does not require the underscore when used as an operand.
ARGUMENTS: @COM [n]
where
n is a number
USAGE:
EXAMPLES:
While Moving
Yes
Minimum n value
-2147483647.9999
In a Program
Yes
Maximum n value
2147483647.9999
Not in a program
Yes
Default Value
---
Can be Interrogated
No
Default Format
---
Used as an Operand
Yes
Distributed Control
No, Local
#TEST
Program TEST
VAR1=1234
Set variable
MG @COM[VAR1]
Display the complement of 1234
VAR2=@COM[VAR1]+99
Perform calculation
EN
End of program
Advertising