I strongly disagree
That "fix", which so many use, merely papers over the problem, it doesn't correct it.
He's trying to calculate (31206 * 8000) / 20000. The answer he expects is 12482 (rounded). The PLC is giving him "2" in N7:2. It knows this is probably not right, so it correctly flags the mistake, and hopes that the programmer will correct it and then clear the flag. The programmer didn't, so the PLC shut down before someone gets hurt.
Blindly OTUing S:5/0 could be just as catastrophic as having the PLC fault.
What the programmer is supposed to do is, for every calculation that could result in an overflow error, is to XIC S:5/0, then take steps to correct the math, possibly by using S:13 & :14, and then OTU S:5/0.
That "fix", which so many use, merely papers over the problem, it doesn't correct it.
He's trying to calculate (31206 * 8000) / 20000. The answer he expects is 12482 (rounded). The PLC is giving him "2" in N7:2. It knows this is probably not right, so it correctly flags the mistake, and hopes that the programmer will correct it and then clear the flag. The programmer didn't, so the PLC shut down before someone gets hurt.
Blindly OTUing S:5/0 could be just as catastrophic as having the PLC fault.
What the programmer is supposed to do is, for every calculation that could result in an overflow error, is to XIC S:5/0, then take steps to correct the math, possibly by using S:13 & :14, and then OTU S:5/0.
Last edited: