Both sides previous revision Previous revision | Next revisionBoth sides next revision |
en:software:qview:qview_6:qview60 [2015/04/28 15:49] – [3.11.1. Static Variables] qem207 | en:software:qview:qview_6:qview60 [2015/04/28 16:06] – [3.11.2. Indexed Variables] qem207 |
---|
<variable name> <F/B/W/L/S> | <variable name> <F/B/W/L/S> |
</code> | </code> |
Le variabili indicizzate risiedono nel sottosettore di DATAGROUP nominato come STEP. La loro funzione è quella di introdurre per ogni ricetta, il concetto di passo. Il primo valore di questo settore è un numero o una costante intera, e indica il numero di passi per ogni ricetta dell'archivio. Le variabili indicizzate sono da considerarsi come contenitori di una lista di valori per ogni ricetta, e sono accessibili come un array a 2 dimensioni, dove il primo valore è il numero di ricetta, il secondo il passo desiserato. Esempio: | Indexed variables reside in DATAGROUP subsector named STEP. Their function is to introduce for each recipe, the concept of step. The first value of this sector is a number or an integer constant, and represents the number of steps for each recipe in archive. Indexed variables are to be considered as containers of a list of values for each recipe, and are accessed as a 2-dimensional array, where the first value is the number of the recipe, the second the number of desired step. Example: |
<code QCL> | <code QCL> |
DATAGROUP | DATAGROUP |
Variable5 B | Variable5 B |
</code> | </code> |
Per far riferimento alla variabile //Variable4// della ricetta 5 al passo 9, viene usato il codice: | To refer to variable //Variable4// in recipe 5 to step 9, the used code is: |
<code QCL> | <code QCL> |
Variable4[5, 9] | Variable4[5, 9] |
</code> | </code> |
| |
Possiamo immaginare la struttura della memoria di una variabile DATAGROUP, nel nostro esempio con variabili statiche e indicizzate, come la seguente tabella: | We can imagine the memory structure of a variable DATAGROUP, in our example with static and indexed variables, as the following table: |
| |
^ ^ Variable1 ^ Variable2 ^ Variable3 ^ Variable4 ^^^^^ Variable5 ^^^^^ | ^ ^ Variable1 ^ Variable2 ^ Variable3 ^ Variable4 ^^^^^ Variable5 ^^^^^ |
^Ricetta 1| | | | | | | | | | | | | | | ^Recipe 1| | | | | | | | | | | | | | |
^:::|:::|:::|:::| | | | | | | | | | | | ^:::|:::|:::|:::| | | | | | | | | | | |
^Ricetta 2| | | | | | | | | | | | | | | ^Recipe 2| | | | | | | | | | | | | | |
^:::|:::|:::|:::| | | | | | | | | | | | ^:::|:::|:::|:::| | | | | | | | | | | |
^Ricetta 3| | | | | | | | | | | | | | | ^Recipe 3| | | | | | | | | | | | | | |
^:::|:::|:::|:::| | | | | | | | | | | | ^:::|:::|:::|:::| | | | | | | | | | | |
^...| | | | | | | | | | | | | | | ^...| | | | | | | | | | | | | | |
^:::|:::|:::|:::| | | | | | | | | | | | ^:::|:::|:::|:::| | | | | | | | | | | |
^Ricetta 100| | | | | | | | | | | | | | | ^Recipe 100| | | | | | | | | | | | | | |
^:::|:::|:::|:::| | | | | | | | | | | | ^:::|:::|:::|:::| | | | | | | | | | | |
| |
Altre informazioni: | Other informations: |
* In un DATAGROUP tutte le variabili, sia statiche che indicizzate, sono ritentive (mantengono il valore allo spegnimento). | * In a DATAGROUP all variables, both static and indexed, are retentive (maintain the value at power off). |
* Le variabili Datagroup possono essere più di una, in questo caso è necessario inserire più parole chiave DATAGROUP. | * The Datagroup variables may be more than one, in this case it is necessary to insert more DATAGROUP keywords. |
* La sottosezione DATAPROGRAM è obbligatoria, mentre quella STEP è opzionale. | * The subsection DATAPROGRAM is mandatory, while the STEP is optional. |
* Il numero massimo di ricette impostabile è 65534. | * The maximum number of recipes can be set is 65534. |
* Il numero massimo di passi impostabile è 65534. | * The maximum number of steps can be set is 65534. |
* Rispetto ad un comune array, le variabili statiche possono supportare anche un dato di dimensione Flag (F). | * Compared to a common array, static variables can also support a Flag size data (F). |
===== - DATAGROUP variables old ===== | ===== - DATAGROUP variables old ===== |
Datagroup variables are a special data structures. When declaring a datagroup, a part of memory is organised in a table of rows and columns. The columns are called //programs// or //recipes//, while the rows are //steps//.\\ | Datagroup variables are a special data structures. When declaring a datagroup, a part of memory is organised in a table of rows and columns. The columns are called //programs// or //recipes//, while the rows are //steps//.\\ |