Div_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.3.4

DIV_E

Outline
This function performs division using two values (A / B = C ... remainder), and outputs the quotient.
1. Format
Function name
DIV_E
*1.
Output variable
2. Set data
Variable
EN
Input
_IN1 (
variable
_IN2 (
ENO
Output
variable
*1
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
This function performs division (
data stored in devices specified in
using the data type of data stored in devices specified in
d
Example: When the data type is word [signed]
5
(Word
s1
[signed] data)
Cautions
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.
Error
1) An operation error occurs when the divisor stored in a device specified in
not executed.
2) An operation error occurs when the operation result exceeds "32,767" (16-bit operation) or
"2,147,483,647" (32-bit operation).
142
FX
3U(C)
Structured ladder
X000
DIV_E
EN
D0
_IN1
D10
_IN2
Execution condition
Data to be divided, or word device which stores such data
)
s1
Data for division (divisor), or word device which stores such data
)
s2
Execution status
Word device which will store the operation result
(
)
d
/
s1
s2
s1
/
2
s2
(Word
[signed] data)
FX
3G
FX
2N(C)
FX
Expression in each language
DIV_E(EN,_IN1,_IN2,Output
label);
ENO
Example:
DIV_E(X000,D0,D10,D20);
*1
D20
Description
) using word [signed]/double word [signed]/float (single precision)
and
, and outputs the operation result to a device specified in
s2
s1
(Quotient)
2
d
(Word
[signed] data)
5.3 Standard Arithmetic Functions
1N(C)
FX
1S
FX
U
/FX
2C
ST
Bit
ANY_NUM
ANY_NUM
Bit
ANY_NUM
and
.
s2
is "0", and the function is
s2
FX
0N
FX
0(S)
Data type

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents