Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 424

Table of Contents

Advertisement

3. Instructions
Function
SIGN(600) converts the 16-bit signed binary number in S to its 32-bit signed binary equivalent and
writes the result in R+1 and R.
The conversion is accomplished by copying the content of S to R and writing FFFF to R+1 if bit 15 of S
is 1 or writing 0000 to R+1 if bit 15 of S is 0.
If bit 15 of S is 1, FFFF is transferred to R+1.
If bit 15 of S is 0, 0000 is transferred to R+1.
nd
2
result word (R+1)
1
1
1
1
1
1
1
1
Example Programming
When CIO 0.00 is ON in the following example, SIGN(600) converts the 16-bit signed binary content of
D100 (#8000 = -32,768 decimal) to its 32-bit equivalent (#FFFF 8000 = -32,768 decimal) and writes
that result to D201 and D200.
0.00
388
1
1
1
1
1
1
1
1
D100
D200
D+1: D201
Source word (S)
1
0
0
0
0
0
0
0
0
The content of S is
transferred "as is" to R.
st
1
result word (R)
1
0
0
0
0
0
0
0
0
S: D100
Example: 8000 Hex
D: D200
CS/CJ/NSJ Series Instructions Reference Manual (W474)
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Advertisement

Table of Contents
loading

Table of Contents