BrianL Posted April 27, 2021 Report Share Posted April 27, 2021 Pretty sure I know the answer, but I can't find confirmation. If I have a subroutine that contains all the logic for a delay timer; and this subroutine is called conditionally, based on the status of a switch (digital input); Will this timer continue to decrement while I am not calling the sub? I'm thinking when I resume calling the sub, the timer will resume counting down from the "current value" when I last called it. Can I fake it into running properly by inserting a meaningless reference to this timer into the calling logic?? Thanks! Link to comment Share on other sites More sharing options...
BrianL Posted April 27, 2021 Author Report Share Posted April 27, 2021 P.S. PLC is a V570, programming in Visilogic... Link to comment Share on other sites More sharing options...
AlexUT Posted April 27, 2021 Report Share Posted April 27, 2021 No, timer cannot continue count if you not activate it at each scan. *Side effect - if yo9um activate timer twice per scan, it will count 2x fastest. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted April 27, 2021 MVP 2023 Report Share Posted April 27, 2021 47 minutes ago, BrianL said: this subroutine is called conditionally You should avoid conditional subroutine calls. It's not just timers, but any coil will be left in limbo when the subroutine is not being called. Link to comment Share on other sites More sharing options...
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