script Exzotron/EX_Klapan
This algorithm is designed to control the shut-off valve in order to block air from entering the fuel meter. As soon as fuel with air begins to flow into the gas separator, pressure drops in the gas separator tank. The pressure sensor is connected to the tracker to the input IN3. The pressure sensor itself is connected to +24 volts and input IN3. In addition, a 10 kΩ resistor is connected to IN3 and to minus. The valve cut-off control unit is connected to the output of the tracker OUT3.
SETTINGS:
SETCLAP command
Answer:
CycleT 4, Porog 2300, Gister 20, Out 2, SelectIN 3, ReversOut 0, set3 0
CicleTime - cycle time, default 4 (value multiplied by 0.25 sec)
Porog - input value limit, default 2000 (you need to set the average from Gister)
Gister - Hysteresis, default 100 (Porog + Gister > input values or Porog - Gister < input values)
Out - exit number, default 3
SelectIN - input number, default 3
ReversOut - output reverse, default 0 (inverts output state)
set3 - not used
all values from 0 to 255 except Porog (can take up to 65535)
Explanation of threshold and hysteresis.
turn on (0) output3 when input3 > 2100
will turn off (1) output 3 when input3 < 1900
with a value from 1900 to 2100 nothing will happen to the output