beautypg.com

Multiply (mul), Preface, Updates to arithmetic status bits – Rockwell Automation 1761 MicroLogix 1000 Programmable Controllers User Manual

Page 140: Changes to the math register

background image

Preface

MicroLogix 1000 Programmable Controllers User Manual

8–8

Multiply (MUL)

Use the MUL instruction to multiply one value (source A) by another (source B)
and place the result in the destination. Source A and B can either be a word address
or constant.

If the result is larger than +32,767 or smaller than –32,767 (16-bits), the 32-bit
result is placed in the math register.

Updates to Arithmetic Status Bits

With this Bit:

The Controller:

S:0/0

Carry (C)

always resets.

S:0/1

Overflow (V)

sets if overflow is detected at destination; otherwise resets.
On overflow, the minor error flag is also set. The value
–32,768 or 32,767 is placed in the destination. If S:2/14 (math
overflow selection bit) is set, then the unsigned, truncated
overflow remains in the destination.

S:0/2

Zero (Z)

sets if result is zero; otherwise resets.

S:0/3

Sign (S)

sets if result is negative; otherwise resets.

Changes to the Math Register

The math register contains the 32-bit signed integer result of the multiply operation.
This result is valid at overflow.

Execution Times

(

µ

sec) when:

True

False

57.96

6.78

MUL

MULTIPLY
Source A

Source B

Dest