Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 690

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Data Control Instructions
Operands
Operand Specifications
Description
The contents of the three words starting with the first parameter word (P1) are
shown in the following diagram.a
15
P1
Offset of linear function
8000 to 7FFF (signed binary)
15
P1+1
X
8000 to 7FFF (signed binary)
15
P1+2
Y
0000 to 9999 (BCD)
Area
CIO Area
Work Area
Holding Bit Area
Auxiliary Bit Area
Timer Area
Counter Area
DM Area
Indirect DM addresses
in binary
Indirect DM addresses
in BCD
Constants
Data Registers
Index Registers
Indirect addressing
using Index Registers
SCL2(486) is used to convert the signed binary data contained in the source
word S into signed BCD data (the BCD data contains the absolute value and
the Carry Flag shows the sign) and place the result in the result word R
according to the linear function defined by the slope ( X, Y) and an offset.
The address of the first word containing X, Y, and the offset is specified for
the first parameter word P1. The sign of the result is indicated by the status of
the Carry Flag (ON: negative, OFF: positive).
The following equations are used for the conversion.
Y
R = BCD conversion of
X
The slope of the line is
Y/ X.
0
0
0
S
CIO 0 to
CIO 0 to
CIO 6143
CIO 6141
W0 to W511
W0 to W509
H0 to H511
H0 to H509
A0 to A959
A0 to A957
T0000 to T4095
T0000 to T4093
C0000 to C4095
C0000 to C4093
D0 to D32767
D0 to D32765
@ D0 to @ D32767
*D0 to *D32767
---
DR0 to DR15
---
---
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
x ((BCD conversion of S) – (BCD conversion of offset)
Section 3-17
P1
R
CIO 0 to
CIO 6143
W0 to W511
H0 to H511
A448 to A959
T0000 to T4095
C0000 to C4095
D0 to D32767
DR0 to DR15
657

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents