Name :String truncation

Symbol :MID

Illustrate:

        Outputs L characters after the P character in IN.

Image:

Parameter:

Parameter | Statement | Type | Description
--- | --- | --- | ---
IN | Input | STRING |
    Enter a string
L | Input | USINT |
    Number of characters
P | Input | USINT |
    Start position
OUT | Output | STRING |
    Output string

Example:

LD:

ST:

TagOut := MID(IN := TagIn, L := TagLen, P := Position);

Interpretation:

parameter | operand | value
--- | --- | ---
IN | TagIn | Enter a value：'ASTR'
L | TagLen | length：2
P | Position | Start position：2
OUT | TagOut | Output value：'ST'

        IN inputs string type data, L inputs the truncated length, P input intercepts the starting position, and OUT outputs the truncated string.