EasyManua.ls Logo

Mitsubishi Electric MELSEC-Q/L - Page 719

Mitsubishi Electric MELSEC-Q/L
1084 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
7 APPLICATION INSTRUCTIONS
7.16 Expansion Clock Instructions
717
7
Program example
The following program subtracts the time data stored in the area starting from D10 from the clock data read from the clock
element when X1C is turned ON, and stores the result into the area starting from D100.
[Ladder Mode]
[List Mode]
[Operation]
Time data read operation by the SP.DATERD instruction
Subtraction by the SP.DATE- instruction
Sets the time to D10 or later.
Reads out the clock element
data to D0 or later.
Instruction
Device
Step
05
2
23
D1
D2
Year
Day
Month
8
42
1
3
D0
D3
D4
D5
D6
D7
Hour
Minute
Second
Day of week
Time data
Millisecond
997
Time data
Clock element
8:42:1:997 - 10:40:10:500 -2:1:51:497
Adds 24 to this value
22:1:51:497
D11
D12
D101
D102
Hour: 8
Minute: 42
Second: 1
D4
D5
-
D100D10
D3
Millisecond: 997
D6
D7
3 (Wednesday)
Hour: 10
Minute: 40
Second: 10
Millisecond: 500
--
Hour: 22
Minute: 1
Second: 51
Millisecond: 497
--
D13
D14
D103
D104

Table of Contents

Related product manuals