CAL Counter_1(R := Raz, P := Preselect, CU := Count_Up, CD := Count_Down, E => Empty, D => Done, F => Full)
IF Raz THEN
RESET_PL7_COUNTER (Counter_1) ;
END_IF ;
IF Preselect THEN
PRESET_PL7_COUNTER (Counter_1) ;
END_IF ;
IF Count_Up THEN
UP_PL7_COUNTER (Counter_1) ;
END_IF ;
IF Count_Down THEN
DOWN_PL7_COUNTER (Counter_1) ;
END_IF ;
Empty := Counter_1.E ;
Done := Counter_1.D ;
Full := Counter_1.F ;
Parameter
|
Type
|
Comment
|
---|---|---|
R
|
Input of reset to zero, if Counter_1.R is equal to 1, the current value of the counter Counter_1.CV = 0
|
|
P
|
Preset input, if Counter_1.S equals 1, Counter_1.CV = Counter_1.PV
|
|
CU
|
Count input, the current value is incremented by 1 on the rising edge of Counter_1.CU.
|
|
CD
|
Down-count input, the current value is decremented by 1 on the rising edge of Counter_1.CD.
|
Parameter
|
Type
|
Comment
|
---|---|---|
E
|
Empty counter output. Counter_1.E=1 when Counter_1.CV changes from 0 to 9999 and then to 0 again if the counter continues to count down.
|
|
D
|
Output which indicates that the counter has reached the preset value. Counter_1.CD = 1 when Counter_1.CV = Counter_1.PV.
|
|
F
|
Full counter output. Counter_1.F = 1 when Counter_1.CV changes from to 9999 to 0 and then to 0 again if the counter continues to count up.
|