Mitsubishi Electric MELSEC-Q/L Programming Manual page 72

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

Advertisement

■Operation result
• Function without EN/ENO
An operation is executed and the operation value is output from (d).
• Function with EN/ENO
The following table shows the executing conditions and operation results.
EN
TRUE (Operation execution)
FALSE (Operation stop)
*1 When FALSE is output from ENO, the data output from (d) is undefined. In this case, create a program so that the data output from (d) is
not used.
When the DINT_TO_INT(_E) function is executed, low-order 16-bit data of double word (unsigned)/32-bit
string type data input to (s) are converted into word (signed) type data. High-order 16-bit data are discarded.
Operation error
• No operation error occurs.
Program example
■DWORD_TO_INT(_E)
The program which converts double word (unsigned)/32-bit string type data input to (s) into word (signed) type data, and
outputs the operation result from (d).
• Function without EN/ENO (DWORD_TO_INT)
[Structured ladder/FBD]
[ST]
g_int1:= DWORD_TO_INT(g_dword1);
• Function with EN/ENO (DWORD_TO_INT_E)
[Structured ladder/FBD]
[ST]
g_bool3 := DWORD_TO_INT_E(g_bool1, g_dword1, g_int1);
■DWORD_TO_DINT(_E)
The program which converts double word (unsigned)/32-bit string type data input to (s) into double word (signed) type data,
and outputs the operation result from (d).
• Function without EN/ENO (DWORD_TO_DINT)
[Structured ladder/FBD]
[ST]
g_dint1 := DWORD_TO_DINT(g_dword1);
5 APPLICATION FUNCTIONS
70
5.1 Type Conversion Functions
ENO
TRUE
*1
FALSE
(d)
Operation output value
Undefined value

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents