[MAX_PRD] Maximum of a period

Function block MAX_PRD determines the maximum for an analog value within a specific time period.

MAX_PRD determines the maximum for an analog value within a specific time period.

Functioning

Enable and disable the function

The maximum value of the analog input signal [In] is determined within a time period if the function is enabled (EnFnct and EnEvl = 1) and the analog input signal is reliable (Vldty = 1).

Calculation

The maximum value for the present time period is displayed via [PrVal]. After the time period has expired, the maximum value is saved as the maximum value for the recent time period via a pulse at [RctVal]. The pending input value is set as a new maximum value.
The time period, generated outside of MAX_PRD, is determined via a rising slope at input [Imp]. If the input signal is invalid (Vldty = 0), the calculation stops. The last valid values from the outputs are frozen until the signal is valid again.

Subperiods within time periods

Input [EnEvl] can be used to evaluate subperiods within the entire time period.
When EnEvl = 0, evaluation is disabled and the last valid values are displayed at the outputs.
At a pulse, the present maximum value is saved as a maximum value from the last time period.

Reset

Via a rising slope at input [Reset] and a valid input signal (Vldty = 1), the present value [PrVal] takes the valid input value and the recent maximum value [RctVal] is set to zero.
With a [Reset] and an invalid input signal (Vldty = 0) and/or (EnEvl = 0), the [PrVal] is set to - infinity and [RctVal] to zero.

Pins

Input

Description

Data type

Default value
Value range

EnFnct

Enable function

Enables the function.

Boolean

1

0 - The function is disabled.
1 - The function is enabled.

EnEvl

Enable evaluation

Boolean

1

0 - Evaluation is disabled and the valid values at the outputs are frozen.
1 - Evaluation is enabled

In

Input

Input signal

Real

0.0

Imp

Impulse

Pulse input for which the evaluation time period is determined. The rising edge indicates start of new period.

Boolean

0

0 - No
1 - Yes

Vldty

Validity

The present maximum value and maximum value from recent time periods can only be calculated with a valid input signal.

Boolean

1

0 - Input signal is not valid.
1 - Input signal is valid.

Reset

Reset

Boolean

0

0 - No
1 - Yes

Pers

Persistent

Boolean

0

0 - No
1 - Yes: the values are stored persistently.

TshVal

Threshold value

Real

0.1

BaObjRef

BA-Object reference
Link between function block and BACnet object.

Structure

---

BaObjRef
> DeviceID

Device identifier
[DeviceID] includes object type and object instance in one ID.
Identifies the device object: local or remote. A local device object can also be identified by value 16#3FFFFF.

Double Word

16#3FFFFF

BaObjRef
> ObjectID

Object identifier
[ObjectID] includes object type and object instance in one ID.
Identifies the object on a device.

Double Word

16#3FFFFF

BaObjRef
> ItemID

Item identifier
[ItemID] represents an index in a view node object that references the BACnet object.
[ObjectID] and [ItemID] together define an indirect reference to the BACnet object.
Value -1 indicates a direct interface.

Integer

-1

 

Output

Description

Data type

Default value
Value range

PrVal

Present value

Real

0.0

RctVal

Recent value

Real

0.0

Dstb

Disturbed

[Dstb] indicates whether the referenced BACnet object was accessed.
[Dstb] = 0, if:
BACnet object access = Access successful
[Dstb] = 1, if:
BACnet object access = Error during access

Boolean

0

ErrCode

Error code indication

Integer

0: No error

= 0 - No error
> 0 - Error codes

Application

MAX_PRD is used to calculate the maximum value for a time period. By displaying present and recent maximum values from a particular time period, errors, such as wrong control parameters, setpoint violations, or manual intervention, can be identified earlier and faster.

The following example is based on an evaluation period = 1 day: