peter_hf Posted May 8 Report Share Posted May 8 I am a very new user of ladder logic and having some problems understanding where I am going wrong. I am writing a simple program to turn on and off some digital outputs (aliased as PV09, PV10, SV02 in my logic) in a series of steps with a set delay during each step. The coils turn on in the expected way, however when the inputs to the output coil turns off then the output remains high in the code and in the actual digital output. I paste a snippet of my logic in online mode below - each rung is supposed to be a single step (Step[1] and Step[2]) which should finish once the bit for the next step is set, however the outputs (PV09/PV10/SV02) remain high even though the input into them is low. These outputs are not referenced anywhere else in the code so I can't understand why they are high. Thanks for any help in advance! Quote Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted May 8 MVP 2023 Report Share Posted May 8 It looks like this is a UniStream program. True? You can only use a regular coil once in a program. In ladder logic all rungs are scanned and solved and the last one wins. In your program example above use different bits for each rung, and then OR them all together below your logic for the actual controlled bit. Joe T. Quote Link to comment Share on other sites More sharing options...
peter_hf Posted May 8 Author Report Share Posted May 8 Thanks for your reply! Correct, it is a UniStream program. Thanks for explaining - I understand better now. Using a bit for each run and then OR'ing them works well. Peter Quote Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted May 8 MVP 2023 Report Share Posted May 8 Moved to correct forum Quote Link to comment Share on other sites More sharing options...
pascal Posted May 15 Report Share Posted May 15 Like Joe already told us many many times..... it's better to split complex ladder into minor parts on different rungs..... sometimes you don't know how the compiler translate your thoughts 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.