Dint_To_Word(_E) - Mitsubishi Electric MELSEC FX Series Structured Programming Manual

Hide thumbs Also See for MELSEC FX Series:
Table of Contents

Advertisement

FXCPU Structured Programming Manual
(Application Functions)

5.1.16 DINT_TO_WORD(_E)

Outline
This function converts double word [signed] data into word [unsigned]/bit string [16-bit] data, and outputs the
data obtained by conversion.
1. Format
Function name
DINT_TO_WORD
DINT_TO_WORD
_E
*1.
Output variable
2. Set data
Variable
EN
Input
variable
_DINT (
ENO
Output
variable
*1
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts double word [signed] data stored in a device specified in
string [16-bit] data, and outputs the data obtained by conversion to a device specified in
Double word [signed] data
12345678
0
0
614E
The information stored in high-order 16 bits is discarded.
Cautions
1) Use the function having "_E" in its name to connect a bus.
2) When handling 32-bit data in structured programs, you cannot specify 16-bit devices directly, different
from simple projects. Use labels when handling 32-bit data.
You can specify 32-bit counters directly, however, because they are 32-bit devices.
Use global labels when specifying labels.
66
FX
3U(C)
Expression in each language
Structured ladder
DINT_TO_WORD
Label
_DINT
X000
DINT_TO_WORD_E
EN
Label
_DINT
Execution condition
Conversion source double word [signed] data
)
s
Execution status
Word [unsigned]/bit string [16-bit] data after conversion
(
)
d
12345678
0 0 0 0 0
0
1
0
1
1
1 1
0 0 0
FX
FX
FX
3G
2N(C)
1N(C)
DINT_TO_WORD(_DINT);
Example:
D10:=
*1
D10
DINT_TO_WORD(Label);
DINT_TO_WORD_E(EN,_DINT,
Output label);
Example:
ENO
DINT_TO_WORD_E(X000, Label,
*1
D10
D10);
Description
614EH
Word [unsigned]/
bit string [16-bit] data
1 1
0 0 0 0
1
0
1
0 0
0
1 1
0 0 0 0
1
0
1
0 0
5 Applied Functions
5.1 Type Conversion Functions
FX
FX
/FX
FX
1S
U
2C
ST
Data type
Bit
Double Word [signed]
Bit
Word [unsigned]/
Bit String [16-bit]
into word [unsigned]/bit
s
.
d
1 1 1
0
1 1 1
0
FX
0N
0(S)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents