beautypg.com

Scale data (scl), Preface, Entering parameters – Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual

Page 144: Updates to arithmetic status bits

background image

Preface

MicroLogix 1000 Programmable Controllers User Manual

8–12

Scale Data (SCL)

When this instruction is true, the value at the source address is multiplied by the rate
value. The rounded result is added to the offset value and placed in the destination.

Note

Anytime an underflow or overflow occurs in the destination file, minor error bit
S:5/0 must be reset. This must occur before the end of the current scan to prevent
major error code 0020 from being declared. This instruction can overflow before
the offset is added.

Entering Parameters

The value for the following parameters is between –32,768 to 32,767.

Source can either be a constant or a word address.

Rate is the positive or negative value you enter divided by 10,000. It can be a
constant or a word address.

Offset can either be a constant or a word address.

Updates to Arithmetic Status Bits

With this Bit:

The Controller:

S:0/0

Carry (C)

is reserved.

S:0/1

Overflow (V)

sets if an overflow is detected; otherwise resets. On overflow,
minor error bit S:5/0 is also set and the value –32,768 or
32,767 is placed in the destination. The presence of an
overflow is checked before and after the offset value is
applied.➀

S:0/2

Zero (Z)

sets when destination value is zero.

S:0/3

Sign (S)

sets if the destination value is negative; otherwise resets.

If the result of the Source times the Rate, divided by 10000 is greater than 32767, the SCL instruction overflows,
causing error 0020 (Minor Error Bit), and places 32767 in the Destination. This occurs regardless of the current
offset.

Execution Times

(

µ

sec) when:

True

False

169.18

6.78

SCL

SCALE
Source

Rate [/10000]

Offset

Dest