"double coil error" what does it mean?

The double coil error can mean three things
It is a little hard to explain, however,
Normally a double coil is classed as an error because if it is used twice in a program then perhaps the logic will turn it on in one part of the program but turn it off in another part so it will only be on between the two points where it is turned on and where it is turned off, in the case where it is just an out instruction ( ) coil this applies to actual outputs it will not actually turn on the physical output because the actual physical output is only updated at the end of the program scan.
If it is a SET & RESET outputs then what this can be valid because a transition of the logic setting or resetting it is only valid on a rising edge. in other words a latch.
So in general you would never use OUT coil for outputs only internal bits like "M", but you can use SET & RESET.
So although it says it's an error it may not be an actual error, there is also another way you can use OUT instructions if these are in different blocks of code where only one is called i.e. a recipe could be controlled by enabling different blocks so for recipe 1 a block of code say My_Prog_1 is called whereas another block for Recipe 2 (MY_Prog_2) is not.
 
Double coil means that your program has more than one rung that turns an output address on or off. That won't work the way you expect it because of the way a PLC operates.

A PLC evaluates each rung of logic in sequence and keeps track of the on/off status of the the outputs. Once it has reached the last rung of the program it sends the on/off status of the outputs to the actual output devices. It does not send the status to the actual outputs immediately after evaluating the rung. Then it reads the status of the physical input devices and repeats the evaluation of the ladder logic rungs, sends the results to the output devices, reads the inputs, evaluates the logic, and so on until you tell it to stop.

So, the signal the PLC sends to the physical output device will be based on the last rung the PLC evaluated before it sends the status to the devices. If you only have one rung that turns the output on or off, the output device will behave as you expect. If you have two different rungs turning the output on or off you'll get surprises.

For example, if rung 10 says turn the output on and rung 20 says turn it off, the actual device will be off. Conversely, if rung 10 says turn the output off and rung 20 says turn it on, the actual device will be on.
 
I don't know for sure, but I suspect is is that the code writes (at least) two values (1s and/or 0x)* to the same output (coil). If that is is case the first value written will be overwritten by the second value, so only the second write will matter.



* unconditionally i.e. not Set/Reset or Latch/Unlatch
 
@Mas01, the point to the warning is that the software has detected what could be a problem and is calling your attention to it.

Using SET and RESET instructions has the potential to create unexpected behavior. For that reason beginners are often advised to refrain from using them.

Most of the problems stem from recovering from abnormal situations. The SET and RESET functions control the machine properly when everything on the machine works as expected. But when an upset to the process requires operator intervention, sometimes an output that has been SET now needs to be RESET, but the programmer forgot to account for that condition.
 
Actually I have told you slightly wrong on GXDeveloper it does not produce an error on SET/RESET, I think this was on some other IDE's.
So it is showing as an error but as it is in different program blocks and seems to be associated with the Analogue cards it may not matter, these analogue cards have Y outputs but are not physical outputs on the cards, they are used internally to set parameters or runtime conditions, also as mentioned before it may be that as there are more than one program i.e. Main & Analogs the analogs one may be called conditionally on start up (first scan) or conditionally for some sort of parameter change without actually seeing where they are used in both blocks it is impossible to say if they are valid as far as working correctly.
 
Thanks for the replies.
One thing is for sure, these errors were not of my doing, so they can't be critical because this code is running the rig.
 
Last edited:
LD: yep used that one myself, the double coil in question in MAS01's case is in separate blocks but as the code is restricted by his company he cannot show it in full, however, they could be called by conditional jumps so the code could still be valid even though it is theoretically an I/O card output but only used to enable settings on the card no physical connection to the outside world.
It is also common to use a bit (or a word) as a temporary store (or local variable), this also means it is only valid within that bit of code. I used that in an SLC505 to pass variables to and from a block of code whereas the block was called many times in the main program. just like a function block.
Transfer the variables to the temps, call the program block that processed it then returned any variables back to the main program.
 
What is the consensus on double coils used to make a rung more easily visible, e.g.


This is the method I always use to keep rungs visible on screen ( I loathe the way PLC's wrap around , this practice comes from very early PLC's not having much memory or screen space.


Steve
 
For example, if rung 10 says turn the output on and rung 20 says turn it off, the actual device will be off. Conversely, if rung 10 says turn the output off and rung 20 says turn it on, the actual device will be on.

Thanks for pointing this out. Until I read this, I thought the output was sent out as soon as that rung was executed.
 
The GE Fanuc Series 90 had an internal address specifically for extending a rung. The coil instruction at the end of a rung looked like ----(+)- and the contact instruction at the beginning of the next rung looked like --]+[--. It was addressed to a status bit %S0032 which would not throw a warning for double usage.
 
No not quite, the actual physical output is mapped from the internal area of the outputs (well in many PLC's). in general the physical inputs are copied to an area called input map before the start of the scan of the main program, the outputs are mapped to the physical ones at the end of the main program scan (this is the general rule), however, there are various ways where this differs, the outputs can be updated at any time either by functions or in the case of siemens the PW (peripheral word) can be written to immediately. for example in Siemens the input contacts say from an input card are designated as I0.0 to I1.7 and the 16 bits in the a peripheral word are updated as PIW. so can be written to instantly, in other PLC's there are things called Interrupt enables that will update the mapping instantly plus some other ways. so as outputs in Mitsubishi are called "Y" these are only the internal map of the physical outputs. If Bit instruction Y or M is used twice as a standard OUT instruction then the last ladder that contains it in the program will decide its state.
So if an output is turned on on rung 1 by the contacts driving it in a program then in say rung 100 it is used again and the logic driving it is false then the output will be turned off so the physical output will see it as off at the end of scan when the outputs are mapped from the internal memory.
 

Similar Topics

Hello, I was just reading about Double Coil Syndrome on an old post from here. It's something that I dealt with and figured out for the program...
Replies
18
Views
5,209
how to design a ladder for a motor which has to rotate both clockwise and anticlockwise.........i know i cant use a load twice.but the motor(load)...
Replies
13
Views
3,362
I m just learning and no industrial experiance...Please explain the concepts... -----------| I:0.1 |--------------------( O:0.0 )----- | |...
Replies
10
Views
5,361
I came across a application recently, and noticed the use of a double coil. My understanding of this is that this will not work, but I am not as...
Replies
8
Views
3,835
In about 2 months I will have a very small window to accomplish quite a few projects. To try and speed things up I would like to do most of my...
Replies
8
Views
1,856
Back
Top Bottom