az1324 said:But I don't think the following should set the zero bit, whether or not they did before:
SET
ADD
SUB
MUL
DIV
INC
DEC
I *STRONGLY* disagree.
I have extensive use of counters with "DEC" and "SUB" that use the BNZ condition to terminate loops.
I again say, there are a series of well known, established instructions, that have been "stable" and "well understood" for many versions of the code.
YOU MUST NOT CHANGE THEIR BEHAVIOR EXCEPT FOR BUGFIXES.
If you wish to introduce a DIFFERENT behavior, introduce a NEW instruction to do so.
CAI - it is NOT ACCEPTABLE under ANY circumstances to change the way standard instructions work, but offer a "downgrade" to an earlier version of code as a "work-around". Please think about this in a professional manner.
If you need a final argument to convince you, just imagine the scenario - one of your PLCs being used to control machinery or equipment. *SOMETHING* happens and the board is damaged (or suspected to be damaged). Someone - quite likely not even the original user or manufacturer opens it up, sees your board. Finds it's only $50 and thinks this is by far the "easiest and cheapest" part to replace. Gets a new board, extracts the code from the existing board, loads it into the new board and turns it on. Due to the change in behavior of the instructions, the machine goes bonkers. Many thousands of dollars damage, or worse, SOMEONE IS INJURED. WHEN it goes to court and somoene demonstrates you failed in your "duty of care", who do you think is going to be in trouble?
(A court awarded a massive amount against a company because they changed the electrical configuration of a board but retained the same connectors - it was POSSIBLE to plug the new board in to the old equipment and injure people, the court determined that they SHOULD have changed the connector so such a mistake was not possible. What makes you think your situation is different??)