Nematron Pointe Controller User Manual

Page 420

Advertising
background image

Appendix C: Ladder Diagram Block Reference

Pointe Controller User Guide

418

When EN becomes on, the block function is executed: the Input String 2 (IN2) is
inserted into the Input String 1 (IN1) at the specified Position (POS). The resulting
string is placed in the Output String (OUT).

For example:

IN1: ‘Hello world.’

IN2: ‘This is PointeControl.’

POS: 9

OUT: ‘Hello woThis is PointeControl.rld.’

NOTE: If there are fewer than POS characters in IN1, then IN1 and IN2 are simply
concatenated.

The block function is executed every time the ladder is

scanned

, so long as EN

remains on. If EN becomes off, then OUT remains at its last calculated value until
EN becomes on and the block function is executed again.

Configuration Reference

The parameters of this block are described in the following table:

Param

Name

Config

Var Type

Description

EN

Enable

no

-

The state of the rung (off/on)
received from the left.

ENO

Enable
Out

no

-

The state of the rung (off/on)
passed to the right.

IN1

Input
String 1

req

String

Literal

The input string into which the sub-
string is inserted. Literals must be
enclosed in single quotes (‘ ’).

IN2

Input
String 2

req

String

Literal

The sub-string to be inserted.
Literals must be enclosed in single
quotes (‘ ’).

POS

Position

req

unsigned*

Numeric

The starting position where the
sub-string will be inserted. The first
character corresponds to a Position
of 1.

OUT

Output
String

req

String

The result of inserting the sub-
string. The output is always NULL-
terminated.

* Any unsigned (UB, UW, UD) Input, Output, or Memory tag. For more information, see “

Defining

Input, Output, Memory tags

” on page 114

.

NOTE: If the configured length of the string variable assigned to OUT is smaller
than the result of the function, then the result is truncated to fit. No overflow
error is generated.

Advertising