TOD_DINT_TO_STRING: Conversion of a variable to TOD format
Original instructions
Function description
The function TOD_DINT_TO_STRING is used to convert a TOD format PL7 variable, or DINT double integer, into a character string.
The additional parameters EN and ENO can be configured.
Representation in FBD
Representation:
Representation in LD
Representation:
Representation in IL
Representation:
LD Time1
TOD_DINT_TO_STRING
ST Result_Str
Representation in ST
Representation:
Result_Str := TOD_DINT_TO_STRING(Time1);
Description of parameters
The following table describes the input parameters:
Parameter
Type
Comment
Time1
PL7 time of day to convert into character string format.
The following table describes the output parameters:
Parameter
Type
Comment
Result_Str
Result_Str is a string of 8 characters containing a time of day in the following format: HH:MM:SS.
Example: ’04:38:49’
Runtime errors
If the string Result_Str is too short to contain the converted value (length = less than 8 characters), it is truncated and the bit %S15 is set to 1.