Subtract (sub), C.3.2 subtract (sub) – Nematron Pointe Controller User Manual

Page 362

Advertising
background image

Appendix C: Ladder Diagram Block Reference

Pointe Controller User Guide

360

Param

Name

Config

Var Type

Description

IN1

Input
Value 1

req

any Input

any Output

any Memory

T_DONE

T_VALUE

T_PREVAL

Numeric

The first input value.

IN2

Input
Value 2

req

any Input

any Output

any Memory

T_DONE

T_VALUE

T_PREVAL

Numeric

The second input value.

OUT

Output
Value

req

any Input

any Output

any Memory

The result of adding the two input
values together.

NOTE: This function does not check for bit register overflow. You can assign any
variables you wish, but mixing variable sizes – for example, a 32-bit input and an
8-bit output – may result in unusable output.

C.3.2 Subtract (SUB)

When used in a Ladder Diagram, the SUB block subtracts one input from another
and sends the result to output.

Select the

tool (from the

Math Blocks

toolbar) and click on a ladder rung to

insert the following block:

Once the block is inserted, you can double-click on it to

configure

it.

Functional Description

This block always passes the Enable input state (EN) through to the Enable Out
output state (ENO) without change; when EN becomes on, ENO is turned on, and
when EN becomes off, ENO is turned off.

When EN becomes on, the block function is executed: the Input Value 2 (IN2) is
subtracted from the Input Value 1 (IN1) and the result is placed in the Output
Value (OUT).

Advertising