ArrayToString / ArrayToStringU

PLCopen 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. - Copies elements of a SINT array to a STRING.

Inputs

Input

Data Type

Range

Unit

Default

Description

COUNT

DINT

 

 

 

Number of characters to be copied.

DST

STRING

 

 

 

Destination STRING.

SRC

SINT

 

 

 

Source array of SINT small integers.

USINT for ArrayToStringU.

Outputs

Output

Data Type

Range

Unit

Description

Q

DINT

 

 

Number of characters copied.

Remarks

  • 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 adjusts the COUNT number if necessary.

FBD Language Example

FFLD Language Example

  • In the FFLDClosed "Free Form Ladder Diagram" 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.

IL Language Example

Not available.

ST Language Example

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

See Also

StringToArray / StringToArrayU