Transistor Posted March 7, 2018 Report Posted March 7, 2018 (edited) This isn't urgent but a TIME value is failing a comparison test for me. t_delay : TIME; // Declaration ----- IF t_delay <= 0 THEN t_delay := T#3S END IF If I modify the variable value to T#2S the IF sets it back to T#3S. Internally the TIME variables are integer. Why would a compare not work as I intend? Many thanks. Edited March 7, 2018 by Transistor
cHud Posted March 7, 2018 Report Posted March 7, 2018 Have never compared with time values but shouldnt your if say if t_delay<=t#0s then t_delay:=t#3s
Transistor Posted March 7, 2018 Author Report Posted March 7, 2018 Good catch (on the missing assignment ':'). Today I've been programming in Codesys STL, VBA and Python. I got mixed up! Fixed.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now