521
Temperature Sensor Units
Section 9-5
2.
The following programming example shows how to convert the data for
temperature 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.
Programming with BCD(24) 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
CP1L-EM CPU Unit
with 40 I/O points
CP1W-TS001/101
Temperature Sensor Unit
Inputs
Outputs
CIO 0
CIO 1
CIO 100
CIO 101
CIO 2
CIO 3
None
2
#7FFF
1000.00
CMP(020)
1000.00
2
#7FFE
Always ON
P_On
CMP(020)
Detects completion of input 0 initialization.
P_EQ
100.00
2
D0
BCD(024)
2.15
#0000
2
−
(410)
P_EQ
2.15
#0000
D1
MOV(021)
D0
D0
D0
BCD(024)
#0001
D1
MOV(021)
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.
Summary of Contents for CP1L-EL20DR-D
Page 3: ...CP1L EL20D CP1L EM30D CP1L EM40D CP1L EL EM CPU Unit Operation Manual Produced July 2017...
Page 4: ...iv...
Page 10: ...x...
Page 22: ...xxii...
Page 34: ...xxxiv Software Licenses and Copyrights 7...
Page 192: ...158 Trial Operation and Debugging Section 5 3...
Page 250: ...216 Automatic Clock Adjustment and Specifying Servers by Host Name Section 6 7...
Page 666: ...632 Trouble Shooting Section 11 7...
Page 696: ...662 Standard Models Appendix A...
Page 805: ...771 Connections to Serial Communications Option Boards Appendix F Connecting to Unit...
Page 806: ...772 Connections to Serial Communications Option Boards Appendix F...
Page 836: ...802 PLC Setup Appendix G...
Page 838: ...804 TCP Status Transitions Appendix H...
Page 840: ...806 Ethernet Network Parameters Appendix I...
Page 842: ...808 Buffer Configuration CP1L EL EM Appendix J...
Page 844: ...810 Ethernet Specifications Appendix K...
Page 851: ...Index 817 work words 118 write protection 447...
Page 852: ...818 Index...
Page 854: ...820 Revision History...
Page 855: ......