Double word function block caution – Rockwell Automation 1336T Function Block Prog. Manual, Series A/B User Manual

Page 64

Advertising
background image

Function Block Library

4–2

1336 FORCE — 5.9 August 1995

The only library function blocks that have double word input or
output nodes are Multiply, Divide and Scale. These three function
blocks are intended to be used together. Special handling may be
required when using any of these three blocks with other function
blocks.

Double word nodes can present difficulties since the system
architecture does not have 32 bit integrity. When double word
parameters are manipulated by DriveTools or a PLC, each 16 bit
node must be handled separately. However the function algorithm
uses both words together when interpreting these double word
values.

The output range of multiplied input values can be critical. The range
of a double word (32 bit) value is

±

2,147,483,647. The range of the

more common, signed single-word 16 bit node is

±

32767. If only

one word of the Multiply or Scale function block output were used,
the output would appear to roll over or under should the product
exceed + 32767 or go negative.

31

16 15

0

Most Significant Word

Least Significant Word

As shown above, the sign bit for 32 bit values is the most significant
bit, #31. The sign bit for a single word value is the most significant
bit, #15.

Should the DIVIDE function block’s LSW input node (Node 0) be
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. Range checking
and possible limiting may need to be performed. Special
manipulation of the MSW (Most Significant Word) may be required.
The double word characteristic of each of these three blocks is
detailed further in the individual block descriptions.

Double Word Function Block
Caution

Advertising