tonymony Posted June 14, 2016 Report Share Posted June 14, 2016 Hello everyone, I am come back to the forum since too much time. I come back to Unitronics' PLC programming and I have got an issue with a routine. I am currently working with a generator routine which looks like: We have a panel with 9 bottons to select a state for each generator (Day, Night, Standby). Therefore we have 6 combinations: Day,Night,Standby Night,Day,Standby Standby,Day,Night Standby,Night,Day Day,Standby,Night Night,Standby,Day And if it is not any of these ones,it will work with this state like standard one: ''Day,Night,Standby" Now the problems come. Time functions: Day-07:00-19:00 Night-19:00-07:00 Standby should work when there is a failure in one of the other ones. I made a simple visual checker with 3 pictures simulating the state of the generators, but I do not know why routines Gen1,Gen2 and Gen3 are always "ON". I have attached the file in this link. https://drive.google.com/open?id=0B2KvxQP-uoqGaWx6UmVBZXRMeVE Thanks for your help. Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted June 14, 2016 MVP 2023 Report Share Posted June 14, 2016 When MB20 turns off, you stop calling "StandardRoutine". When you stop calling Standard Routine, you stop calling "Gen1" routine. When you stop calling Gen1 routine, the PLC cannot turn off MB17, thus it stays on. Even if MB20 stays on, when the time expires in StandardRoutine, ladder rung 1, then Gen1 subroutine is no longer being called and MB17 cannot be turned off. Conditional subroutine calls can be very problematic. Design your logic to minimize (or eliminate) the need for conditional subroutine calls. Link to comment Share on other sites More sharing options...
tonymony Posted June 16, 2016 Author Report Share Posted June 16, 2016 Hi Sirs, Do you recommend me any logic with this plc to do time cycles? It is very tedious implement the code, even with one routine. KR, Link to comment Share on other sites More sharing options...
tonymony Posted June 21, 2016 Author Report Share Posted June 21, 2016 Hi Sirs, I rethink all the ladder logic, I would like to ask you if you notice at first look anything wrong, with ladder logic's LOGIC I have the next pieces working. I am going to start working with a normal routine(Basic), generator 1 Day, generator 2 Night, generator 3 Standby and a transformer which is the main one. I am simulating this program with bits instead with inputs and outputs. I have the next componets: Generator 1 start is MB5 Generator 2 start is MB6 Generator 3 start is MB7 Phase failure rele transformer is MB0 Phase failure rele Gen 1 is MB10 Phase failure rele Gen 2 is MB11 Phase failure rele Gen 3 is MB12 Breaker Switch Transformer is MB1 Breaker Switch Gen1 is MB2 Breaker Switch Gen2 is MB3 Breaker Switch Gen3 is MB4 Gen routine BIT MB8 PFR House MB9 BUSBAR Alarm MB13 This is my program idea, I will performance and I will simulate. Could anyone say me if there is some confict condition with ladder logic in this program? Thanks Link to comment Share on other sites More sharing options...
tonymony Posted June 21, 2016 Author Report Share Posted June 21, 2016 I have attached the program in this like, is like a littler simulator, but it does not work. I do not know how this bits are on. https://drive.google.com/file/d/0B2KvxQP-uoqGRksyWUNRZGRoQ00/view?usp=sharing 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