******Double Coil Syndrome --> stay away!!
============================================
Have you heard the term "double coil" before? Are you confused by its
meaning? Well perhaps you're not alone on the subject. And if you've
never heard of it before... it may actually be a good thing. Let's
check out the *disease* together.
The double coil syndrome occurs when we use the same output coil more
than once in our ladder program. What... we can only use the same
output coil once in a program? Well, yes that's true. Let's see why:
Consider this simple example. We have two toggle switches. If either
of them turn on, then a motor will turn on. Simple. We just create a
two line ladder diagram that looks like this:
0001 0500
--| |-----------( )---
0002 0500
--| |-----------( )---
So, if either input 0001 or 0002 physically turn on, then output 0500
will turn on and our motor will spin. OK. Let's move on to another
topic then... but wait. It won't work. Huh?? That's right. It won't
work they way we designed it. Why? Because of DOUBLE COIL SYNDROME.
The dreaded programming disease appears here because we have used the
same output coil (0500) twice in the same program on two seperate
rungs. Care to guess what the symptoms will be? (Sometimes they're
hard to diagnose)
The symptom would be turning on/off toggle switch 0001 but the motor
0500 never turns on. But if we turn on/off 0002 the motor 0500 also
turns on/off. This tells us the motor is good. More checking reveals
that the PLC input card is working just fine. So, back to the program.
The cause of the disease is the way our PLC scans the program.
Remember that it scans from left to right, top to bottom. Watch this.
0001 0500
--|a |-----------(b )---
0002 0500
--|c |-----------(d )---
Initially:
a and c are physically off. So, b and d are also off.
Step through the scan:
1-- We turn on toggle switch 0001 so a is now on.
2-- Since a is ON, b (0500) will turn on.
3-- c is still physically off, so d (0500) is also off.
See!! The last thing we said was that 0500 would be off. So, when the
PLC goes to update the outputs, it's going to leave 0500 OFF!!
How about this situation:
Initially, a and c are physically off. So, b and d are also off.
Now we turn on toggle switch 0002 so c is now on.
Step through the scan:
1-- a is off so b (0500) is off.
2-- c is on so d (0500) will turn ON.
See!! The last thing we said was that 0500 would be ON. So, when the
PLC goes to update the outputs, it's going to turn 0500 ON!!
If you've followed along, you'll notice that -- regardless of whether
toggle switch 0001 is on or off, motor output 0500 reacts only to the
state (on/off) of toggle switch 0002 --. If 0002 is on, 0500 is on. If
0002 is off, 0500 is off. It doesn't matter what the status of toggle
switch switch 0001 is. 0001 is pretty much ignored.
How do we "cure" this disease and eliminate the syndrome?? Simple.
Just use an OR ladder. After all, we want the motor to turn on if
toggle switch 0001 *OR* 0002 turns on. Here's the solution:
0001 0500
--| |-----------( )---
|
0002 |
--| |----|
Now, if switch 0001 OR 0002 turn on, 0500 will turn on. Double Coil
Syndrome has been cured.
Vaccinate yourself now and you'll never get the disease!!
Just for reference about the only time the same output coil can safely
be used is within subroutines and transitional(jump, etc) blocks.
***Taken from Phil's Newsletter***