Mitsubishi Electric MELSEC-Q/L Programming Manual page 53

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

Advertisement

Operation error
• An operation error occurs in the following cases.
Error
Description
code
4100
When the value input exceeds 9999 in the execution of the
INT_TO_BCD(_E)
When the value input exceeds 99999999 in the execution of the
DINT_TO_BCD(_E)
Program example
■INT_TO_BCD(_E)
The program which converts word (signed) type data input to (s) into BCD type data, and outputs the operation result from (d).
• Function without EN/ENO (INT_TO_BCD)
[Structured ladder/FBD]
[ST]
g_word1 := INT_TO_BCD(g_int1);
• Function with EN/ENO (INT_TO_BCD_E)
[Structured ladder/FBD]
[ST]
g_bool3 := INT_TO_BCD_E(g_bool1, g_int1, g_word1);
■DINT_TO_BCD(_E)
The program which converts double word (signed) type data input to (s) into BCD type data, and outputs the operation result
from (d).
• Function without EN/ENO (DINT_TO_BCD)
[Structured ladder/FBD]
[ST]
g_dword1 := DINT_TO_BCD(g_dint1);
Q00J/
QnH
QnPH
QnPRH
Q00/
Q01
5 APPLICATION FUNCTIONS
5.1 Type Conversion Functions
QnU
LCPU
5
51

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents