Mitsubishi MELSEC-Q/L Programming Manual page 595

Table of Contents

Advertisement

Program Example
(1) The following program adds 1 hour to the clock data read from the clock element, and stores the results into the area
starting from D100 when X20 is turned ON.
[Ladder Mode]
[List Mode]
Step
Instruction
[Operation]
• Time data read operation by the SP.DATERD instruction
Clock element
• Addition by the SP.DATE+ instruction
D3
Hour: 10
D4
Minute: 23
Second: 41
+
D5
D6
2 (Tuesday)
Millisecond: 100
D7
Device
D0
05
Year
D1
5
Month
17
D2
Day
10
D3
Hour
23
D4
Minute
Time data
41
D5
Second
D6
2
Day of week
100
Millisecond
Time data
D10
Hour: 1
D11
Minute: 0
Second: 0
D12
--
D13
Millisecond: 0
D14
S.DATE+, SP.DATE+
Reads out the clock element
data to D0 or later.
Sets the time to D10 or later.
D100
Hour: 11
D101
Minute: 23
Second: 41
D102
--
D103
Millisecond: 100
D104
1
2
3
4
4
6
7
8
593

Advertisement

Table of Contents
loading

Table of Contents