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). |
| 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
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 runtiime).