Class DpDistribute
Version 1.0
Modified 15-JAN-2025 13:23:37.00
Kod rt_plc_data.c
Distribuerar en vektor med boolean till ett antal attribut av typen Boolean (max 
24 st). 
Vektorn deklareras i en DataArithm, och adressen till vektorn läggs ut 
på en datautgång, till vilken dataingången på DpDistribute-objektet kopplas. 
Elementen i vektorn läggs ut på dp-utgångarna i DpDistribute-objektet. 
Normalt kan endast 6 digital attribut hanteras i en DataArithm, men genom att 
utnyttja DpDistribute kan upp till 96 st hanteras.

I MaxIndex ska antalet utgångar som används i DpDistribute objektet anges.

Vektorn ska vara en static deklarerad array av pwr_tBoolean med antal element 
större eller lika med MaxIndex. I fösta hand ska typen nmps_sDpDistr 
användas, en array av pwr_tBoolean med 24 element som finns deklarerad i 
ssab_inc:rs_plc_macro_nmps.h.

Exempel


Här följer ett exempel på koden i en DataArithm som har
DpDistribute objektet kopplat till ODa1 utgången.

static nmps_sDpDistr vect;
int i;

ODa1 = vect;
for ( i = 0; i < 24; i++)
{
  if (d1)
    vect[i] = 1;
  else
    vect[i] = 0;
}


RtBody attributes pwr_sClass_DpDistribute
Pointer to Void DataIn Da Dataingång som kopplas till en datautgång på ett DataArithm objekt. I koden i
dataartithm-objektet måste datautgången tilldelas adressen till en vektor.
Boolean DpOut1 Dp1 The value of the first element in the array.
Boolean DpOut2 Dp2 The value of the second element in the array.
Boolean DpOut3 Dp3 The value of the third element in the array.
Boolean DpOut4 Dp4 The value of the corresponding element in the array.
Boolean DpOut5 Dp5 The value of the corresponding element in the array.
Boolean DpOut6 Dp6 The value of the corresponding element in the array.
Boolean DpOut7 Dp7 The value of the corresponding element in the array.
Boolean DpOut8 Dp8 The value of the corresponding element in the array.
Boolean DpOut9 Dp9 The value of the corresponding element in the array.
Boolean DpOut10 Dp10 The value of the corresponding element in the array.
Boolean DpOut11 Dp11 The value of the corresponding element in the array.
Boolean DpOut12 Dp12 The value of the corresponding element in the array.
Boolean DpOut13 Dp13 The value of the corresponding element in the array.
Boolean DpOut14 Dp14 The value of the corresponding element in the array.
Boolean DpOut15 Dp15 The value of the corresponding element in the array.
Boolean DpOut16 Dp16 The value of the corresponding element in the array.
Boolean DpOut17 Dp17 The value of the corresponding element in the array.
Boolean DpOut18 Dp18 The value of the corresponding element in the array.
Boolean DpOut19 Dp19 The value of the corresponding element in the array.
Boolean DpOut20 Dp20 The value of the corresponding element in the array.
Boolean DpOut21 Dp21 The value of the corresponding element in the array.
Boolean DpOut22 Dp22 The value of the corresponding element in the array.
Boolean DpOut23 Dp23 The value of the corresponding element in the array.
Boolean DpOut24 Dp24 The value of the corresponding element in the array.
Int32 MaxIndex   Antal använda utgångar. Måste datasättas i attributeditorn (eller i runtiime).

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 DpDistr
graphname DpDistr
debugpar


Template Object
MaxIndex 2


Attributes detail


DataIn Input
Klass Input
Typ Pointer to Void
Flags POINTER | NOEDIT | NOREMOVE | NOINVERT | STATE
GraphName Da
Kropp RtBody
Dataingång som kopplas till en datautgång på ett DataArithm objekt. I koden i 
dataartithm-objektet måste datautgången tilldelas adressen till en vektor.

DpOut1 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp1
Kropp RtBody
 The value of the first element in the array.

DpOut2 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp2
Kropp RtBody
 The value of the second element in the array.

DpOut3 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp3
Kropp RtBody
 The value of the third element in the array.

DpOut4 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp4
Kropp RtBody
 The value of the corresponding element in the array.

DpOut5 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp5
Kropp RtBody
 The value of the corresponding element in the array.

DpOut6 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp6
Kropp RtBody
 The value of the corresponding element in the array.

DpOut7 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp7
Kropp RtBody
 The value of the corresponding element in the array.

DpOut8 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp8
Kropp RtBody
 The value of the corresponding element in the array.

DpOut9 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp9
Kropp RtBody
 The value of the corresponding element in the array.

DpOut10 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp10
Kropp RtBody
 The value of the corresponding element in the array.

DpOut11 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp11
Kropp RtBody
 The value of the corresponding element in the array.

DpOut12 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp12
Kropp RtBody
 The value of the corresponding element in the array.

DpOut13 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp13
Kropp RtBody
 The value of the corresponding element in the array.

DpOut14 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp14
Kropp RtBody
 The value of the corresponding element in the array.

DpOut15 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp15
Kropp RtBody
 The value of the corresponding element in the array.

DpOut16 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp16
Kropp RtBody
 The value of the corresponding element in the array.

DpOut17 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp17
Kropp RtBody
 The value of the corresponding element in the array.

DpOut18 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp18
Kropp RtBody
 The value of the corresponding element in the array.

DpOut19 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp19
Kropp RtBody
 The value of the corresponding element in the array.

DpOut20 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp20
Kropp RtBody
 The value of the corresponding element in the array.

DpOut21 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp21
Kropp RtBody
 The value of the corresponding element in the array.

DpOut22 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp22
Kropp RtBody
 The value of the corresponding element in the array.

DpOut23 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp23
Kropp RtBody
 The value of the corresponding element in the array.

DpOut24 Output
Klass Output
Typ Boolean
Flags REDUTRANSFER
GraphName Dp24
Kropp RtBody
 The value of the corresponding element in the array.

MaxIndex Intern
Klass Intern
Typ Int32
Flags REDUTRANSFER
Kropp RtBody
Antal använda utgångar. Måste datasättas i attributeditorn (eller i runtiime).

PlcNode Buffer
Klass Buffer
Typ PlcNode
Flags INVISIBLE
Kropp DevBody