Y_YA_DateCompare
This function block will calculate the difference between two real time clock values and provide the difference as a real time clock value. The clock values may be obtained using the RealTimeClock function block.
Parameters:
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_INPUT | ||||
| B | Enable | BOOL | The function block will continue to execute every scan while Enable is TRUE and there are no errors. | FALSE |
| V | Clock1 | Yt_YA_RTC_Struct | The more recent real time clock value. | All zeros in structure |
| V | Clock2 | Yt_YA_RTC_Struct | The older real time clock value. | All zeros in structure |
| VAR_OUTPUT | ||||
| B | Valid | BOOL | The Valid output indicates that the function block is operating normally and the outputs of the function block are valid. | |
| B | Error | BOOL | The Error output is set to TRUE if an error has occurred during the operation of the function block. The output is cleared when the Execute or Enable input becomes FALSE. | |
| E | ErrorID | UINT | The ErrorID output provides the identifier of the error when there is an active error in the function block execution. The output is cleared when the Execute or Enable input becomes FALSE. | |
| V | ClockDiff | Yt_YA_RTC_Struct | Outputs the time difference between Clock1 - Clock2. | |
Note:
Clock1 input will have to be a more recent time instant compared to the Clock2 time instant.
Error Description
See the
Function Block ErrorID List