Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 23

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

How to read PART 5 and PART 6
The contents described in this section are provided only for explaining how to read this manual. Thus, the actual description
may differ.
18.28
DINT_TO_INT(_E)
These functions convert DINT type data to INT type data.
Ladder diagram, FBD/LD
[Without EN/ENO]
s
Setting data
■Descriptions, types, and data types
Argument
EN
s(IN)
ENO
d(DINT_TO_INT(_E))
Processing details
■Operation processing
• These functions convert the DINT type data input to (s) to INT type data and output from (d).
• A value input to (s) is the DINT type data value.
■Operation result
1.
Function without EN/ENO
The following table lists the operation results.
Operation result
No operation error occurred
An operation error occurred
2.
Function with EN/ENO
The following table lists the execution conditions and operation results.
Execution condition
EN
TRUE (Executes operation)
FALSE (Stops operation)
*1 When FALSE is output from ENO, data output from (d) is undefined. In that case, modify a program so that the data output from (d) is
not used.
Operation error
Error code
(SD0/SD8067)
3401H
18 TYPE CONVERSION FUNCTIONS
916
18.28 Converting DINT to INT
Indicates function symbols.
When character strings in brackets are added to the end of the function symbol for standard functions and function blocks, the
function symbol indicates multiple functions. For example, "DINT_TO_INT(_E)" means "DINT_TO_INT" and
"DINT_TO_INT_E".
Function symbol
Function symbol to which "(_E)" is added.
Indicates the description format of the ladder diagram, FBD/LD language and ST (structured text) language.
In the square , either of the following symbol should be described.
• Standard function: Function symbol
• Standard function block: Instance name and function block symbol
The sign of return value of the standard function of FBD/LD is not displayed.
Indicates the description, type and data type of each argument.
Indicates the functions of each standard function or function block.
Indicates an error code which occurs at the execution and the error description when the standard function or the function
block has a specific operation error.
A device in which an error code is stored is described in the error code column. When an error code is stored in SD0, the error
flag SM0 turns on.
Converting DINT to INT
[With EN/ENO]
d
EN
ENO
s
d
Description
Execution condition (TRUE: Execution, FALSE: Stop)
Input
Output status (TRUE: Normal, FALSE: Abnormal)
Output
(s)
(d)
1234
1234
DINT
INT
Operation result
ENO
TRUE (Operation error did not occur)
FALSE (Operation error occurred)
*1
FALSE
Description
The 32-bit signed binary data in the device specified by (s) is out of the valid range (-32768 to 32767).
Description of symbol
Indicates that the description format with EN/ENO can be used in the standard function and function block.
Structured text
[Without EN/ENO]
d:=DINT_TO_INT(s);
[With EN/ENO]
d:=DINT_TO_INT_E(EN,ENO,s);
Type
Data type
Input variable
BOOL
Input variable
DINT
Output variable
BOOL
Output variable
INT
(d)
Operation output value
Indefinite value
(d)
Operation output value
*1
Indefinite value
Indefinite value
21

Hide quick links:

Advertisement

loading