[R_MG] Read multistate group
Function block R_MG links a group manager object that controls the continuous acquisition of group data (present value/status flag pairs) from multiple data points for a specific group data tag.
R_MG links a group manager object that controls the continuous acquisition of group data (present value/status flag pairs) from multiple data points for a specific group data tag. In addition, the group manager object triggers a configured evaluation function that calculated the resulting value. R_MG periodically reads the evaluated results at a preconfigured interval. A read can also be triggered by an external source.
R_MG can be configured to supply multiple (up to eight) evaluated, resulting values based on the selectable evaluation functions. At least one evaluation function must be configured.
Proprietary objects are necessary for the grouping infrastructure: A group manager object and one or more group member objects. Individual member data points are grouped and referenced via the group member objects and the data is acquired and forwarded by the group member object to the group manager object.
Compatible data points:
- Multistate input [MI]
- Multistate output [MO]
- Multistate calculated value [MCalcVal]
- Multistate configuration value [MCnfVal]
- Multistate process value [MPrcVal]
Required properties of group data points:
- Present value
- Status flag
Input | Description | Data type | Default value |
|---|---|---|---|
Interval | Read interval Configurable polling time that specifies how often the calculated results are read. | Time | 15s_0ms |
ImpRead | Impulse for read Linkable pin that allows an external source to provide a digital pulse to initiate reading. | Boolean | 0 |
EvlFnct1…EvlFnct8 | Evaluation function 1…Evaluation function 8 [EvlFnct1] determines the type of procedure performed on the valid, present values from the acquired group data with a common [GrpTag]. | Integer | 32767 |
3: Minimum | |||
ValMax1…ValMax8 | Maximum value 1…Maximum value 8 Optional, configurable parameter for the evaluation function that sets a high limit for the acquired group data values with a common [GrpTag].
The functionality of [ValMax2]...[ValMax8] is the same as [VaIMax1]. | Integer | 7 |
ValMin1…ValMin8 | Minimum value 1…Minimum value 8 Optional, configurable parameter for the evaluation function that sets a low limit for the acquired group data values with a common [GrpTag].
| Integer | 1 |
GrpTag | Grouping tag Specifies the specific group data (present value, status flags) that the function block acquires and evaluates. | Double Word | 0 |
|
BaObjRef | BA-Object reference | Structure | --- |
BaObjRef | Device identifier | Double Word | 16#3FFFFF |
BaObjRef | Object identifier | Double Word | 16#3FFFFF |
BaObjRef | Item identifier | Integer | -1 |
Output | Description | Data type | Default value |
|---|---|---|---|
Val1...Val8 | Value 1...Value 8 | Integer | 1 |
The evaluated, resulting value based on the evaluation function selected in [EvlFnct1]. [Val1] belongs to one of eight output sets where each contains [ValX], [DstbX], [CntX] and [UpdIndX]. [Val1] indicates:
The functionality of [Val2]...[Val8] is the same as [VaI1]. | |||
Cnt1…Cnt8 | Count 1…Count 8 | Integer | 0 |
The evaluated, resulting value based on the CountOfVal evaluation function selected in [EvlFnct1]. [Cnt1] belongs to one of eight output sets where each contains [ValX], [DstbX], [CntX] and [UpdIndX].
The functionality of [Cnt2]...[Cnt8] is the same as [Cnt1]. | |||
Dstb1...Dstb8 | Disturbance 1...Disturbance 8 [Dstb1] indicates whether the result of the evaluation select on [EvlFnct1] is valid. [Dstb1] belongs to one of eight output sets where each contains [ValX], [DstbX], [CntX] and [UpdIndX]. [Dstb1] = 0 if at least on value is valid in the acquired group data. [Dstb1] = 1 if no value is valid in the acquired group data. The functionality of [Dstb2]...[Dstb8] is the same as [Dstb1]. | Boolean | 0 |
UpdInd1...UpdInd8 | Update indication 1...Update indication 8 [UpdInd1] Indicates that at least one of the present values in the evaluation was updated with a new or the same value. [UpdInd] is only set to 1, if the updated value is located within the configured ValMin/ValMax. [UpdInd1] is set to 1 only if [Dstb1] = 0. The functionality of [UpdInd2]...[UpdInd8] is the same as [UpdInd1]. Note | Boolean | 0 |
NumVals | Number of valid values Number of valid, present values acquired for a specific [GrpTag]. | Integer | 0 |
NumMbrs | Number of aggregated members Number of present values acquired for a specific [GrpTag], typically equal to the number of group member objects addressed by the group manager for a specific group. | Integer | 0 |
ErrCode | Error code indication | Integer | 0: No error |
= 0 - No error | |||