ArrayToString / ArrayToStringUPLCopen motion icon

FunctionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. - Copy an array of SINT to a STRING.

Inputs

SRC : SINT    Source array of SINT small integers (USINT for ArrayToStringU)
DST : STRING  Destination STRING
COUNT : DINT  Numbers of characters to be copied

Outputs

Q : DINT      Number of characters copied

Remarks

In FFLD 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.

This function copies the COUNT first elements of the SRC array to the characters of the DST string. The function checks the maximum size of the destination string and adjust the COUNT number if necessary.

ST Language

Q := ArrayToString (SRC, DST, COUNT);

FBD Language

FFLD Language

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

IL Language

Not available

See also

StringToArray