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. - Copy an array of SINT 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

FFLD Language

  • In the 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.

IL Language

Not available.

ST Language

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

See Also

StringToArray / StringToArrayU