8-45
8 Using Expansion Units and Expansion I/O Units
CP1E CPU Unit Hardware User’s Manual(W479)
8-4
T
e
mp
eratu
re
Se
n
s
o
r U
n
it
s
8
8-4-4
F
lo
w
o
f O
p
e
rat
ion
(b) The following programming example shows how to convert the data for tempera-
ture input 0 to BCD and store the result in D0 and D1. “#0001” is stored in D1
when the input data is a negative value. The following system configuration is
used.
(6) Programming with BCD Instruction
Temperature unit setting 0(°C)
Two-decimal-place
Mode
0 (normal)
Input range setting
1 (Pt100: -200.0 to
650.0°C)
Input 0
CIO 2
CP1E CPU Unit
CP1W-TS001/101
Temperature Sensor Unit
Inputs
Outputs
CIO 0
CIO 1
CIO 100
CIO 101
CIO 2
CIO 3
None
002
#7FFF
W0.00
CMP
W0.00
2
#7FFE
Always ON
P_On
CMP
Detects completion of input 0 initialization.
P_EQ
W0.01
2
D0
BCD
2.15
#0000
2
-C
P_EQ
2.15
#0000
D1
MOV
CLC
D0
D0
D0
BCD
#0001
D1
MOV
Execution
condition
ON when input 0 has been initialized
Detects an open-circuit alarm or Unit
error by checking whether the error code
7FFF has been output
ON when an open-circuit alarm or Unit
error has been detected for input 0.
Stores positive BCD data in D0.
Stores #0000 in D1.
When input 0 converted value is negative
(#0000 minus two’s complement = actual
value)
Stores negative BCD data in D0.
Stores #0001 in D1 to indicate a
negative number.
P_EQ
Summary of Contents for CP1E-E10DT-A
Page 3: ......
Page 31: ...26 CP1E CPU Unit Hardware User s Manual W479...
Page 273: ...Index 4 CP1E CPU Unit Hardware User s Manual W479...
Page 275: ...Revision 2 CP1E CPU Unit Hardware User s Manual W479...
Page 276: ......