Rockwell-automation Current Input Module Instrukcja Użytkownika Strona 37

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
Przeglądanie stron 36
4Ć19
990 !
1000 ! ******************** INITIALIZATION **********************
1010 !
1020 ! Configure the first three channels using the data &
! statements at 8000.
1030 !
1100 FOR CHANNEL%=0TO2
1110 ! Reset the configuration register
1120 CNF_COMMAND% = 0000H
1130 ! Wait for the config complete flag to be reset
1140 IF CNF_COMP@ = FALSE THEN GOTO 1180
1150 DELAY 10 TICKS
1160 GOTO 1140
1170 ! Specify the channel to be configured
1180 CNF_CHAN_NUM% = CHANNEL%
1190 ! Specify the max scaling, min scaling, highĆhigh, high, &
! low, lowĆlow alarm values
1200 READ CNF_MAX%, CNF_MIN%, CNF_AVE_SAMPLE%, CNF_HH_ALARM%, &
ăăCNF_H_ALARM%, CNF_L_ALARM%, CNF_LL_ALARM%
1210 ! Send the WRITE configuration command that specifies &
! retaining the old value for the out of range mode and &
! enabling cycle averaging, and disabling square root extraction &
1230 CNF_COMMAND% = 3000H
1240 ! Wait for the config complete flag to be set
1250 IF CNF_COMP@ = TRUE THEN GOTO 1290
1260 DELAY 10 TICKS
1270 GOTO 1250
1280 ! Check for an error configuring the channel
1290 IF CNF_ERROR@ = TRUE THEN SHUTDOWN@ = TRUE
1300 NEXT CHANNEL%
8000 !
8010 ! ăMax ĂăMin Run High High Low Low
8020 ! Scaling Scaling Aver High Low
8030 DATA ă2000, -100, 20, 1800, 1600, ă400, ăă0
8040 DATA ă3000, ăăă0, 20, 2500, 2000, ă500, ă250
8050 DATA 10000, ăăă0, 20, 9000, 7500, 2500, 1000
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 tank or startup process or operation process has &
! high or low alarm, set warning flag
11030 !
11040 IF TANK_H_ALARM@ OR START_H_ALARM@ OR OP_H_ALARM@ OR &
TANK_L_ALARM@ OR START_L_ALARM@ OR OP_L_ALARM@ THEN & WARNING@ = TRUE
12000 !
12010 ! If tank or startup process or operation process has a &
! highĆhigh or lowĆlow alarm, set the shutdown flag
12030 !
12040 ĂIF TANK_HH_ALARM@ OR START_HH_ALARM@ OR OP_HH_ALARM@ OR &
TANK_LL_ALARM@ OR START_LL_ALARM@ OR OP_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 Current Input Application Task
(Continued)
Przeglądanie stron 36
1 2 ... 32 33 34 35 36 37 38 39 40 41 42 ... 65 66

Komentarze do niniejszej Instrukcji

Brak uwag