StringToArray / StringToArrayU

Function - Copies the characters of a STRING to an array of SINT.

Inputs

SRC : STRING  Source STRING
DST : SINT    Destination array of SINT small integers (USINT for StringToArrayU)

Outputs

Q : DINT      Number of characters copied

Remarks

In LD language, the operation is executed only if the input rung (EN) is TRUE. The output rung (ENO) keeps the same value as the input rung. In IL, the input must be loaded in the current result before calling the function.

This function copies the characters of the SRC string to the first characters of the DST array. The function checks the maximum size destination arrays and reduces the number of copied characters if necessary.

ST Language

Q := StringToArray (SRC, DST);

FBD Language

LD Language

(* The function is executed only if EN is TRUE *)
(* ENO keeps the same value as EN *)

IL Language:

Op1: LD            SRC
     StringToArray DST
     ST            Q

See also

ArrayToString