24: C
LOCK
I
NSTRUCTIONS
24-6
FT1A S
MART
A
XIS
U
SER
’
S
M
ANUAL
FT9Y-B1382
Mode 0
When mode 0 is selected, time data (hour, minute, and second) stored in 3 data registers starting with source device S2 are subtracted from the
time data (hour, minute, and second) stored in 3 data registers starting with source device S1. The results are stored to 3 data registers starting
with destination device D1.
Hour data can be 0 through 23. Minute and second data can be 0 through 59.
When the execution result is less than 00:00:00, the result is added with 24 hours and stored to the data register designated by destination device
D1, turning on special internal relay M8003 (borrow).
When any of the hour, minute, or second data is out of the valid range, a user program execution error will result, turning on special internal relay
M8004 and the ERR LED on the CPU module.
When a user program execution error occurs, the execution of the instruction is canceled and the next instruction is executed. For details about the
user program execution errors, see Chapter 4 “User Program Execution Errors” on page 4-21.
Mode 1
When mode 1 is selected, time data (hour, minute, and second) stored in 3 data registers starting with source device S2 are subtracted from the
date/time data (year, month, day, day of week, hour, minute, and second) stored in 7 data registers starting with source device S1. The results are
stored to 7 data registers starting with destination device D1.
TSUB instruction supports leap years.
For source 1: Year data can be 0 through 99. Month data 1 through 12. Day data 1 through 31. Hour data 0 through 23. Minute and second data 0
through 59.
Year data 0 through 99 is processed as year 2000 through 2099.
For source 2: Hour data can be 0 through 65535. Minute and second data can be 0 through 59.
Destination 1: The day of week is calculated automatically from the resultant year, month, and day, and stored to device D1+3.
Day of week data represent: 0 (Sunday), 1 (Monday), 2 (Tuesday), 3 (Wednesday), 4 (Thursday), 5 (Friday), and 6 (Saturday).
When source 1 contains invalid day/time data, a user program execution error will result, turning on special internal relay M8004 and the ERR LED
on the CPU module.
When the execution result is less than 00 year 1 month 1 day 00:00:00, a user program execution error will result, turning on special internal relay
M8004 and the ERR LED on the CPU module.
When a user program execution error occurs, the execution of the instruction is canceled and the next instruction is executed. For details about the
user program execution errors, see Chapter 4 “User Program Execution Errors” on page 4-21.
Source 1
Hour
S1
(0-23)
Minute
S1+1
(0-59)
Second
S1+2
(0-59)
Source 2
Hour
S2
(0-23)
Minute
S2+1
(0-59)
Second
S2+2
(0-59)
–
Destination 1
Hour
D1
(0-23)
Minute
D1+1
(0-59)
Second
D1+2
(0-59)
Source 1
Year
S1
(0-99)
Month
S1+1
(1-12)
Day
S1+2
(1-31)
–
Destination 1
Year
D1
(0-99)
Month
D1+1
(1-12)
Day
D1+2
(1-31)
Hour
S1+4
(0-23)
Minute
S1+5
(0-59)
Second
S1+6
(0-59)
S1+3
Hour
D1+4
(0-23)
Minute
D1+5
(0-59)
Second
D1+6
(0-59)
D of W
D1+3
(0-6)
Source 2
Hour
S2
(0-65535)
Minute
S2+1
(0-59)
Second
S2+2
(0-59)
(Note)
Note:
Device S1+3 in source 1 is not used for execution and need not be designated.
Содержание microsmart pentra
Страница 1: ...FT1A SERIES FC9Y B1382 Ladder Programming Manual ...
Страница 6: ...Preface 5 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 104: ...7 DATA COMPARISON INSTRUCTIONS 7 10 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 122: ...8 BINARY ARITHMETIC INSTRUCTIONS 8 18 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 138: ...10 SHIFT ROTATE INSTRUCTIONS 10 12 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 162: ...11 DATA CONVERSION INSTRUCTIONS 11 24 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 188: ...12 CALENDAR COMPARISON INSTRUCTIONS 12 26 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 198: ...15 REFRESH INSTRUCTIONS 15 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 202: ...16 INTERRUPT CONTROL INSTRUCTIONS 16 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 266: ...20 DUAL TEACHING TIMER INSTRUCTIONS 20 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 318: ...25 USER COMMUNICATION INSTRUCTIONS 25 22 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...