Converting Dint To Word - Mitsubishi Electric MELSEC iQ-R Series Programming Manual

Motion module instructions, standard functions/ function blocks
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

12.24

Converting DINT to WORD

DINT_TO_WORD
This function converts a value from DINT data type to WORD data type.
Structured text
d:=DINT_TO_WORD(s);
Setting data
■Description, type, data type
Argument
Description
s (IN)
Input
d
Output
Processing details
■Operation processing
• This function converts the value input to (s) from DINT data type to WORD data type, and output the converted value from
(d).
• The upper 16-bit data of the input value (DINT data type) are discarded. (Refer to (1) in the figure below.)
(s)
12345678
DINT
12345678
0 0 0 0 0 0 0 0 1 0 1 1 1 1 0 0
614EH
(1)
• Input a DINT data type value to (s).
■Operation result
The operation processing is performed. The operation result is output from (d).
When the DINT_TO_WORD function is executed, the upper 16-bit data of the input value (DINT data type) are
discarded.
Operation error
There is no operation error.
(d)
614EH
WORD
0
1
1
0
0
0
0
1
0
1
0
0
1
1
0
1
1
0
0
0
0
1
0
1
0
0
1
1
Type
Input variable
Output variable
1
0
1
0
12 TYPE CONVERSION FUNCTIONS
12.24 Converting DINT to WORD
12
Data type
DINT
WORD
149

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents