5 sample automate rtd application program – Rockwell Automation 61C544A RTD Module User Manual
Page 33
4Ć17
990
!ă
1000
!
*************************** INITIALIZATION ***************************
1010
!ă
1020
!ăConfigure the first three channels using the data statements at 8000.
1030
!ă
1100
FOR I% = 0 TO 2
1110
!ă Reset the configuration register
1120
CONF_COMMAND% = 0000H
1130
!
Wait for the config complete flag to be reset
1140
IF CONF_COMP@ = FALSE THEN GOTO 1180
1150
DELAY 10 TICKS
1160
GOTO 1140
1170
!
Specify the channel to be configured
1180
CONF_CHAN_NUM% = I%
1190
!
Specify number of samples, highĆhigh, high, low, lowĆlow alarm values
1200
READ CONF_AVE_SAMPLES%, CONF_HH_ALARM%, CONF_H_ALARM%, CONF_L_ALARM%,ă&
CONF_LL_ALARM%
1210
!
Send the WRITE configuration command with retaining old value for
1220
!
out of range mode, Celsius temperature unit, European 4Ćwire RTD
1230
CONF_COMMAND% = 3000H
1240
!
Wait for the config complete flag to be set
1250
IF CONF_COMP@ = TRUE THEN GOTO 1290
1260
DELAY 10 TICKS
1270
GOTO 1250
1280
!
Check for an error configuring the channel
1290
IF CONF_ERROR@ = TRUE THEN SHUTDOWN@ = TRUE
1300
NEXT I%
8000
!ă
Ave
HighĆhigh
High
Low
LowĆlow
8010
!
Samples
8020
!ă
8030
DATA
30
2500,
2000,
1000,
500
8040
DATA
40
2500,
2000,
1000,
500
8050
DATA
50
2500,
2000,
1000,
500
8060
!
9000
!
9010
!
*************************** MAIN LOOP *******************************
9990
!
9991
!
If any channels are out of range, then set shutdown flag
9992
!
10000 IF OUT_OF_RANGE% <> 0 THEN SHUTDOWN@ = TRUE
11000 !
11010 !
If vat 1, 2, or 3 has high or low alarm, set warning flag
11020 !
11030 IF VAT1_H_ALARM@ OR VAT2_H_ALARM@ OR VAT3_H_ALARM@ OR VAT1_L_ALARM@
&
OR VAT2_L_ALARM@ OR VAT3_L_ALARM@ THEN WARNING@ = TRUE
12000 !ă
12010 !ă If vat 1, 2, or 3 has highĆhigh or lowĆlow alarm, set shutdown flag
12020 !ă
12030 IF VAT1_HH_ALARM@ OR VAT2_HH_ALARM@ OR VAT3_HH_ALARM@ OR VAT1_LL_ALARM@
&
OR VAT2_LL_ALARM@ OR VAT3_LL_ALARM@ THEN SHUTDOWN@ = TRUE
13010 !ă
13020 !ăWait one second then check again
13030 !ă
13040 DELAY 1 SECONDS
13050 GOTO 10000
Figure 4.12 Ć Sample DCS 5000/AutoMax RTD Application Task (Continued)
4.5
Sample AutoMate RTD Application Program
The sample AutoMate RTD application program in figure 4.13 is
written for an RTD module in a remote rack that is controlled by an
AutoMate 40 processor. If your system uses an AutoMate 30
processor, the addresses you would use must be changed
accordingly. If the RTD module were in a local rack, LOCIN/LOCOUT
commands would replace the REMIN/REMOUT commands. Refer to
the A30/A40 Software Reference Manual (JĆ3150) for additional
information.