Posted 7 Mar 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 7 Mar 2018 by Transistor Share this post Link to post Share on other sites
Posted 7 Mar 2018 Have never compared with time values but shouldnt your if say if t_delay<=t#0s then t_delay:=t#3s Share this post Link to post Share on other sites
Posted 7 Mar 2018 Good catch (on the missing assignment ':'). Today I've been programming in Codesys STL, VBA and Python. I got mixed up! Fixed. Share this post Link to post Share on other sites