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

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

Vektorn ska vara en static deklarerad array av pwr_tFloat32 med antal element 
större eller lika med MaxIndex. I fösta hand ska typen nmps_sApDistr 
användas, en array av pwr_tFloat32 med 24 element som finns deklarerad i 
$pwr_inc/rt_plc_data.h.


Exempel



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

static nmps_sApDistr vect;
int i;

ODa1 = vect;
for ( i = 0; i < 24; i++)
    vect[i] = 0.1 * i;


RtBody attributes pwr_sClass_ApDistribute
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.
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   Antal använda utgångar. Måste datasättas i attributeditorn (eller i runtime).

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

ApOut1 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap1
Kropp RtBody
 The value of the first element in the array.

ApOut2 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap2
Kropp RtBody
 The value of the second element in the array.

ApOut3 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap3
Kropp RtBody
 The value of the third element in the array.

ApOut4 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap4
Kropp RtBody
 The value of the corresponding element in the array.

ApOut5 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap5
Kropp RtBody
 The value of the corresponding element in the array.

ApOut6 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap6
Kropp RtBody
 The value of the corresponding element in the array.

ApOut7 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap7
Kropp RtBody
 The value of the corresponding element in the array.

ApOut8 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap8
Kropp RtBody
 The value of the corresponding element in the array.

ApOut9 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap9
Kropp RtBody
 The value of the corresponding element in the array.

ApOut10 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap10
Kropp RtBody
 The value of the corresponding element in the array.

ApOut11 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap11
Kropp RtBody
 The value of the corresponding element in the array.

ApOut12 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap12
Kropp RtBody
 The value of the corresponding element in the array.

ApOut13 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap13
Kropp RtBody
 The value of the corresponding element in the array.

ApOut14 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap14
Kropp RtBody
 The value of the corresponding element in the array.

ApOut15 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap15
Kropp RtBody
 The value of the corresponding element in the array.

ApOut16 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap16
Kropp RtBody
 The value of the corresponding element in the array.

ApOut17 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap17
Kropp RtBody
 The value of the corresponding element in the array.

ApOut18 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap18
Kropp RtBody
 The value of the corresponding element in the array.

ApOut19 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap19
Kropp RtBody
 The value of the corresponding element in the array.

ApOut20 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap20
Kropp RtBody
 The value of the corresponding element in the array.

ApOut21 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap21
Kropp RtBody
 The value of the corresponding element in the array.

ApOut22 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap22
Kropp RtBody
 The value of the corresponding element in the array.

ApOut23 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap23
Kropp RtBody
 The value of the corresponding element in the array.

ApOut24 Output
Klass Output
Typ Float32
Flags REDUTRANSFER
GraphName Ap24
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 runtime).

PlcNode Buffer
Klass Buffer
Typ PlcNode
Flags INVISIBLE
Kropp DevBody