Chapter 8
Application Examples
8–3
Program Listing
Since a 7–segment LED display is used to display temperature (Figure 8.1),
the temperature data must be converted to BCD. The 16–bit data word
representing the temperature value is converted into BCD values by the
program shown in Figure 8.3.
Figure 8.3
Program to Convert
°
F to BCD
15
Rung 2.0
First Pass Bit
] [
S:1
MOVE
Source
N10:0
Dest
O:3.0
Initialize Channel 0
of RTD Module.
MOV
Rung 2.1
Convert the channel 0 data word (degrees F) to BCD values and write this to the LED display. If channel 0 is
ever disabled, a zero is written to the display.
TO BCD
Source
I:3.0
Dest
N7:0
TOD
MASKED MOVE
Source
N7:0
Mask
0FFF
Dest
O:2.0
MVM
➀
➀
The use of the masked move instruction with the 0FFF mask allows you to use outputs 12, 13, 14, and 15 for
other output devices in your system. The 7–segment display uses outputs 0–11.
Rung 2.2
END
Data Table
address 15 data 0 address 15 data 0
N10:0 0000 1001 0001 0001
Содержание SLC 500 1746-NR4
Страница 1: ...User Manual SLC 500t RTD Resistance Input Module Cat No 1746 NR4 Allen Bradley AB Spares ...
Страница 15: ...Preface P 8 Notes AB Spares ...
Страница 37: ...Chapter 2 Quick Start 2 12 Notes AB Spares ...
Страница 63: ...Chapter 4 Preliminary Operating Considerations 4 12 Notes AB Spares ...
Страница 87: ...Chapter 5 Channel Configuration Data and Status 5 24 Notes AB Spares ...
Страница 107: ...Chapter 7 Module Diagnostics and Troubleshooting 7 8 Notes AB Spares ...
Страница 117: ...Chapter 8 Application Examples 8 10 Notes AB Spares ...
Страница 123: ...Appendix A Specifications A 6 Notes AB Spares ...
Страница 125: ...Appendix B RTD Standards B 2 Notes AB Spares ...