Los elementos de arrays de una dimensión se guardan consecutivamente en la memoria del PLC comenzando con el elemento 1. En el ejemplo arriba descrito, se realiza la siguiente asignación de memoria:
Nombre del elemento del array |
Elemento del array |
Dirección FP |
Dirección IEC |
---|---|---|---|
aiVar1dim[0] |
Elemento 1 |
DT0 |
%MW5.0 |
aiVar1dim[1] |
Elemento 2 |
DT1 |
%MW5.1 |
aiVar1dim[2] |
Elemento 3 |
DT2 |
%MW5.2 |
aiVar1dim[3] |
Elemento 4 |
DT3 |
%MW5.3 |
aiVar1dim[4] |
Elemento 5 |
DT4 |
%MW5.4 |
... |
... |
... |
... |
aiVar1dim[13] |
Elemento 14 |
DT13 |
%MW5.13 |
aiVar1dim[14] |
Elemento 15 |
DT14 |
%MW5.14 |
aiVar1dim[15] |
Elemento 16 |
DT15 |
%MW5.15 |