QUOTE (waterboy @ Oct 8 2009, 09:35 AM)

Using a rung like the attached picture works until the value in N10:7 becomes a Negative number.
At that point the rung becomes true again and performs the MUL instruction.
I wouldnt think this would work like this. Is this sign issue and what is an alternative?
Two's complement form by the way is very simple to understand. I'm assuming you are using 16 bit words. In this case, you have only a 15 bit word, so you can store positive numbers from 0 to 32767.
The 16th bit is counted as "-32768" (-2^15), so you can count from -32768 to -1. You add bits just like normal other than the "sign bit", so the "all 1's" word means -1 (-32767 + 32767 = -1).
All integer math in AB PLC's is done in two's complement form.
I suspect your problem with your I/O card is that you have it set to operate in some other form (AB analog I/O cards usually have 2 or 3 different "modes" for representing results), in addition to the asynchronous problem mentioned. You can also somewhat simplify your code as well and make it run faster. Do the multiply with no conditions. Do the CLR instruction only of the result of the multiply is negative. This deletes an extra comparison operation, and the CLR is only executed if the test passes anyways.