Dword_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.33 DWORD_TO_WORD(_E)

Outline
This function converts double word [unsigned]/bit string[32-bit] data into word [unsigned]/bit string [16-bit]
data, and outputs the data obtained by conversion.
1. Format
Function name
DWORD_TO_WO
RD
DWORD_TO_WO
RD_E
*1.
Output variable
2. Set data
Variable
EN
Input
variable
_DWORD (
ENO
Output
variable
*1
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function converts double word [unsigned]/bit string [32-bit] data stored in a device specified in
word [unsigned]/bit string [16-bit] data, and outputs the data obtained by conversion to a device specified in
.
d
Double word [unsigned]/
bit string [32-bit] data
1
12345678H
0
0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
5678H
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.
FX
3U(C)
Expression in each language
Structured ladder
DWORD_TO_WORD
Label
_DWORD
X000
DWORD_TO_WORD_E
EN
Label
_DWORD
Execution condition
Conversion source double word [unsigned]/bit string [32-bit] data
)
s
Execution status
Word [unsigned]/bit string [16-bit] data after conversion
(
)
d
12345678H
2
3
4
FX
3G
FX
2N(C)
FX
1N(C)
DWORD_TO_WORD(_DWORD);
Example:
D10:=
*1
D10
DWORD_TO_WORD(Label);
DWORD_TO_WORD_E(EN,
_DWORD, Output label);
Example:
ENO
DWORD_TO_WORD_E(X000,
*1
D10
Label, D10);
Description
5678H
Word [unsigned]/
bit string [16-bit] data
5
6
7
0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0
0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0
5 Applied Functions
5.1 Type Conversion Functions
FX
1S
FX
U
/FX
2C
FX
0N
ST
Data type
Bit
Double Word [unsigned]
/Bit string [32-bit]
Bit
Word [unsigned]/
Bit String [16-bit]
8
1
FX
0(S)
2
3
4
5
6
into
s
A
101

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents