ORSO2001 Posted April 14, 2016 Report Share Posted April 14, 2016 Dears All, In my project I have create few ladder function; each ladder function is enable when I select the related HMI page...and automatically te others will be disable. In some ladder function I used few single timer...and as you can see in the attached pic in the rung before the TON I use a Treset of it. What happened...I see that when I add two more TON (with same timer) and I enabled the page/ladder function ALL the timer set itself the current value at the preset value (but the BIT remain 0)...and the timer reset doesn't works...it means that the counter doesn't start and the BIT don't become 1...if I add two more TON (with different timer) all works fine. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted April 14, 2016 MVP 2023 Report Share Posted April 14, 2016 My recommendation is to break all that logic up into separate ladder rungs, and maybe even separate subroutines. It is always a risk to pack too much logic into a single ladder rung because the compiled code may not exactly match what you expect. When you break the logic up into simple steps it is easier to read and troubleshoot. Link to comment Share on other sites More sharing options...
ORSO2001 Posted April 14, 2016 Author Report Share Posted April 14, 2016 Dear FLEX727, you are right...I have to build my "rungs" more simple...and that you don't have seen the rungs with "if" tree...i am a beginner and I hope to find a good way to do my projects...I have to try more Link to comment Share on other sites More sharing options...
Henny Posted April 14, 2016 Report Share Posted April 14, 2016 Hello for a TON timer you definie a tag from type Type "Timer". When you gave a symbolic name to it like "delaytime1" then delaytime1.current contains the elapsed time,delaytime1.preset contains the preset time and finally delaytime1.out is the output of the timer and changes to on if the timer has counted down to zero. When you add a second timer and uses the same tag for it then this results in the same behavior as when you use the same timer twice in visilogic. You also write that if you use different names (different tags) all works well so I think the adding the same tag too different timers is the problem here. I fully agree on Flex that long rungs are more difficult to trouble shoot and also difficult to watch the online status because you have to scroll through your screen from left to right etc while with a short rung where you have only 3 our 4 boxes in series you can watch status without scrolling from left to right. Kind regards Henny 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