Name :Real-time clock

Symbol:RTC

Illustrate:

        You can use the "Real-Time Clock" function block, on the IN rising edge, to adjust the current local time, or as an hour counter, on the IN falling edge, to revert to the datetime default

Image:

Parameter:

Parameter | Statement | Type | Description
--- | --- | --- | ---
IN | Input | BOOL |
    At the rising edge, the CDT output is equal to the PDT set value and begins to increase, and when at the falling edge, the CDT output is set to DT#1970-01-01-00:00:00
PDT | Input | DT |
    Date and time presets
Q | Output | BOOL |
    CDTWhen timing continues, the Q output is TRUE
CDT | Output | DT |
    Datetime output value

Example:

LD:

ST:

RTC_inst1(IN := in, PDT := pdt, Q => q, CDT => cdt );

Interpretation:

       IN indicates that the control RTC function block starts counting or reverts to the default value, which needs to be operated on the rising or falling edge. PDT stands for Date Time Preset. IF Q IS TRUE, THE CURRENT RTC IS COUNTING, AND IF IT IS FALSE, THERE IS NO COUNTING. CDT is the output value of the current date and time.