Divide – Rockwell Automation 1336T Function Block Prog. Manual, Series A/B User Manual

Page 79

Advertising
background image

Function Block Library

4–17

1336 FORCE — 5.9 August 1995

Important:

If the DIVIDE function block’s LSW input node (node 0) is used without
manipulating the MSW node (node 1), difficulties can occur should a signed
word be linked to the inputs. False results may be output if the signed input
value goes negative.

– 32767 (Lower Waveform)

"

A t1

A Signed Single-Word

Input to LSW Node 0

A t2

A t3

A DIVIDE Output

0 (Lower Waveform)

"

"

+ 32767 (Upper Waveform)

"

0 (Upper Waveform)

+ 32767 (Lower Waveform)

A t1

A t2

A t3

The Lower Waveform is a signed single word input traversing a range of

±

32767 units. This is linked to the LSW input node of the DIVIDE block.

The MSW node is unlinked and is set at a value of 0. The divisor (node 2),
has a value of 1. Points t1, t2 and t3 denote where the signed input signal
crosses zero. Note that between time t1 and t2 the output follows the
positive input value exactly. As the input moves negative (at time t2), the
output goes to the positive limit of + 32767.

The signed single word value which represents – 1

dec

is FFFF

hex

. The

signed double word value representing – 1

dec

is FFFF FFFF

hex

. Without

the upper MSW word (node 1) being manipulated, the DIVIDE block
interprets the double word input as being 0000 FFFF

hex

which equals

65535

dec

.

With the MSW (node 1) always 0, the lower LSW (node 0) is always
interpreted as an unsigned decimal word with a range of 0 to 65535. As the
signed single word RATE LIM Output (which is linked to the DIVIDE LSW
input) goes negative, it’s sign (bit 15) is always set. While bit 15 is set, the
DIVIDE LSW input value is always interpreted as being greater than
+ 32768 because the LSW is always positive when the DIVIDE MSW input
is 0.

DIVIDE

(continued)

Advertising