Mitsubishi Electric MELSEC-Q/L Programming Manual page 48

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_WORD(_E) function is executed, low-order 16-bit data of double word (signed) type data
input to input variable (s) are converted into word (unsigned)/16-bit string type data. High-order word
(unsigned)/16-bit string type data are discarded.
Operation error
• No operation error occurs.
Program example
■INT_TO_WORD(_E)
The program which converts word (signed) type data input to (s) into word (unsigned)/16-bit string type data, and outputs the
operation result from (d).
• Function without EN/ENO (INT_TO_WORD)
[Structured ladder/FBD]
[ST]
g_word1 := INT_TO_WORD(g_int1);
• Function with EN/ENO (INT_TO_WORD_E)
[Structured ladder/FBD]
[ST]
g_bool3 := INT_TO_WORD_E(g_bool1, g_int1, g_word1);
■DINT_TO_WORD(_E)
The program which converts double word (signed) type data input to (s) into word (unsigned)/16-bit string type data, and
outputs the operation result from (d).
• Function without EN/ENO (DINT_TO_WORD)
[Structured ladder/FBD]
[ST]
g_word1 := DINT_TO_WORD(g_dint1);
5 APPLICATION FUNCTIONS
46
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