OperationalTime (FB) ¶ FUNCTION_BLOCK OperationalTime “warp clock”-enabled operational time (counter). Accumulates the time a device is in operation - connect the “operational” information to xInput. OperationalTime starts to accumulate operational time if xInput is TRUE and was TRUE in the cycle before. OperationalTime stops to accumulate operational time if xInput is FALSE. The operational time can be made persistent using the CODESYS PersistenceManager taking care for the group ‘BuildingLib_OperationalTime’. “Warp clock”-enabled ¶ Certain application domains base their functionality / algorithms on real world wall clock date/time. To develop such functionality it is helpful to have control over the application timeline to speedup testing or doesnt loose control on the timeline sitting on breakpoints. WarpClock and “warp clock”-enabled function blocks provides such a control if needed. For more details about “warp” time see WarpClock . To use “warp” time connect an accordingly configured WarpClock to itfDateTimeProvider. InOut: Scope Name Type Initial Comment Input xInput BOOL FALSE Input to operational time on. xInit BOOL FALSE Initialize the operational time with a given value (tInit). tInit LTIME LTIME#0ns Initialization value xReset BOOL FALSE Reset the operational time itfDateTimeProvider Util.IDateTimeProvider Globals.g_dtpDateTimeProvider Source for the current date and time information in milliseconds since 1.1.1970 00:00:00.000 Output tOp LTIME Operational time xError BOOL Error indication eErrorID Error Error ID
IMethodInvoker (ITF) ¶ INTERFACE IMethodInvoker Interface to invoke a method call. Methods: Invoke Structure: Invoke (Method)
IMethodInvoker.Invoke (METH) ¶ METHOD Invoke This method will be called of direct method calls. InOut: Scope Name Type Comment Input wsMethodName WSTRING Name of the method pbInputPayload POINTER TO BYTE Pointer to the input payload udiMaxInputPayloadSize UDINT Maximum size of pbInputPayload udiPayloadSize UDINT Size of pbInputPayload Output iStatus INT Status of the call
PeriodicTimer (FB) ¶ FUNCTION_BLOCK PeriodicTimer “warp clock”-enabled periodic timer. PeriodicTimer can be used to trigger functionality periodically, xOut is set to TRUE for one execution cycle at the end of each period. “Warp clock”-enabled ¶ Certain application domains base their functionality / algorithms on real world wall clock date/time. To develop such functionality it is helpful to have control over the application timeline to speedup testing or doesnt loose control on the timeline sitting on breakpoints. WarpClock and “warp clock”-enabled function blocks provides such a control if needed. For more details about “warp” time see WarpClock . To use “warp” time connect an accordingly configured WarpClock to itfDateTimeProvider. InOut: Scope Name Type Initial Comment Input xEnable BOOL TRUE Enable the timer tPeriod TIME TIME#1s0ms Period time xReset BOOL FALSE Reset the timer itfDateTimeProvider Util.IDateTimeProvider Globals.g_dtpDateTimeProvider Source for the current date and time information in milliseconds since 1.1.1970 00:00:00.000 Output xOutput BOOL Trigger tRemaining TIME Remaing time in period xError BOOL Error indication eErrorID Error Error ID
IMethodInvoker2 (ITF) ¶ INTERFACE IMethodInvoker2 Interface to invoke a method call, which returns a payload. Methods: Invoke Structure: Invoke (Method)
ValveThermo.ErrorIdOut (PROP) ¶ PROPERTY ErrorIdOut : Error
ValveThermo.ErrorOut (PROP) ¶ PROPERTY ErrorOut : BOOL
ValveThermo.Reset (PROP) ¶ PROPERTY Reset : BOOL
ValveThermo.Setpoint (PROP) ¶ PROPERTY Setpoint : REAL
ExampleFancoil3StageAggregate (FB) ¶ FUNCTION_BLOCK ExampleFancoil3StageAggregate Example how to deal with aggregate / plant variants using “external composition” This example function block implements a fan coil aggregate with an N-stage fan coil. There are three variant aspects in ExampleFancoil3StageAggregate: the heat valve (type) the cool valve (type) the condensate pump (type) Despite the fact there are external elements for those three variant aspects ExampleFancoil3StageAggregate provides the related output values to help to get a better understanding of functionality during simulation / testing. Of course this example falls a bit short on complexity, but thats on purpose to focus on aggregate / plant variants using “external composition”. InOut: Scope Name Type Initial Comment Input xEnable BOOL TRUE Enable usiNumStages USINT (1..3) 3 Number of stages - 1 .. 3 rHeatIn REAL Heat control signal (0..100%). rCoolIn REAL Cool control signal (0..100%). eModeIn HeatCoolOperationMode HeatCoolOperationMode.UNUSED Controller operation mode. rDeviationMode REAL Control deviation related to active operation mode - negative value for HEAT, positive value for COOL xFanSpeedByDeviation BOOL TRUE Control fan speed dependent on control signal (FALSE) or control deviation (TRUE). rFanTresholdStage1Heat REAL -0.5 Treshold to enable fan stage 1 heating (in K for fan control dependent on control deviation, in % for fan control dependent on valve position) rFanTresholdStage2Heat REAL -1.0 Treshold to enable fan stage 2 heating rFanTresholdStage3Heat REAL -2.0 Treshold to enable fan stage 2 heating rFanTresholdStage1Cool REAL 0.5 Treshold to enable fan stage 1 cooling (in K for fan control dependent on control deviation, in % for fan control dependent on valve position) rFanTresholdStage2Cool REAL 1.0 Treshold to enable fan stage 2 cooling rFanTresholdStage3Cool REAL 2.0 Treshold to enable fan stage 2 cooling rFanHysteresis REAL 0.2 Fan stage hysteresis (0..INF K for fan control dependent on control deviation, 0..100 % for fan control dependent on valve position) Fan control dependent on control deviation: fan stage is reduced if control deviation reaches threshold + rFanHysteresis (heat) resp. threshold - rFanHysteresis (cool). Fan control dependent on valve position: fan stage is reduced if valve position reaches threshold + rFanHysteresis. tFanDelay12 TIME TIME#0ms Delay to switch stage 1 => stage 2 tFanDelay23 TIME TIME#0ms Delay to switch stage 2 => stage 3 tFanDelay32 TIME TIME#0ms Delay to switch stage 3 => stage 2 tFanDelay21 TIME TIME#0ms Delay to switch stage 2 => stage 1 tFanFollowUp TIME TIME#2m0s0ms Fan follow-up time - continue to run in stage 1 beyond request. tPreHeat TIME TIME#0ms Coil pre-heat time. tPreCool TIME TIME#0ms Coil pre-cool time. rHeatManual REAL 0.0 Heat valve manual control (0..100%). xHeatManual BOOL FALSE Heat valve manual control used. rCoolManual REAL Cool valve manual control (0..100%). xCoolManual BOOL FALSE Cool valve manual control used. usiFanStageManual USINT (0..3) 0 Fan speed manual control - 0 => off, or stage 1 .. 3 xFanStageManual BOOL FALSE Fan speed manual manual control used. itfValveHeat IValveContinuous Heat valve - plugin your specific continuous valve here. itfValveCool IValveContinuous Cool valve - plugin your specific continuous valve here. itfCondensatePump IActuatorOnOff condensate pump - plugin your specific pump on/off here. xReset BOOL FALSE Reset itfDateTimeProvider Util.IDateTimeProvider Globals.g_dtpDateTimeProvider Source for the current date and time information in milliseconds since 1.1.1970 00:00:00.000 Output eModeOut HeatCoolOperationMode HeatCoolOperationMode.INACTIVE Operation mode. rHeatOut REAL Heat valve signal (0..100%). rCoolOut REAL Cool valve signal (0..100%). xFanStage1 BOOL Fan stage 1 xFanStage2 BOOL Fan stage 2 xFanStage3 BOOL Fan stage 3 usiFanStageOut USINT (0..3) Fan stage - 0 => off, or stage 1 .. 3 - supposed to be used in visualisation eFanState Fan3StageState Actual state xCpumpOut BOOL FALSE Condensate pump. xError BOOL Error indication eErrorID Error Error ID