View Single Post
Old January 14th, 2020, 06:30 AM   #29
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 804
Quote:
Originally Posted by kamenges View Post
I'm surprised the emulator did even as well as it did. It'e been a long time since I've had to work with these, but as I recall the "classic architecture" AB products (the PLC5 and the SLC family without the overflow bit set) had the alarming quality of limiting ANY integer operation to +32767 to -32768. Since the MicroLogix is based on the SLC architecture (at least as far as I was told) I would have expected the result of the MUL in your initial post to be -32768.

It wasn't until the ControlLogix architecture came along that the AB stuff started handling rollover like one would expect.

Keith
The result is -32768 unless the [Math Overflow Selected] status bit (S:2/14?) is latched; see the first-pass rung of the example.

Wait, are you saying even the MicroLogix hardware exhibits this behavior, even with the [Math Overflow Selected] bit set? I have been trying to buy one on the cheap on eBay to experiment to test. Wow, that would be something.
  Reply With Quote