I'm trying to create a logic module that will trigger a "1" on an output whenever a value drops below a certain threshold comming from a higher value.
So lets say my threshold is 18. I have a value of 20 and go down to 17, that would trigger the "1". but when the value is 15 and goes to 19 nothing should happen.
So far after looking at how the logic modules work and the articles on how the formula's work i have gotten this far:
The first line will so far as i understand check for a changing input value then it will write the value of input 1 (EN[1]) to memory 1 with a 1 second delay
The second line will check for changing input AND changed memory AND check if input 2 is bigger then input 1 (input 1 being the variable, input 2 the threshold) it will then write an "1" to output 1
This works each time i test it. But the output will stay at "1" this way.
I tried adding the following:
In my mind this should translate to: on change of output write a "0" with a 1 second delay to output 1
Thing is when i add this the module never gives a "1" on the output.
What am i doing wrong?
So lets say my threshold is 18. I have a value of 20 and go down to 17, that would trigger the "1". but when the value is 15 and goes to 19 nothing should happen.
So far after looking at how the logic modules work and the articles on how the formula's work i have gotten this far:
Code:
5012|0|"EC[1]"|"EN[1]"|"1"|0|0|1|0 5012|0|"EC[1] and SA[1] > EN[1] and EN[2] > EN[1]"|"1"|""|1|0|0|0
The second line will check for changing input AND changed memory AND check if input 2 is bigger then input 1 (input 1 being the variable, input 2 the threshold) it will then write an "1" to output 1
This works each time i test it. But the output will stay at "1" this way.
I tried adding the following:
Code:
5012|0|"AC[1]|"0"|"1"|1|0|0|0
Thing is when i add this the module never gives a "1" on the output.
What am i doing wrong?
Kommentar