HvacOnTime (FB)

FUNCTION_BLOCK HvacOnTime EXTENDS AbbLConC3

This function block measures the ontime of a signal in seconds. When DevOn inpur is high, the “SecondsRun” starts to count from the time DevOn input turns high.

The “CyclesCompleted” is incremented each time with a rising edge of DevOn. When Reset is high, the “SecondsRun” and “CyclesCompleted” are set to 0. When the reset is changed from high to low, the “Cycles Completed” still remains 0 if there is no rising edge at input DevOn.

InOut:

Scope

Name

Type

Initial

Comment

Input

DevOn

BOOL

FALSE

1: Device on signal to be connected

Reset

BOOL

FALSE

2: When Reset=True, it resets the inputs “SecondRuns” and “CyclesCompleted”.”

Inout

SecondsRun

UDINT

1: Total measurement range of 1 second up to 136 years

CyclesCompleted

UDINT

2: Number of switching cycles