Fnc163 - Tsub / Rtc Data Subtraction - Mitsubishi Electric MELSEC FX3U Programming Manual

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
21.4
FNC163 – TSUB / RTC Data Subtraction
Outline
This instruction executes subtraction of two time data, and stores the subtraction result to word devices.
1. Instruction format
FNC 163
TSUB
2. Set data
Operand type
S
S
1
1
S
2
D
3. Applicable devices
Bit Devices
Oper-
and
System User
Type
X Y M T C S D .b KnX KnY KnM KnS T C D R U \G
S
S
1
1
S
2
S
D
2
: This function is supported only in FX
Explanation of function and operation
1. 16-bit operation (TSUB)
The time data (hour, minute, and second) stored in
data (hour, minute, and second) stored in
minute, and second) is stored in
Command
input
FNC163
TSUB
S
(hour)
1
S
+1 (minute)
1
S
+2 (second)
1
When the operation result is smaller than 0 hour, the borrow flag turns ON, and the value simply acquired by
subtraction added by 24 hours is stored as the operation result.
When the operation result becomes "0" (0:0:0), the zero flag turns ON.
594
Mnemonic
16-bit Instruction
P
7 steps TSUB
TSUBP
Specifies "hour" of the time data (hour, minute, and second) used in subtraction.
(Three devices are occupied.)
Specifies "hour" of the time data (hour, minute, and second) used in subtraction.
(Three devices are occupied.)
Stores the subtraction result (hour, minute, and second) of two time data. (Three
devices are occupied.)
Digit Specification
3U
,
D
S
S
1
2
S
(hour)
2
S
+1 (minute)
2
S
+2 (second)
2
21 Real Time Clock Control – FNC160 to FNC169
Operation Condition
32-bit Instruction
Continuous
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Unit
/FX
PLCs.
3UC
,
+1, and
S
S
2
2
,
+1, and
S
S
1
1
+1, and
+2.
D
D
(
,
+1,
S
S
1
1
D
→ (
D
D
,
D
(hour)
D
+1 (minute)
D
+2 (second)
21.4 FNC163 – TSUB / RTC Data Subtraction
Mnemonic
Operation Condition
Others
Con-
Real
Index
stant
Number
V Z Modify K H
E
+2 is subtracted from the time
S
2
+2, and the subtraction result (hour,
S
1
+2)−(
,
+1,
S
S
S
1
2
2
D
+1,
+2)
The setting range of "hour" is from 0 to 23.
The setting range of "minute" is from 0 to 59.
The setting range of "second" is from 0 to 59.
Data type
16-bit binary
16-bit binary
16-bit binary
Charac-
Pointer
ter String
" "
P
+2)
S
2

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents