5.1 Type Conversion Functions
5.1.26
Word (unsigned)/16-bit string, double word (unsigned)/32-bit string type
→
time type conversion
5-81
5
APPLICATION
FUNCTIONS
WORD_TO_TIME(_E),
DWORD_TO_TIME(_E)
WORD_TO_TIME(_E), DWORD_TO_TIME(_E)
Operation Error
No operation error occurs in the execution of the WORD_TO_TIME(_E) and
DWORD_TO_TIME(_E) functions.
Program Example
(1) The program which converts word (unsigned)/16-bit string type data input to into time
type data, and outputs the operation result from .
(a) Function without EN/ENO (WORD_TO_TIME)
[Structured ladder]
[ST]
g_time1 := WORD_TO_TIME (g_word1);
(b) Function with EN/ENO (WORD_TO_TIME_E)
[Structured ladder]
[ST]
g_bool3 := WORD_TO_TIME_E (g_bool1, g_word1, g_time1);
(2) The program which converts double word (unsigned)/32-bit string type data input to into
time type data, and outputs the operation result from .
(a) Function without EN/ENO (DWORD_TO_TIME)
[Structured ladder]
[ST]
g_time1 := DWORD_TO_TIME (g_dword1)
s
d
s
d