Dword_To_Int(_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.30 DWORD_TO_INT(_E)

Outline
This function converts double word [unsigned]/bit string [32-bit] data into word [signed] data, and outputs the
data obtained by conversion.
1. Format
Function name
DWORD_TO_INT
DWORD_TO_INT
_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 [signed] data, and outputs the data obtained by conversion to a device specified in
Double word [unsigned]/
bit string [32-bit] data
BC614EH
0
0 0 0 0 0 0 0 1 0 1 1 1 1 0 0
24910
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_INT
Label
_DWORD
X000
DWORD_TO_INT_E
EN
ENO
Label
_DWORD
Execution condition
Conversion source double word [unsigned]/bit string [32-bit] data
)
s
Execution status
Word [signed] data after conversion
(
)
d
BC614EH
FX
3G
FX
2N(C)
FX
1N(C)
ST
DWORD_TO_INT(_DWORD);
Example:
D10:=
*1
D10
DWORD_TO_INT(Label);
DWORD_TO_INT_E(EN,
_DWORD, Output label);
Example:
DWORD_TO_INT_E(X000,Label,
*1
D10
D10);
Description
24910
Word [signed] data
0 1 1
0
0
0 0 1 0 1 0 0 1 1 1 0
0 1 1 0 0 0 0 1 0 1 0 0 1 1 1 0
5 Applied Functions
5.1 Type Conversion Functions
FX
1S
FX
U
/FX
2C
FX
0N
Data type
Bit
Double Word [unsigned]/
Bit string [32-bit]
Bit
Word [signed]
.
d
1
FX
0(S)
2
3
4
5
6
into
s
A
95

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents