I've discovered at least one instance where implementation of code in ladder diagram leads to a result which goes against the very essence of ladder logic, and possibly doesn't comply with the standard. Specifically, using a CTU instruction. Once the count value (CV) becomes equal to the preset value (PV), the output (Q) is set and remains HIGH. Any logic operations connected to the right of Q are executed regardless of the conditions in front of (to the left) the CTU block.
Notice in this example the blue lines and the discontinuity in between. When value1 was equal to 10 and countup was toggled twice, the counter.Q went HIGH and value2 was moved to value1. However, even with the initial EQ returning a FALSE, if value1 is overwritten anywhere else, this rung/network will continue to write value2 to value1.
I'm not sure what the IEC standard says about this, but anyone accustomed to working in ladder logic will find this to be erroneous. The entire rung/network is supposed to be analogous to the branch of a control circuit. If at any point a condition is not met, it breaks continuity across the network and "power" cannot flow to the right. In the example I show, it is as if the CTU block is acting as the starting condition of its own network/rung. The Q value remaining HIGH is OK, but the EN on the MOVE block should not be HIGH unless the conditions preceding the CTU are also high. Perhaps the solution is that the CTU block should never be allowed to be inserted without EN/ENO.
Log in to post a comment.