Class IpCollect
Version 1.0
Modified 08-MAR-2026 11:05:32.00
Code 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


Attributes detail


IpIn1 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip1
Body RtBody
 Integer input

 An input doesn't has to be connected, the value can be set at
 runtime or in the configurator.

IpIn2 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip2
Body RtBody

IpIn3 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip3
Body RtBody

IpIn4 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip4
Body RtBody

IpIn5 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip5
Body RtBody

IpIn6 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip6
Body RtBody

IpIn7 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip7
Body RtBody

IpIn8 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip8
Body RtBody

IpIn9 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip9
Body RtBody

IpIn10 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip10
Body RtBody

IpIn11 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip11
Body RtBody

IpIn12 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip12
Body RtBody

IpIn13 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip13
Body RtBody

IpIn14 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip14
Body RtBody

IpIn15 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip15
Body RtBody

IpIn16 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip16
Body RtBody

IpIn17 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip17
Body RtBody

IpIn18 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip18
Body RtBody

IpIn19 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip19
Body RtBody

IpIn20 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip20
Body RtBody

IpIn21 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip21
Body RtBody

IpIn22 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip22
Body RtBody

IpIn23 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip23
Body RtBody

IpIn24 Input
Class Input
Type Int32
Flags REDUTRANSFER
GraphName Ip24
Body RtBody

MaxIndex Intern
Class Intern
Type Int32
Flags
Body RtBody
 Number of used inputs.

Ip Intern
Class Intern
Type Array of Int32
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