1. Read real-time seconds TRDS
1. Read real-time seconds TRDS
1.1. Instruction Description
The instruction reads the current time and date from the hardware clock, converts it into the accumulated number of seconds since 2000/1/1 00:00:00, and writes it into the specified doubleword D register.
1.1.1. Attention:
- Our HMI+PLC All-in-one could not use the function below
1.2. The valid operands of the instruction
| Input/Output | Data Type | operand | Description |
|---|---|---|---|
| SEC | 32-bit unsigned integer | D | seconds |
1.3. Example
Command table
NETWORK 000
LD X000
TRDS D0 // Assuming the current time is 12:00:00 on January 1, 2001, and the number of seconds passed is (366/24+12)/; 60* 60=31,665,600
图1 TRDS