Unsigned DOUBLE INTEGER into STRING
This function converts a value of the data type UDINT (positive value) into a value of the data type STRING. It generates a result string in decimal representation that is right aligned. It is filled with leading zeros up to the maximum number of characters defined for the string.
Input
Input data type
Output
Conversion result
Explanation:
Function used |
String1 defined as |
Result |
---|---|---|
String1:=UDINT_TO_STRING(12345678) |
STRING[2] |
'78' |
STRING[4] |
'5678' |
|
STRING[6] |
'345678' |
|
STRING[8] |
'12345678' |
|
STRING[10] |
'0012345678' |
|
STRING[12] |
'000012345678' |
|
and so on... |
When using the data type STRING with small PLCs like FP-e or FP0, make sure that the length of the result string is equal to or greater than the length of the source string.