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

 The ApDistribute has 24 analog outputs, which values can be set from
 an array of Float32 declared in the code of a DataArithm. By connecting
 the data input of the ApDistribute to an data output of a DataArithm,
 and placing the address of the float array in the data output, the
 values of the array will be copied to the Ap output of the ApDistribute
 object. This expands the number of analog outputs from the DataArithm
 from ordinary 9 to 96, if all four data outputs are connected to ApDistribute
 objects.

 Another advantage of ApDistribute 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 ApDistribute
 object. The value can be set at runtime or in the configurator.

 The array should be a static declared array of pwr_tFloat32, with size
 greater or equal to the value in MaxIndex. Use the type pwr_sApDistribute
 defined in $pwr_inc/rt_plc_data.h.

Example

 This is the code in a DataArithm witch has a ApDistribute object connected
 to the ODa1 output.

       static pwr_sApDistribute vect;
       int i;

       ODa1 = vect;
       for ( i = 0; i < 24; i++)
         vect[i] = 0.1 * i;

See also



RtBody attributes pwr_sClass_ApDistribute
Pointer to Void DataIn Da Data input connected to a data output of a DataArithm object.
Float32 ApOut1 Ap1 The value of the first element in the array.
Float32 ApOut2 Ap2 The value of the second element in the array.
Float32 ApOut3 Ap3 The value of the third element in the array.
Float32 ApOut4 Ap4 The value of the corresponding element in the array.
Float32 ApOut5 Ap5 The value of the corresponding element in the array.
Float32 ApOut6 Ap6 The value of the corresponding element in the array.
Float32 ApOut7 Ap7 The value of the corresponding element in the array.
Float32 ApOut8 Ap8 The value of the corresponding element in the array.
Float32 ApOut9 Ap9 The value of the corresponding element in the array.
Float32 ApOut10 Ap10 The value of the corresponding element in the array.
Float32 ApOut11 Ap11 The value of the corresponding element in the array.
Float32 ApOut12 Ap12 The value of the corresponding element in the array.
Float32 ApOut13 Ap13 The value of the corresponding element in the array.
Float32 ApOut14 Ap14 The value of the corresponding element in the array.
Float32 ApOut15 Ap15 The value of the corresponding element in the array.
Float32 ApOut16 Ap16 The value of the corresponding element in the array.
Float32 ApOut17 Ap17 The value of the corresponding element in the array.
Float32 ApOut18 Ap18 The value of the corresponding element in the array.
Float32 ApOut19 Ap19 The value of the corresponding element in the array.
Float32 ApOut20 Ap20 The value of the corresponding element in the array.
Float32 ApOut21 Ap21 The value of the corresponding element in the array.
Float32 ApOut22 Ap22 The value of the corresponding element in the array.
Float32 ApOut23 Ap23 The value of the corresponding element in the array.
Float32 ApOut24 Ap24 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 ApDistr
graphname ApDistr
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.

ApOut1 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap1
Body RtBody
 The value of the first element in the array.

ApOut2 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap2
Body RtBody
 The value of the second element in the array.

ApOut3 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap3
Body RtBody
 The value of the third element in the array.

ApOut4 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap4
Body RtBody
 The value of the corresponding element in the array.

ApOut5 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap5
Body RtBody
 The value of the corresponding element in the array.

ApOut6 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap6
Body RtBody
 The value of the corresponding element in the array.

ApOut7 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap7
Body RtBody
 The value of the corresponding element in the array.

ApOut8 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap8
Body RtBody
 The value of the corresponding element in the array.

ApOut9 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap9
Body RtBody
 The value of the corresponding element in the array.

ApOut10 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap10
Body RtBody
 The value of the corresponding element in the array.

ApOut11 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap11
Body RtBody
 The value of the corresponding element in the array.

ApOut12 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap12
Body RtBody
 The value of the corresponding element in the array.

ApOut13 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap13
Body RtBody
 The value of the corresponding element in the array.

ApOut14 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap14
Body RtBody
 The value of the corresponding element in the array.

ApOut15 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap15
Body RtBody
 The value of the corresponding element in the array.

ApOut16 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap16
Body RtBody
 The value of the corresponding element in the array.

ApOut17 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap17
Body RtBody
 The value of the corresponding element in the array.

ApOut18 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap18
Body RtBody
 The value of the corresponding element in the array.

ApOut19 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap19
Body RtBody
 The value of the corresponding element in the array.

ApOut20 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap20
Body RtBody
 The value of the corresponding element in the array.

ApOut21 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap21
Body RtBody
 The value of the corresponding element in the array.

ApOut22 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap22
Body RtBody
 The value of the corresponding element in the array.

ApOut23 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap23
Body RtBody
 The value of the corresponding element in the array.

ApOut24 Output
Class Output
Type Float32
Flags REDUTRANSFER
GraphName Ap24
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