Mitsubishi Electric MELSEC FX Series Structured Programming Manual page 203

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

Advertisement

FXCPU Structured Programming Manual
(Application Functions)
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.
3) Even if underflow or overflow occurs in the operation result, it is not regarded as an operation error.
However, note that the accurate operation result cannot be obtained in this case.
("SUB_TIME_E" outputs "TRUE" from ENO.)
Either of the flags shown in the table below turns ON or OFF in accordance with the operation result.
Device
M8020
M8021
M8022
Zero flag
-2 , -1 , 0 , -32,768
Borrow flag
Zero flag
-2 , -1 , 0 ,
Borrow flag
Program example
In this program, subtraction (
, and the operation result expressed as time data is output to devices specified in
s2
1) Function without EN/ENO(SUB_TIME)
[Structured ladder]
g_time1
g_time2
[ST]
g_time3:=SUB_TIME(g_time1,g_time2);
2) Function with EN/ENO(SUB_TIME_E)
[Structured ladder]
g_bool1
g_time1
g_time2
[ST]
g_bool3:=SUB_TIME_E(g_bool1,g_time1,g_time2,g_time3);
Name
ON : When the operation result is "0"
Zero
OFF: When the operation result is any other than "0"
ON : When the operation result is less than "-32,768" (16-bit operation) or less than "-
2,147,483,648" (32-bit operation)
Borrow
OFF: When the operation result is "-32,768" (16-bit operation) or more or "-2,147,483,648" (32-
bit operation) or more
ON : When the operation result exceeds "32,767" (16-bit operation) or "2,147,483,647" (32-bit
operation)
Carry
OFF: When the operation result is "32,767" (16-bit operation) or less or "2,147,483,647" (32-bit
operation) or less
The most
significant bit
of data is "1".
-2,147,483,648
-
) is performed using time data stored in devices specified in
s1
s2
SUB_TIME
g_time3
_IN1
_IN2
SUB_TIME_E
EN
ENO
_IN1
_IN2
Description
Zero flag
-1 , 0 , 1
The most
significant bit
of data is "0".
-1 , 0 , 1
2,147,483,647 ,
Zero flag
g_bool3
g_time3
5.9 Functions Of Time Data Types
Zero flag
32,767 ,
0 , 1 , 2
Carry flag
Zero flag
0 , 1 , 2
Carry flag
s1
.
d
201
1
2
3
4
5
6
A
and

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents