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

Page 108

Advertising
background image

Function Block Library

4–46

1336 FORCE — 5.9 August 1995

SCALE

BLOCK TYPE 20 decimal 14 hexadecimal

Scale

ID =

Exec =

Out MSW

NODE 0

Input

NODE 1

Mult

NODE 2

Div

NODE 4

Out LSW

NODE 3

DEFINITION

Multiplies the input Input by Mult and divides by Div. The result is a
two word output consisting of a least significant word Out LSW, and
a most significant signed integer Out MSW. If the result is a value
between 0 and 65535, Out LSW contains the value and Out MSW is
0. For values less than 0 the sign bit that indicates the negative value
is bit 15 of Out MSW. When Div is equal to 0, the result of the scale
block is 0.

INPUTS

Input — A signed integer between

±

32767.

Mult — A signed integer between

±

32767.

Div — A signed integer between

±

32767.

OUTPUTS

Out LSW — A least significant result word value representing bits
0–15 of a 32 bit output value.

Out MSW — A most significant result word value representing bits
16–31 of a 32 bit output value.

FUNCTION

Out LSW, Out MSW = (Input

×

Mult)

÷

Div.

PARAMETERS

DATA TYPE

LINKABLE

DEFAULT VALUE

RANGE

Input

Signed Integer

Yes

0

±

32767

Mult

Signed Integer

Yes

0

±

32767

Div

Signed Integer

Yes

1

±

32767

Out LSW

Unsigned Integer

No

0 to 65535

Out MSW

Signed Integer

No

±

32767

DOUBLE WORD VALUES

Both the Most Significant Word and the Least Significant Word are
interpreted together by the function algorithm as one word when
using 32 bit values. The range of a double word value is

±

2,147,483,647. The range of the more common, signed single-word

16 bit node is

±

32767.

31

16 15

0

Most Significant Word

Least Significant Word

Node 4

Node 3

Advertising