| Volume pwrb | |
| Attributes: Runtime | Development | System | Template | Detail C Binding: Struct | Class | Code  ClassTree | INDEX NO INDEX |
Class IpCollect
|
||
|---|---|---|
| Version | 1.0 | |
| Modified | 15-JAN-2025 13:23:36.00 | |
| Kod | rt_plc_data.c | |
The IpCollect object expands the number of integer attribues that can be handled in a DataArithm object.

The IpCollect has 24 integer inputs, which values are stored in an array. By connecting the output of the IpCollect 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 integer inputs to the DataArithm from ordinary 6 to 96, when all four data inputs are connected to IpCollect objects. Another advantage of IpCollect 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 IpCollect 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 IpCollect object connected
to the Da1 input.
classdef Da1 IpCollect;
int i;
OI1 = 0;
for ( i = 0; i < Da1->MaxIndex; i++)
if ( Da1->Ip[i])
OI1++;
See also| RtBody attributes pwr_sClass_IpCollect | |||
|---|---|---|---|
| Int32 | IpIn1 | Ip1 | Integer input |
| Int32 | IpIn2 | Ip2 | |
| Int32 | IpIn3 | Ip3 | |
| Int32 | IpIn4 | Ip4 | |
| Int32 | IpIn5 | Ip5 | |
| Int32 | IpIn6 | Ip6 | |
| Int32 | IpIn7 | Ip7 | |
| Int32 | IpIn8 | Ip8 | |
| Int32 | IpIn9 | Ip9 | |
| Int32 | IpIn10 | Ip10 | |
| Int32 | IpIn11 | Ip11 | |
| Int32 | IpIn12 | Ip12 | |
| Int32 | IpIn13 | Ip13 | |
| Int32 | IpIn14 | Ip14 | |
| Int32 | IpIn15 | Ip15 | |
| Int32 | IpIn16 | Ip16 | |
| Int32 | IpIn17 | Ip17 | |
| Int32 | IpIn18 | Ip18 | |
| Int32 | IpIn19 | Ip19 | |
| Int32 | IpIn20 | Ip20 | |
| Int32 | IpIn21 | Ip21 | |
| Int32 | IpIn22 | Ip22 | |
| Int32 | IpIn23 | Ip23 | |
| Int32 | IpIn24 | Ip24 | |
| Int32 | MaxIndex | Number of used inputs. | |
| Array of Int32 | Ip | 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 | IpCollect |
| graphname | IpCollect |
| debugpar | |
| Template Object | |
|---|---|
| MaxIndex | 2 |
| IpIn1 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip1 | |
| Kropp | RtBody | |
Integer input An input doesn't has to be connected, the value can be set at runtime or in the configurator.
| IpIn2 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip2 | |
| Kropp | RtBody | |
| IpIn3 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip3 | |
| Kropp | RtBody | |
| IpIn4 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip4 | |
| Kropp | RtBody | |
| IpIn5 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip5 | |
| Kropp | RtBody | |
| IpIn6 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip6 | |
| Kropp | RtBody | |
| IpIn7 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip7 | |
| Kropp | RtBody | |
| IpIn8 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip8 | |
| Kropp | RtBody | |
| IpIn9 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip9 | |
| Kropp | RtBody | |
| IpIn10 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip10 | |
| Kropp | RtBody | |
| IpIn11 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip11 | |
| Kropp | RtBody | |
| IpIn12 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip12 | |
| Kropp | RtBody | |
| IpIn13 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip13 | |
| Kropp | RtBody | |
| IpIn14 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip14 | |
| Kropp | RtBody | |
| IpIn15 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip15 | |
| Kropp | RtBody | |
| IpIn16 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip16 | |
| Kropp | RtBody | |
| IpIn17 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip17 | |
| Kropp | RtBody | |
| IpIn18 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip18 | |
| Kropp | RtBody | |
| IpIn19 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip19 | |
| Kropp | RtBody | |
| IpIn20 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip20 | |
| Kropp | RtBody | |
| IpIn21 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip21 | |
| Kropp | RtBody | |
| IpIn22 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip22 | |
| Kropp | RtBody | |
| IpIn23 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip23 | |
| Kropp | RtBody | |
| IpIn24 Input | ||
|---|---|---|
| Klass | Input | |
| Typ | Int32 | |
| Flags | REDUTRANSFER | |
| GraphName | Ip24 | |
| Kropp | RtBody | |
| MaxIndex Intern | ||
|---|---|---|
| Klass | Intern | |
| Typ | Int32 | |
| Flags | ||
| Kropp | RtBody | |
Number of used inputs.
| Ip Intern | ||
|---|---|---|
| Klass | Intern | |
| Typ | Array of Int32 | |
| Flags | STATE | NOEDIT | ARRAY | REDUTRANSFER | |
| Elements | 24 | |
| Kropp | RtBody | |
Array that contains the value of the inputs.
| OutDataP Output | ||
|---|---|---|
| Klass | Output | |
| Typ | DataRef | |
| Flags | STATE | NOEDIT | |
| GraphName | Out | |
| Kropp | RtBody | |
Data output that can be connected to a DataArithm (or som other Data input).
| PlcNode Buffer | ||
|---|---|---|
| Klass | Buffer | |
| Typ | PlcNode | |
| Flags | INVISIBLE | |
| Kropp | DevBody | |