9 subtract (sub) – Rockwell Automation AutoMax Enhanced Ladder Language Reference Manual User Manual

Page 122

Advertising
background image

5Ć28

5.8.3

Example of the Square Root Instruction

When switch1 is true, the instruction calculates

the square root of 4 and stores a value of 2 in

the variable result.
Had In contained a value of 8, the result of the

square root calculation still would have been 2,

because the result is truncated to a whole

number.

5.9

Subtract (SUB)

Use this instruction to subtract two variables or constants. While EN is true, the

instruction subtracts In2 from In1. The result is stored in Out.

Advertising