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). |
| 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
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.
The value of the first element in the array.
The value of the second element in the array.
The value of the third element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
The value of the corresponding element in the array.
Antal använda utgångar. Måste datasättas i attributeditorn (eller i runtime).