EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 432

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
399
Conversion Instructions Section 3-11
Note R and R+1 must be in the same data area.
Description 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.
Flags
Example 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 equiva-
lent (#FFFF 8000 = –32,768 decimal) and writes that result to D201 and
D200.
Counter Area C0000 to C4095 C0000 to C4094
DM Area D0 to D32767 D0 to D32766
Indirect DM addresses
in binary
@ D0 to @ D32767
Indirect DM addresses
in BCD
*D0 to *D32767
Constants #0000 to #FFFF (binary) ---
Data Registers DR0 to DR15 ---
Index Registers ---
Indirect addressing
using Index Registers
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Area S R
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
The content of S is
transferred "as is" to R.
Source word (S)
1
st
result word (R)
2
nd
result word (R+1)
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.
Name Label Operation
Error Flag ER OFF
Equals Flag = ON if the result is 0000 0000.
OFF in all other cases.
Negative Flag N ON if bit 15 of R+1 is ON.
OFF in all other cases.
0.00
D100
D200
R+1: D201 R: D200
S: D100
Example: 8000 Hex

Table of Contents

Related product manuals