3-2
Section
Temperature Sensor Units
213
02002
00207 (non-negative data)
00207 (negative data)
(6)
If the temperature data is non-negative, the
binary data in IR 202 and IR 201 is converted
to BCD and placed in DM 0101 and DM 0100.
(7)
If the temperature data is negative, the 2’s
complement data in IR 202 and IR 201 is
converted to binary data representing the
absolute value of the temperature input
and placed in HR 01 and HR 00.
(8)
The binary data in HR 01 and HR 00 is con-
verted to BCD and placed in DM 0101 and
DM 0100.
(9)
“1” is written to the bit in DM 0101
indicating negative data.
BCDL (59)
201
DM0100
CLC (41)
SBB (51)
DM0102
201
HR00
SBB (51)
DM0103
202
HR01
BCDL (59)
HR00
DM0100
MOVD (83)
#0008
#0300
DM0101
RSET 02002
Note
The BCDL(59) instruction is only available with the CPM2A and CPM2C.
The data movements corresponding to the numbers in the above ladder pro-
gramming example are illustrated in the following diagram.
IR 002: Leftmost 3 digits of temperature data
IR 002: Rightmost 3 digits of temperature data
(6)
If the temperature data is non-negative, the
binary data in IR 202 and IR 201 is converted
to BCD and placed in DM 0101 and DM 0100.
(8)
If the temperature data is negative, the binary
data in HR 01 and HR 00 is converted to BCD
and placed in DM 0101 and DM 0100.
(9)
If temperature data is negative, “8” is written here
(i.e., “1” is written to the bit indicating negative data).
(7)
The 2’s complement data in IR 202 and IR 201 is subtracted, as binary data,
from the data in DM 0103 and DM 0102 and placed in HR 01 and HR 00.
0
16
5
16
4
16
3
0
16
5
16
4
16
3
(2)
1
16
2
16
1
16
0
16
4
16
3
16
1
16
0
0
0
16
5
16
4
10
3
10
2
10
1
10
0
0/8
10
6
10
5
10
4
(4)
(5)
(3)
0
1
0
0
2’s complement data
0
0
0
0
2’s complement data
16
3
16
2
16
1
16
0
0
0
16
5
16
4
–
#0100
#0000
(1)
(1)
IR 200
IR 202
DM0101
IR 202
DM0103
IR 201
DM0102
HR 01
HR 00
IR 201
DM0100