Supplementary example, Supplementary example -3, Application setup (eight channels °c or °f) – Rockwell Automation 1746-NR8 SLC 500 RTD/Resistance Input Module User Manual User Manual
Page 95

Publication 1746-UM003A-EN-P
Application Examples 7-3
Figure 7.2 Program to Convert F to BCD
Table 7.2 Data Table
Supplementary Example
Application Setup (Eight Channels °C or °F)
The following illustration shows how to display the temperature of several
different RTDs at one annunciator panel. A selector switch (I:2/0) allows the
operator to choose between displaying data in °C and °F. Each of the displays is
a 4-digit, 7-segment LED display with the last digit representing tenths of a
degree. The displays have dc-sinking inputs and use a BCD data format.
15
] [
S:1
MOVE
Source
N10:0
Dest
O:3.0
MOV
TO BCD
Source
I:3.0
Dest
N7:0
TOD
MASKED MOVE
Source
N7:0
Mask
0FFF
Dest
O:2.0
MVM
END
First Pass Bit
Initialize Channel 0 of
RTD Module.
Rung 2.0
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.
(1)
(1) The use of the masked move instruction with the OFFF 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 through 11.
Rung 2.2
address 15 data 0 address 15 data 0
N10:0 0000 1001 0001 0001