Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched.
Close
for a project I want to make a certain boolean X true, but only if the elapsed time of a TOF is between 2 specific values. (TOF goes up to 20 seconds).
For example:
IF T#4S <= timer.ET <= T#7S THEN
X := TRUE;
END_IF
Now I keep getting the error that he can't do that. He can only compare the value of timer.ET to 1 specific time but not if the ET is between an interval of 2 times. Is their a different way to do it that doesn't make the code much larger?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
for a project I want to make a certain boolean X true, but only if the elapsed time of a TOF is between 2 specific values. (TOF goes up to 20 seconds).
For example:
IF T#4S <= timer.ET <= T#7S THEN
X := TRUE;
END_IF
Now I keep getting the error that he can't do that. He can only compare the value of timer.ET to 1 specific time but not if the ET is between an interval of 2 times. Is their a different way to do it that doesn't make the code much larger?
Thanks!
Try this: