StringToArray / StringToArrayU
Inputs
Input |
Data Type |
Range |
Unit |
Default |
Description |
---|---|---|---|---|---|
SRC |
STRING |
|
N/A |
No default |
Source STRING. |
DST |
SINT |
|
N/A |
No default |
Destination array of SINT small integers. USINT for StringToArrayU. |
Outputs
Output |
Data Type |
Range |
Unit |
Description |
---|---|---|---|---|
Q |
DINT |
|
N/A |
Number of characters copied. |
Remarks
This function:
- Copies the characters of the SRC string to the first characters of the DST array.
- Checks the maximum size destination arrays and reduces the number of copied characters 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
- In the IL Language, the input must be loaded in the current result before calling the function.
Op1: LD SRC
StringToArray DST
ST Q
ST Language Example
Q := StringToArray (SRC, DST);
See Also