Delete sub-string (del), C.7.9 delete sub-string (del) – Nematron Pointe Controller User Manual

Page 421

Advertising
background image

Pointe Controller User Guide

Appendix C: Ladder Diagram Block Reference

419

C.7.9 Delete sub-string (DEL)

When used in a Ladder Diagram, the DEL block deletes a sub-string of specified
length from the middle of a string (variable or literal) and sends the resulting
string to an output.

Select the

tool (from the

String 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: a sub-string of specified
Length (LEN) is deleted from the Input String (IN), starting at the specified
Position (POS). The resulting string is placed in the Output String (OUT).

For example:

IN: ‘Hello world. This is PointeControl.’

POS: 9

LEN: 8

OUT: ‘Hello wos is PointeControl.’

NOTE: If there are fewer than POS characters in IN, then IN is copied without
changes to OUT.

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.

Advertising