Rockwell Automation 1772-L8_LW_LWP_LX_LXP,D17726.5.8 User Manual User Manual

Page 396

Advertising
background image

Programming Technique

Chapter 25

25-6

Figure 25.6

Converting Temperature Values

200

100

X

202

000

G

201

009

G

X

203

900

203

900

:

205

180.000

G

204

005

G

206

:

205

180

212

G

207

032

G

210

+

210

212

1.0

G

211

190

G

033

TON

PR 003

AC 000

033

15

15

011

033

17

PR 999

034

CTU

AC 000

210

212

16

G

220

212

=

011

L

110

14

16

011

U

Suppose that you connected a thermocouple to an input module that
measures Celsius temperature. A block transfer read transfers the
temperature into the processor’s data table.

For your ease, you would like to convert the recorded Celsius temperature
in the data table to Fahrenheit values for display. This temperature must
maintain certain range values for your application. You would like to:

monitor the temperature from 87 to 100

o

C

count the times the value falls below 190

o

F

count the times the values stay at 212

o

F

Formula:

o

F = (9/5) x

o

(C) + 32

In this example, the value read into the data table at address 200 is 100

o

C .

Advertising