Program example
■STR_TO_BCD(_E) (when word (unsigned)/16-bit string is specified for (d))
The program which converts string type data input to (s) into BCD type data, and outputs the operation result from (d).
• Function without EN/ENO (STR_TO_BCD)
[Structured ladder/FBD]
[ST]
g_string1 := "0012";
g_word1 := STR_TO_BCD(g_string1);
• Function without EN/ENO (STR_TO_BCD_E)
[Structured ladder/FBD]
[ST]
g_string1 := "0012";
g_bool3 := STR_TO_BCD_E(g_bool1, g_string1, g_word1);
■STR_TO_BCD(_E) (when double word (unsigned)/32-bit string is specified for (d))
The program which converts string type data input to (s) into BCD type data in double word (unsigned)/32-bit string type data,
and outputs the operation result from (d).
• Function without EN/ENO (STR_TO_BCD)
[Structured ladder/FBD]
[ST]
g_string1:= "00000012";
g_dword1:= STR_TO_BCD(g_string1);
• Function without EN/ENO (STR_TO_BCD_E)
[Structured ladder/FBD]
[ST]
g_string1:= "00000012";
g_bool3:= STR_TO_BCD_E(g_bool1, g_string1, g_dword1);
5 APPLICATION FUNCTIONS
5.1 Type Conversion Functions
5
95