Rockwell Automation 1336T Function Block Prog. Manual, Series A/B User Manual
Page 111
Advertising
Function Block Library
4–49
1336 FORCE — 5.9 August 1995
SUB
BLOCK TYPE 27 decimal 1B hexadecimal
Subtract
ID =
Exec =
Output
NODE 0
In 1
NODE 1
Sub
NODE 2
DEFINITION
Subtracts two signed integers. Output will be clamped to
±
32767
and not allowed to over or under flow.
INPUTS
In 1 — A signed integer between
±
32767.
Sub — A signed integer between
±
32767.
OUTPUT
Output — A signed integer between
±
32767.
FUNCTION
Output = In 1 – Sub.
PARAMETERS
DATA TYPE
LINKABLE
DEFAULT VALUE
RANGE
In 1
Signed Integer
Yes
0
±
32767
Sub
Signed Integer
Yes
0
±
32767
Output
Signed Integer
No
—
±
32767
EXAMPLES
EXAMPLE 1
EXAMPLE 2
EXAMPLE 3
In 1
+ 10
– 32765
– 5
Sub
+ 15
+ 2
– 23
Output
– 5
– 32767
+ 18
Advertising