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.

DevBody attributes 
PlcNode PlcNode  


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


DataIn Input
Class Input
Type Pointer to Void
Flags POINTER | NOEDIT | NOREMOVE | NOINVERT | STATE
GraphName Da
Body RtBody
 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.

DpOut1 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp1
Body RtBody
 The value of the first element in the array.

DpOut2 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp2
Body RtBody
 The value of the second element in the array.

DpOut3 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp3
Body RtBody
 The value of the third element in the array.

DpOut4 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp4
Body RtBody
 The value of the corresponding element in the array.

DpOut5 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp5
Body RtBody
 The value of the corresponding element in the array.

DpOut6 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp6
Body RtBody
 The value of the corresponding element in the array.

DpOut7 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp7
Body RtBody
 The value of the corresponding element in the array.

DpOut8 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp8
Body RtBody
 The value of the corresponding element in the array.

DpOut9 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp9
Body RtBody
 The value of the corresponding element in the array.

DpOut10 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp10
Body RtBody
 The value of the corresponding element in the array.

DpOut11 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp11
Body RtBody
 The value of the corresponding element in the array.

DpOut12 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp12
Body RtBody
 The value of the corresponding element in the array.

DpOut13 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp13
Body RtBody
 The value of the corresponding element in the array.

DpOut14 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp14
Body RtBody
 The value of the corresponding element in the array.

DpOut15 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp15
Body RtBody
 The value of the corresponding element in the array.

DpOut16 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp16
Body RtBody
 The value of the corresponding element in the array.

DpOut17 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp17
Body RtBody
 The value of the corresponding element in the array.

DpOut18 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp18
Body RtBody
 The value of the corresponding element in the array.

DpOut19 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp19
Body RtBody
 The value of the corresponding element in the array.

DpOut20 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp20
Body RtBody
 The value of the corresponding element in the array.

DpOut21 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp21
Body RtBody
 The value of the corresponding element in the array.

DpOut22 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp22
Body RtBody
 The value of the corresponding element in the array.

DpOut23 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp23
Body RtBody
 The value of the corresponding element in the array.

DpOut24 Output
Class Output
Type Boolean
Flags REDUTRANSFER
GraphName Dp24
Body RtBody
 The value of the corresponding element in the array.

MaxIndex Intern
Class Intern
Type Int32
Flags REDUTRANSFER
Body RtBody
 Number of used outputs. This value has to be supplied by the user.

PlcNode Buffer
Class Buffer
Type PlcNode
Flags INVISIBLE
Body DevBody