Mitsubishi Electric MELSEC-Q/L Programming Manual page 102

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Operation error
These functions consist of the following common instructions.
When word (unsigned)/16-bit string type is specified for (s): BCDDA
When double word (unsigned)/32-bit string type is specified for (d): DBCDDA
• In any of the following cases, an operation error occurs, the error flag (SM0) is turned ON, and the corresponding error
code is stored to SD0.
Error
Description
code
4100
When word (unsigned)/16-bit string type is specified for (s), (s) is outside the
range of 0 to 9999.
When double word (unsigned)/32-bit string type is specified for (s), (s) is
outside the range of 0 to 99999999.
4101
The device specified for (d) exceeds the corresponding device range.
Program example
■BCD_TO_STR(_E) (when word (unsigned)/16-bit string is specified for (s))
The program which converts word (unsigned)/16-bit string type data input to (s) into string type data, and outputs the
operation result from (d).
• Function without EN/ENO (BCD _TO_STR)
[Structured ladder/FBD]
[ST]
g_string1 := BCD_TO_STR(g_word1);
• Function with EN/ENO (BCD_TO_STR_E)
[Structured ladder/FBD]
[ST]
g_bool3 := BCD_TO_STR_E(g_bool1, g_word1, g_string1);
■BCD_TO_STR(_E) (when double word (unsigned)/32-bit string is specified for (s))
The program which converts double word (unsigned)/32-bit string type data input to (s) into string type data, and outputs the
operation result from (d).
• Function without EN/ENO (BCD _TO_STR)
[Structured ladder/FBD]
[ST]
g_string1 := BCD_TO_STR(g_dword1);
• Function with EN/ENO (BCD_TO_STR_E)
[Structured ladder/FBD]
[ST]
g_bool3 := BCD_TO_STR_E(g_bool1, g_dword1, g_string1);
5 APPLICATION FUNCTIONS
100
5.1 Type Conversion Functions
Q00J/
QnH
QnPH
Q00/
Q01
QnPRH
QnU
LCPU

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents