Class DpDistribute
|
| Version |
1.0 |
|
| Modified |
08-MAR-2026 11:05:32.00 |
|
| Code |
rt_plc_data.c |
|
The DpDistribute expands the number of boolean outputs that can be
handled in a DataArithm object.

The DpDistribute has 24 digital outputs, which values can be set from
an array of Boolean declared in the code of a DataArithm. By connecting
the data input of the DpDistribute to an data output of a DataArithm,
and placing the address of the boolean array in the data output, the
values of the array will be copied to the Dp output of the DpDistribute
object. This expands the number of digital outputs from the DataArithm
from ordinary 9 to 96, if all four data outputs are connected to DpDistribute
objects.
Another advantage of DpDistribute 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 outputs in the DpDistribute
object. The value can be set at runtime or in the configurator.
The array should be a static declared array of pwr_tBoolean, with size
greater or equal to the value in MaxIndex. Use the type pwr_sDpDistribute
defined in $pwr_inc/rt_plc_data.h.
Example
This is the code in a DataArithm witch has a DpDistribute object connected
to the ODa1 output.
static pwr_sDpDistribute vect;
int i;
ODa1 = vect;
for ( i = 0; i < 24; i++) {
if ( d1)
vect[i] = 1;
else
vect[i] = 0;
}
See also
|
RtBody attributes pwr_sClass_DpDistribute |
| Pointer to Void |
DataIn |
Da |
Data input connected to a data output of a DataArithm object.
|
| Boolean |
DpOut1 |
Dp1 |
The value of the first element in the array. |
| Boolean |
DpOut2 |
Dp2 |
The value of the second element in the array. |
| Boolean |
DpOut3 |
Dp3 |
The value of the third element in the array. |
| Boolean |
DpOut4 |
Dp4 |
The value of the corresponding element in the array. |
| Boolean |
DpOut5 |
Dp5 |
The value of the corresponding element in the array. |
| Boolean |
DpOut6 |
Dp6 |
The value of the corresponding element in the array. |
| Boolean |
DpOut7 |
Dp7 |
The value of the corresponding element in the array. |
| Boolean |
DpOut8 |
Dp8 |
The value of the corresponding element in the array. |
| Boolean |
DpOut9 |
Dp9 |
The value of the corresponding element in the array. |
| Boolean |
DpOut10 |
Dp10 |
The value of the corresponding element in the array. |
| Boolean |
DpOut11 |
Dp11 |
The value of the corresponding element in the array. |
| Boolean |
DpOut12 |
Dp12 |
The value of the corresponding element in the array. |
| Boolean |
DpOut13 |
Dp13 |
The value of the corresponding element in the array. |
| Boolean |
DpOut14 |
Dp14 |
The value of the corresponding element in the array. |
| Boolean |
DpOut15 |
Dp15 |
The value of the corresponding element in the array. |
| Boolean |
DpOut16 |
Dp16 |
The value of the corresponding element in the array. |
| Boolean |
DpOut17 |
Dp17 |
The value of the corresponding element in the array. |
| Boolean |
DpOut18 |
Dp18 |
The value of the corresponding element in the array. |
| Boolean |
DpOut19 |
Dp19 |
The value of the corresponding element in the array. |
| Boolean |
DpOut20 |
Dp20 |
The value of the corresponding element in the array. |
| Boolean |
DpOut21 |
Dp21 |
The value of the corresponding element in the array. |
| Boolean |
DpOut22 |
Dp22 |
The value of the corresponding element in the array. |
| Boolean |
DpOut23 |
Dp23 |
The value of the corresponding element in the array. |
| Boolean |
DpOut24 |
Dp24 |
The value of the corresponding element in the array. |
| Int32 |
MaxIndex |
|
Number of used outputs. This value has to be supplied by the user. |
| GraphPlcNode |
| object_type |
11 |
| parameters[0] |
1 |
| parameters[1] |
2 |
| parameters[2] |
24 |
| parameters[3] |
0 |
| subwindows |
0 |
| graphmethod |
16 |
| graphindex |
0 |
| default_mask[0] |
1 |
| default_mask[1] |
3 |
| segname_annotation |
1 |
| compmethod |
4 |
| compindex |
0 |
| tracemethod |
0 |
| traceindex |
0 |
| executeordermethod |
2 |
| objname |
DpDistr |
| graphname |
DpDistr |
| debugpar |
|
| Template Object |
| MaxIndex |
2 |
Attributes detail
Data input connected to a data output of a DataArithm object.
In the DataAritm code, the address of en array should be placed in
the connected data output.
The value of the first element in the array.
The value of the second element in the array.
The value of the third element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
Number of used outputs. This value has to be supplied by the user.