PmRealtimeClock (FB)
FUNCTION_BLOCK PmRealtimeClock EXTENDS AbbLConC3
This function block allows to set and display the current time and date.
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
EnableBOOLFALSE
A rising edge (Enable = TRUE) starts the operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. Execution will continue forever until a falling edge (Enable = FALSE) aborts the operation. During Aborting the Busy is still TRUE. Afterward all outputs are reset.
AbbLConC3
Output
BusyBOOLFALSE
Operation is running (while output Error is FALSE)
AbbLConC3
ErrorBOOLFALSE
Operation is stopped with error (while output Busy is FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE. The output ErrorID gives more details about the error.
AbbLConC3
Input
SetBOOLFALSE
FALSE/TRUE edge sets the time and date
HourSetBYTE0
Set input for hours
MinSetBYTE0
Set input for minutes
SecSetBYTE0
Set input for seconds
YearSetWORD0
Set input for years
MonSetBYTE0
Set input for months
DaySetBYTE0
Set input for days
Output
ErrorIDERROR_ID.NO_ERROR
Error code describing error condition
HourActBYTE0
Output hours
MinActBYTE0
Output minutes
SecActBYTE0
Output seconds
YearActWORD1970
Output years
MonActBYTE1
Output months
DayActBYTE1
Output days
WDayActBYTE4
Output weekday no.