Monday, February 27, 2017

Double Coil Syndrome In Plc Ladder logic and how to cure it


Double coil syndrome though sound like a human disease but it not . This disease is found in PLC programming.
Let us investigate what is this syndrome and how to eradicate the cause of it.



Before that let us discuss a logic in ladder Can we use same output coil for two more
than once in our ladder program? Yeah you herder right we can use the same output coil for more than once in our ladder program lets see how

Let us take an example. Suppose we have taken two toggles switches no- x01 and x02. If either x01 turns on or x02 turns on, the output coil named Q06 turn on which will turn on the motor. 
Let’s create a ladder program on this logic

x01             Q06
--| |-----------( )---

x02              Q06
--| |-----------( )---

So, If either toggle switch x01 or x02 turn on, then output Q06 should turn on which should start the motor. But after compiling/running the program you will see that it won't generate output as per our demand .Because of Double Coil Syndrome. Here as Output is taken twice hence it is called Double. If we will take it thrice then it will be called Triple Coil Syndrome.
Now let's analyze the logic

 by running the program we will see that by turning on the toggle switch x01  motor won't run. But when we turn on the toggle switch x02 then motor will run. as motor is running with toggle switch x02 that means motor is good .Now further checking revels that PLC card is also good and in working condition. So we have to get back to our program check it from top to bottom

x01                 Q06
--| a |-----------(c )---

x02                 Q06
--| b |-----------( d )---

Now take two cases
Case 1

lets take all switches that is a&b are turn off so output c&d will also be in off condition.
1- when we turn on the switch x01 so a is now on.
2- Since a is ON ,c(Q06) Will turn on.
3- as b is physically off ,so d(Q06) will also be off.
so when PLC will scroll down it will take the last command as its final command so output Q06 will stay off though we have turned on the x01.

Case 2

Let’s take all switches that is a&b are turn off so output c&d will also be in off condition.
now
1--a is off so c (Q06) is off.
2--b is on so d (Q06) is will turn on.
We can see here PLC will take the last command as its final command so output Q06 will stay on irrespective of the toggle switch x01.

This is what we call Double Coil Syndrome

Now let's cure the Disease

Just add an OR ladder to the logic.
As we want the motor to be on when x01 OR x02 turns on. Here's the situation.

|       x01             Q06
|------| |----|-------( )---|
|                |
|       x02    |
|------| |----|
|

Now, If switch x01 OR x02 turn on then Q06 will turn on .Double Coil Syndrome has been cured.

1 comment:

  1. PLC/PAC programming twice the same output: NOT acceptable

    This question is for engineers/technicians that program PLC/PAC and understand the dangerous consequences of writing to an output, whether a coil, or an analog output, from two different places in a program. This is not a how to question, nor is it a if you can or not question. This is a question as to how to explain to someone that if you do this someone will get hurt, killed, equipment damaged or lost production time will result. Sooner or later. For this reason, in my 3 decades of industrial projects to do such a thing has been considered illegal.

    It has always been my understanding that illegal in this context meant:

    1. Not written in law or some standards code, but rather the industry (in North America) standard best practices

    2. In the case of an accident involving injury, death, damage or lost production, that such programming is INDEFENSIBLE in a court of law or in a claim to an insurance company.

    3. There were enough accidents and claims that Rockwell simply excluded the possibility of such dangerous and senseless programming in RS-5000. However I've been told that Simantic-7 for Siemens S7-300 and S7-400 PAC's issues a warning but let's you proceed with writing to the same output ( bit, or register ) at two different locations in a program.

    An engineer I worked with would casually uses such a dangerous practice. What documentation, reports, or reasons Rockwell excluded this from RS5000 can be found to explain to this engineer that the Earth really is round and not flat ?

    Thank you for your assistance in providing any kind of documentary evidence. IEEE standard? An article in an industrial magazine on best practices in PLC/PAC programming? . . . ?

    Regards,

    Christian A Martel

    ReplyDelete