Trigger an output when a number changes

This should work for both setpoint and measure. Just set hysteresis value big enought if needed.

value_plus_hyst:= saved_value + hysteresis
value_minus_hyst:= saved_value - hysteresis

input_changed:=0; //oneshot bit

if input > value_plus_hyst
then
saved_value:= input;
input_changed:=1;
end_if;

if input < value_minus_hyst
then
saved_value:= input;
input_changed:=1;
end_if;

Yes, but not relevant if it is the set-point change that needs to be recorded...

We have to wait for the OP's response...
 

Similar Topics

Hi i would like to ask! Im using Omron CP1E PLC May i know how to use one input to trigger two outputs alternatively? Meaning press X0 on, Y0...
Replies
11
Views
398
Hi, I'm using CX Programmer and just seeing what the best way to trigger an output from the plc clock time would be. I need this to come on at 9am...
Replies
4
Views
1,742
Most I have come across is two loads switched on simultaneously using a single output point. Typically, an indicator lamp and a relay coil...
Replies
8
Views
2,907
I am trying to trigger an output twice after a duration of time. The operator has to trigger a laser from the HMI. This fires the coil. Which...
Replies
3
Views
1,532
Hi everybody, I'm using SIEMENS S7 212, one imput (I0.0) which was use in the program will indicate ON on the input LED display when pressed...
Replies
7
Views
1,962
Back
Top Bottom