en:software:qview:qview_6:qview60

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:software:qview:qview_6:qview60 [2015/04/28 15:06] – [3.12. DATAGROUP variables old] qem207en:software:qview:qview_6:qview60 [2015/04/28 16:06] – [3.11.2. Indexed Variables] qem207
Line 524: Line 524:
 Datagroup variables are a special data structures, that are stored in retentive memory. They are declared in the configuration unit and are suitable to represent a recipe database. \\ Datagroup variables contains two kinds of variable: Datagroup variables are a special data structures, that are stored in retentive memory. They are declared in the configuration unit and are suitable to represent a recipe database. \\ Datagroup variables contains two kinds of variable:
  
-==== - Variabili Statiche ====+==== - Static Variables ====
 <code QCL> <code QCL>
 DATAGROUP DATAGROUP
Line 535: Line 535:
     <variable name> <F/B/W/L/S>     <variable name> <F/B/W/L/S>
 </code> </code>
-Le variabili statiche risiedono nel sottosettore di DATAGROUP nominato come DATAPROGRAM. Il primo valore di questo settore è un numero o una costante interae indica il numero di ricette dell'archivioLe variabili statiche sono da considerarsi come contenitori di un determinato valore per ogni ricettae sono accessibili come un array, dove l'indice è il numero di ricetta desiderataEsempio:+Static variables reside in DATAGROUP subsector named DATAPROGRAM. The first value of this sector is a number or an integer constantand represents the number of recipes in archiveStatic variables are to be considered as containers of a certain value for each recipeand are accessed as an array, where the index is the number of desired recipeExample: 
 <code QCL> <code QCL>
 DATAGROUP DATAGROUP
Line 546: Line 547:
     Variable3     F     Variable3     F
 </code> </code>
-Per far riferimento alla variabile //Variable3// della ricetta 5, viene usato il codice:+To refer to variable //Variable3// in recipe 5, the used code is:
 <code QCL> <code QCL>
 Variable3[5] Variable3[5]
 </code> </code>
  
-Possiamo immaginare la struttura della memoria di una variabile DATAGROUP, nel nostro esempio con variabili statichecome la seguente tabella:+We can imagine the memory structure of a variable DATAGROUP, in our example with static variablesas the following table:
 ^ ^  Variable1  ^  Variable2  ^  Variable3  ^ ^ ^  Variable1  ^  Variable2  ^  Variable3  ^
-^Ricetta 1| | | | +^Recipe 1| | | | 
-^Ricetta 2| | | | +^Recipe 2| | | | 
-^Ricetta 3| | | |+^Recipe 3| | | |
 ^...| | | | ^...| | | |
-^Ricetta 100| | | |+^Recipe 100| | | | 
 + 
 +==== - Indexed Variables ====  
 +<code QCL> 
 +DATAGROUP 
 +  <DataGroup Name> 
 +  DATAPROGRAM 
 +    <number of recipes> 
 +  STEP 
 +    <number of steps> 
 +;Indexed variables declaration 
 +    <variable name> <F/B/W/L/S> 
 +    <variable name> <F/B/W/L/S> 
 +    <variable name> <F/B/W/L/S> 
 +</code> 
 +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> 
 +DATAGROUP 
 +  Name 
 +  DATAPROGRAM 
 +    100 
 +;Static variables declaration 
 +    Variable1     L 
 +    Variable2     S 
 +    Variable3     F 
 +  STEP 
 +    10 
 +;Indexed variables declaration 
 +    Variable4     W 
 +    Variable5     B 
 +</code> 
 +To refer to variable //Variable4// in recipe 5 to step 9, the used code is: 
 +<code QCL> 
 +Variable4[5, 9] 
 +</code> 
 + 
 +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  ^^^^^ 
 +^Recipe 1| | | | | | | | | | | | | | 
 +^:::|:::|:::|:::| | | | | | | | | | | 
 +^Recipe 2| | | | | | | | | | | | | | 
 +^:::|:::|:::|:::| | | | | | | | | | | 
 +^Recipe 3| | | | | | | | | | | | | | 
 +^:::|:::|:::|:::| | | | | | | | | | | 
 +^...| | | | | | | | | | | | | | 
 +^:::|:::|:::|:::| | | | | | | | | | | 
 +^Recipe 100| | | | | | | | | | | | | | 
 +^:::|:::|:::|:::| | | | | | | | | | |
  
 +Other informations:
 +  * In a DATAGROUP all variables, both static and indexed, are retentive (maintain the value at power off).
 +  * The Datagroup variables may be more than one, in this case it is necessary to insert more DATAGROUP keywords.
 +  * The subsection DATAPROGRAM is mandatory, while the STEP is optional.
 +  * The maximum number of recipes can be set is 65534.
 +  * The maximum number of steps can be set is 65534.
 +  * 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//.\\
  • Last modified: 2022/08/31 09:02