russedwards Posted July 25, 2012 Report Share Posted July 25, 2012 Hi Thanks you in advace for your help. I am a newbie with visilogic and I am struggling with the last subroutine of my program. I will explain what I want to happen: As HMI loads, O3 to automatically open until a set pressure is reached (103 mbar) O3 then closes and remains closed whilst a leak test is undertaken - if the pressure drops below 103 mbar during the test time, O3 should not re-open. As the set pressure is reached, a timer should be activated to start the leak test timer (10 seconds) At the end of the 10 seconds, if the pressure is below 100 mbar then HMI FAIL should load If the pressure is above 100 mbar then HMI PASS should load. When the program finishes, all timers shoudl be reset ready for the next run test. This is working ok the first time i run through the program, but when I restart the routine the timer is running before the set pressure is reached. I also cannot lockout the O3 control. Can anyone help?! I have attached screenshots of my ladder. Thanks Russ Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted July 26, 2012 MVP 2022 Report Share Posted July 26, 2012 Russ, You're running into a classic problem that I often see with new programmers - you're trying to control a sequence with logical operands when what you need is a state machine. If you add enough contacts and coils you'll eventually get it to work but you'll have a hell of a time troubleshooting it. I call these "bit-bangers". A state machine uses a pointer register to step through the sequence in a very controlled way. I've attached what I would do. Study this programming method - it is the easiest way to do a sequence and it won't fail you. Joe T. state machine example.vlp 1 Quote Link to comment Share on other sites More sharing options...
russedwards Posted July 26, 2012 Author Report Share Posted July 26, 2012 Hi Joe Thank you very much for the info. I've hardly any PLC experience before using visilogic, we've only used Eaton Easy series logic relays previously. The only way to perform a test sequence such as this was to use lots of contacts! 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.