Rockwell Automation 1772-LS_LSP,D17726.8.6 PROG/OPER MANUAL-MINI PLC-2/05 User Manual
Page 214

Programming Techniques
Chapter 18
18-6
Connect a thermocouple to an input module which measures Celsius
temperature. A block transfer read transfers the temperature into the
processor’s data table.
Convert the recorded Celsius temperature in the data table to Fahrenheit
values for display (Formula:
o
F = (9/5
o
C) + 32). This temperature must
maintain certain range values for your application. You want to:
monitor the temperature between 87
o
to 100
o
C
count the times the value falls below 190
o
F
count the timers the values stay at 212
o
F
Here is an explanation of each rung:
Rung 1: The Get instruction at address 200 multiplies the
temperature 100
o
C by 9 and stores 900 in address 203.
Rung 2:
The Get instruction at address 203 divides 5 into 900 and
stores the quotient, 180, in address 205.
Rung 3: The Get instruction at address 207 adds 32 to the value
180 which is located at get addresses 205. The sum of 212
is stored at address 210. Thus 100
o
C = 212
o
F.
Rung 4: If the displayed temperature is less than 190
o
F, the timer
initiates timing for three seconds.
Rung 5:
If three seconds have elapsed, an output at address 011/15
energizes a heating device that brings the temperature back
into the desired range.
Rung 6:
Counter 034 counts the number of times the value falls
below 190
o
F. Therefore, when rung 4 is true the counter
increments.
Rung 7:
When the temperature equals 212
o
F latching 011/16
enables an alarm.
Rung 8:
To shut the alarm off, unlatch 011/16. To do this, an
operator would press a pushbutton connected to
address 011/16.
Application Two
This application is similar to application one, but it only records the
converted temperature reading every five seconds (Figure 18.7).