zhaolinger Posted September 10, 2012 Report Share Posted September 10, 2012 I have a idea of making use of sub-routines to model a state machine since the sub-routines can be make to only be called when its inputs ladders condition is true. But to do that, I need to fully understand how a relay that got energized within a sub-routine will behave after the calling of that sub-routine is isolated. To further explain my question, I will create a scenarios of a simple ladder program here. Let say we have Input 1, Sub-routine "Sub1", Relay 1, Timer (Delay) 1, Output 1. See the attached picture for the ladder connections. Main Module Sub-routine 1 My first question is can I assume that both the Timer 1 and Output 1 will not be active until Input 1 is on, because Sub1 won't be scanned until Input 1 energized Relay 1. Correct me if I'm wrong here. Next, after the sub-routine Sub1 become active, Timer 1 will be activated and start countdown, Output 1 will be energized. After Timer 1 finished its countdown, it will cut-off the source of Relay 1 (de-energize) and isolate Sub1 from being call the next scan onward. So, my next question is after that will Output 1 remain energized (because its inputs condition still hold true), or be de-energized (because the sub-routine that energize it no longer be called). Experts over here, please enlighten me on this, because there is no software mode simulation in VisiLogic to prove whether my thought is feasible. Quote Link to comment Share on other sites More sharing options...
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.