| Volume pwrb | |
| Attributes: Runtime | Development | System | Template | Detail C Binding: Struct | Class | Code  ClassTree | INDEX NO INDEX |
Class DpCollect
|
||
|---|---|---|
| Version | 1.0 | |
| Modified | 08-MAR-2026 11:05:32.00 | |
| Code | rt_plc_data.c | |
The DpCollect object expands the number of Boolean attribues that can be handled in a DataArithm object.

The DpCollect has 24 digital inputs, which values are stored in an array. By connecting the output of the DpCollect object to a Data input of a DataArithm object, it is possible to handle the array in the code of the DataArithm. This expands the number of Digital inputs to the DataArithm from ordinary 6 to 96, if all four data inputs are connected to DpCollect objects. Another advantage of DpCollect is that its sometimes convenient to have the values arranged in an array, for example to handle in an for or while loop. MaxIndex should be assigned the number of used inputs in the DpCollect object. An input doesn't has to be connected, the value can be set at runtime or in the configurator.Example
This is the code in a DataArithm which has a DpCollect object connected
to the Da1 input.
classdef Da1 DpCollect;
int i;
OA1 = 0;
for ( i = 0; i < Da1->MaxIndex; i++)
if ( Da1->Dp[i])
OA1++;
See also| RtBody attributes pwr_sClass_DpCollect | |||
|---|---|---|---|
| Boolean | DpIn1 | Dp1 | Digital input |
| Boolean | DpIn2 | Dp2 | |
| Boolean | DpIn3 | Dp3 | |
| Boolean | DpIn4 | Dp4 | |
| Boolean | DpIn5 | Dp5 | |
| Boolean | DpIn6 | Dp6 | |
| Boolean | DpIn7 | Dp7 | |
| Boolean | DpIn8 | Dp8 | |
| Boolean | DpIn9 | Dp9 | |
| Boolean | DpIn10 | Dp10 | |
| Boolean | DpIn11 | Dp11 | |
| Boolean | DpIn12 | Dp12 | |
| Boolean | DpIn13 | Dp13 | |
| Boolean | DpIn14 | Dp14 | |
| Boolean | DpIn15 | Dp15 | |
| Boolean | DpIn16 | Dp16 | |
| Boolean | DpIn17 | Dp17 | |
| Boolean | DpIn18 | Dp18 | |
| Boolean | DpIn19 | Dp19 | |
| Boolean | DpIn20 | Dp20 | |
| Boolean | DpIn21 | Dp21 | |
| Boolean | DpIn22 | Dp22 | |
| Boolean | DpIn23 | Dp23 | |
| Boolean | DpIn24 | Dp24 | |
| Int32 | MaxIndex | Number of used inputs. | |
| Array of Boolean | Dp | Array that contains the value of the inputs. | |
| DataRef | OutDataP | Out | Data output that can be connected to a DataArithm (or som other Data input). |
| DevBody attributes | |||
|---|---|---|---|
| PlcNode | PlcNode | ||
| GraphPlcNode | |
|---|---|
| object_type | 11 |
| parameters[0] | 24 |
| parameters[1] | 2 |
| parameters[2] | 1 |
| parameters[3] | 0 |
| subwindows | 0 |
| graphmethod | 16 |
| graphindex | 0 |
| default_mask[0] | 3 |
| default_mask[1] | 1 |
| segname_annotation | 1 |
| compmethod | 51 |
| compindex | 0 |
| tracemethod | 0 |
| traceindex | 0 |
| executeordermethod | 2 |
| objname | DpCollect |
| graphname | DpCollect |
| debugpar | |
| Template Object | |
|---|---|
| MaxIndex | 2 |
| DpIn1 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp1 | |
| Body | RtBody | |
Digital input An input doesn't has to be connected, the value can be set at runtime or in the configurator.
| DpIn2 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp2 | |
| Body | RtBody | |
| DpIn3 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp3 | |
| Body | RtBody | |
| DpIn4 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp4 | |
| Body | RtBody | |
| DpIn5 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp5 | |
| Body | RtBody | |
| DpIn6 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp6 | |
| Body | RtBody | |
| DpIn7 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp7 | |
| Body | RtBody | |
| DpIn8 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp8 | |
| Body | RtBody | |
| DpIn9 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp9 | |
| Body | RtBody | |
| DpIn10 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp10 | |
| Body | RtBody | |
| DpIn11 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp11 | |
| Body | RtBody | |
| DpIn12 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp12 | |
| Body | RtBody | |
| DpIn13 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp13 | |
| Body | RtBody | |
| DpIn14 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp14 | |
| Body | RtBody | |
| DpIn15 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp15 | |
| Body | RtBody | |
| DpIn16 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp16 | |
| Body | RtBody | |
| DpIn17 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp17 | |
| Body | RtBody | |
| DpIn18 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp18 | |
| Body | RtBody | |
| DpIn19 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp19 | |
| Body | RtBody | |
| DpIn20 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp20 | |
| Body | RtBody | |
| DpIn21 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp21 | |
| Body | RtBody | |
| DpIn22 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp22 | |
| Body | RtBody | |
| DpIn23 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp23 | |
| Body | RtBody | |
| DpIn24 Input | ||
|---|---|---|
| Class | Input | |
| Type | Boolean | |
| Flags | NOINVERT | REDUTRANSFER | |
| GraphName | Dp24 | |
| Body | RtBody | |
| MaxIndex Intern | ||
|---|---|---|
| Class | Intern | |
| Type | Int32 | |
| Flags | REDUTRANSFER | |
| Body | RtBody | |
Number of used inputs.
| Dp Intern | ||
|---|---|---|
| Class | Intern | |
| Type | Array of Boolean | |
| Flags | STATE | NOEDIT | ARRAY | REDUTRANSFER | |
| Elements | 24 | |
| Body | RtBody | |
Array that contains the value of the inputs.
| OutDataP Output | ||
|---|---|---|
| Class | Output | |
| Type | DataRef | |
| Flags | STATE | NOEDIT | |
| GraphName | Out | |
| Body | RtBody | |
Data output that can be connected to a DataArithm (or som other Data input).
| PlcNode Buffer | ||
|---|---|---|
| Class | Buffer | |
| Type | PlcNode | |
| Flags | INVISIBLE | |
| Body | DevBody | |