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

The ApCollect has 24 analog inputs, which values are stored in an array. By connecting the output of the ApCollect 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 analog inputs to the DataArithm from ordinary 6 to 96, when all four data inputs are connected to ApCollect objects. Another advantage of ApCollect is that its sometimes convenient to have the values arranged in an array, to use for example in an for or while loop. MaxIndex should be assigned the number of used inputs in the ApCollect 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 ApCollect object connected
to the Da1 input.
classdef Da1 ApCollect;
int i;
OA1 = 0;
for ( i = 0; i < Da1->MaxIndex; i++)
if ( Da1->Ap[i])
OA1++;
See also| RtBody attributes pwr_sClass_ApCollect | |||
|---|---|---|---|
| Float32 | ApIn1 | Ap1 | Analog input |
| Float32 | ApIn2 | Ap2 | |
| Float32 | ApIn3 | Ap3 | |
| Float32 | ApIn4 | Ap4 | |
| Float32 | ApIn5 | Ap5 | |
| Float32 | ApIn6 | Ap6 | |
| Float32 | ApIn7 | Ap7 | |
| Float32 | ApIn8 | Ap8 | |
| Float32 | ApIn9 | Ap9 | |
| Float32 | ApIn10 | Ap10 | |
| Float32 | ApIn11 | Ap11 | |
| Float32 | ApIn12 | Ap12 | |
| Float32 | ApIn13 | Ap13 | |
| Float32 | ApIn14 | Ap14 | |
| Float32 | ApIn15 | Ap15 | |
| Float32 | ApIn16 | Ap16 | |
| Float32 | ApIn17 | Ap17 | |
| Float32 | ApIn18 | Ap18 | |
| Float32 | ApIn19 | Ap19 | |
| Float32 | ApIn20 | Ap20 | |
| Float32 | ApIn21 | Ap21 | |
| Float32 | ApIn22 | Ap22 | |
| Float32 | ApIn23 | Ap23 | |
| Float32 | ApIn24 | Ap24 | |
| Int32 | MaxIndex | Number of used inputs. | |
| Array of Float32 | Ap | 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 | ApCollect |
| graphname | ApCollect |
| debugpar | |
| Template Object | |
|---|---|
| MaxIndex | 2 |
| ApIn1 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap1 | |
| Body | RtBody | |
Analog input An input doesn't has to be connected, the value can be set at runtime or in the configurator.
| ApIn2 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap2 | |
| Body | RtBody | |
| ApIn3 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap3 | |
| Body | RtBody | |
| ApIn4 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap4 | |
| Body | RtBody | |
| ApIn5 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap5 | |
| Body | RtBody | |
| ApIn6 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap6 | |
| Body | RtBody | |
| ApIn7 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap7 | |
| Body | RtBody | |
| ApIn8 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap8 | |
| Body | RtBody | |
| ApIn9 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap9 | |
| Body | RtBody | |
| ApIn10 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap10 | |
| Body | RtBody | |
| ApIn11 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap11 | |
| Body | RtBody | |
| ApIn12 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap12 | |
| Body | RtBody | |
| ApIn13 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap13 | |
| Body | RtBody | |
| ApIn14 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap14 | |
| Body | RtBody | |
| ApIn15 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap15 | |
| Body | RtBody | |
| ApIn16 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap16 | |
| Body | RtBody | |
| ApIn17 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap17 | |
| Body | RtBody | |
| ApIn18 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap18 | |
| Body | RtBody | |
| ApIn19 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap19 | |
| Body | RtBody | |
| ApIn20 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap20 | |
| Body | RtBody | |
| ApIn21 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap21 | |
| Body | RtBody | |
| ApIn22 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap22 | |
| Body | RtBody | |
| ApIn23 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap23 | |
| Body | RtBody | |
| ApIn24 Input | ||
|---|---|---|
| Class | Input | |
| Type | Float32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ap24 | |
| Body | RtBody | |
| MaxIndex Intern | ||
|---|---|---|
| Class | Intern | |
| Type | Int32 | |
| Flags | REDUTRANSFER | |
| Body | RtBody | |
Number of used inputs.
| Ap Intern | ||
|---|---|---|
| Class | Intern | |
| Type | Array of Float32 | |
| 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 | |