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! Quote 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... Quote 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. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted April 27, 2021 MVP 2022 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.