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. |
| 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
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.