7 Applied Instructions
7.15 Real Time Clock Control
569
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
1
Outline
2
Instruction List
3
Configuration of
Instruction
4
How to Read
Explanation of
Instructions
5
Basic Instruction
6
Step Ladder
Instructions
7
Applied
Instructions
8
Interrupt Function
and Pulse Catch
Function
A
Relationships
between devices
and addresses
Error
In the following case, it is an operation error, and the error flag (M8067) is turned ON, and the error code is
stored in D8067.
1) When the data of the device specified by is out of the range. (Error code: K6706)
Program example
This is a program for converting the time data being read out from the real-time clock built in the PLC, when
the X020 is ON, into the second unit, and storing in D100, D101.
Operation
1) Reading operation of clock data by TRD
2) Conversion operation to seconds by DHTOS
[Structured ladder]
TRD
EN ENO
d
D10
X020
VAR_SECOND is a global label,
and D100 is defined.
DHTOS
EN
s
ENO
d
VAR_SECOND
D13
VAR_SECOND:=DHTOS(X020,D13);
[ST]
D10:=TRD(X020);
2004
1
31
D11
D10
D12
Year
20
21
23
D14
D13
D15
6D16
Month
Day
hour
minute
second
Real-time
clock
Day of week
Time data
Clock data
20
21
23
73283
D101,D100
D13
D14
D15