en:appnote:an007

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
en:appnote:an007 [2017/05/02 14:37] – [Creare una visualizzazione mista non ricorsiva] qem103en:appnote:an007 [2019/08/29 17:01] (current) – external edit 127.0.0.1
Line 476: Line 476:
 </code> </code>
  
-==== Diagnostica Ingressi ====+==== Diagnostic Inputs ====
  
-Si voglia creare una visualizzazione che rappresenti lo stato di ingressi digitaliLo stesso esempio potrà essere poi utilizzato per la rappresentazione di uscite digitaliAssegneremo perciòad ogni ingresso, uno dei segmenti di ciascuno dei tre digit più a destra e lo attiveremo quando il corrispondente ingresso sarà attivo.\\ +You want to create a view that represents the State of digital inputsThe same example can be used for the representation of digital outputsWe will assign to each inputone of the segments of each of the three rightmost digit and we will activate when the corresponding input will be active.\\ 
-La figura mostra l'assegnamento scelto per gli ingressi ed i segmenti dei digit del display:+The figure shows the assignment chose for the inputs and segments of the digits of the display:
  
 {{:software:devices:hmi:an007:an_hmi2_01.png?nolink400|}} {{:software:devices:hmi:an007:an_hmi2_01.png?nolink400|}}
  
-Innanzitutto dichiareremonella unit di configurazione, 9 variabili di dimensione FLAG il cui valore simulerà lo stato dei ingressi digitali.+First we will declarein the configuration unit, 9 variables of FLAG dimensions whose value will simulate the condition of digital inputs.
  
 <code QCL> <code QCL>
Line 498: Line 498:
 </code> </code>
  
-Dichiareremo poi anche un array global da elementi che servirà per contenere i codici dei caratteri da stampare per ogni combinazione degli ingressi.+We will declare a global array to items that will serve to hold character codes to print for each combination of inputs.
  
 <code QCL> <code QCL>
 ARRGBL ARRGBL
- diagnTab B 8 ;tabella caratteri per diagnostica+ diagnTab B 8 ;character table for Diagnostics
 </code> </code>
  
-Infatti per ogni gruppo di tre ingressi associati ad uno dei tre digit sul display avremo possibili combinazioniLa tabella riassumead esempioper la combinazione degli ingressi I7,I8 ed I9, i possibili lo stati del digit associato:+In fact, for each group of three inputs associated with one of the three digits on the display we will have possible combinationsFor examplethe table summarizes the possible States of the digit associated withthe combination of inputs I7,I8 ed I9:
  
 ^I7^I8^I9^Display^ ^I7^I8^I9^Display^
Line 517: Line 517:
 |1|1|1|$| |1|1|1|$|
  
-Servirà infine anche la definizione di alcune costanti da utilizzare come maschera per bit generici di un byte:+Will finally also defining some constants to be used as a mask for generic bits of a byte:
  
 <code QCL> <code QCL>
Line 533: Line 533:
 </code> </code>
  
-Il codice completo per ottenere la funzione di diagnostica è:+The complete code to obtain the diagnostic function is:
  
 <code QCL> <code QCL>
-;inizializza tabella+;Initializes table
   diagnTab[1] = CHAR_   diagnTab[1] = CHAR_
   diagnTab[2] = CHAR_UP   diagnTab[2] = CHAR_UP
Line 546: Line 546:
   diagnTab[8] = CHAR_LOWUPCE   diagnTab[8] = CHAR_LOWUPCE
  
- ;stampa messaggio "INP."  + ;print "INP." message
  hmi:dis6 = CHAR_I  hmi:dis6 = CHAR_I
  hmi:dis5 = CHAR_N   hmi:dis5 = CHAR_N
  • Last modified: 2019/08/29 17:18