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

SRC

SINT[]

 

N/A

No default

Source array of SINT small integers.

USINT for ArrayToStringU.

DST

STRING

 

N/A

No default

Destination STRING.

COUNTClosed Internal count pulses, 1 pulse = 1/2^20turn.

DINT

 

N/A

No default

Number of characters to be copied.

Outputs

Output

Data Type

Range

Unit

Description

Q

DINT

 

N/A

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 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 Example

Not available.

ST Language Example

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

See Also

StringToArray / StringToArrayU