en:software:devices:aninp2

Differences

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

Link to this comparison view

Next revision
Previous revision
en:software:devices:aninp2 [2016/09/30 15:51] – created qem103en:software:devices:aninp2 [2020/07/13 14:50] (current) qem103
Line 2: Line 2:
  
  
-===== - Introduzione =====+====== - Introduction ======
  
-  * Il device gestisce la lettura ed elaborazione di un ingresso analogico+  * The device manage the reading and processing of an analog input
-  * Il dato letto è una word a 16 bit con segno alla quale è possibile sommare un offset, inserire un fattore di scala ed attivare un filtro software passa basso del tipo RC. +  * The read data is word to signed 16-bit which you can add an offset, enter a scaling factor and activate a low-pass RC filter type software
-  * Le specifiche di risoluzione dell’ingresso vengono riportate nel fascicolo hardware della scheda+  * Input resolution specifications are listed in the file adapter of the card
-  * Le uscite sono programmabili per eseguire comparazioni sull’ingresso analogico+  * The outputs can be programmed to perform comparisons on analogue input
  
 {{ :software:devices:aninp2:aninp2_01.png?nolink500 |}} {{ :software:devices:aninp2:aninp2_01.png?nolink500 |}}
  
-===== - Installazione =====+===== - Installation =====
  
-Dichiarazione del device nella unit di configurazione +Device declaration in the configuration unit. 
-Nella unit di configurazionela sezione BUS deve essere dichiarata in modo tale che siano +In the configuration unit, the BUS section must be declared so that they are 
-presenti le risorse hardware necessarie all’implementazione del device ANINP2Deve essere +present the hardware resources required for the implementation of the ANINP2 device. Must be at least one analog input with 16-bit resolution.\\ 
-presente almeno un ingresso analogico con risoluzione massima di 16 bit.\\ +In the INTDEVICE section of the configuration unit must be to add the following definition:
-Nella sezione INTDEVICE della unit di configurazione deve essere aggiunta la seguente definizione:+
  
 <code QCL> <code QCL>
 ;--------------------------------- ;---------------------------------
-Dichiarazione devices+Devices Declaration
 ;--------------------------------- ;---------------------------------
 INTDEVICE INTDEVICE
 ... ...
-<nome device>   ANINP2   Tcamp   IChn   Type     Out1 Out2+<device name>   ANINP2   Tcamp   IChn   Type     Out1 Out2
 </code> </code>
  
-dove+where
-|<nome device>|Nome assegnato al device| +|<device name>|The name assigned to the device| 
-|ANINP2|Parola chiave che identifica il device ingresso analogico+|ANINP2|Keyword that identifies the device analog input
-|Tcamp|Tempo campionamento device (1÷255 ms)| +|Tcamp|Time sampling device (1÷255 ms)| 
-|IChn|indirizzo ingresso ADC| +|IChn|Address ADC input
-|Type|Numero indentificativo tipo di ingresso (fare riferimento alla scheda tecnica hardware)| +|Type|ID number input type (refer to technical data sheet hardware)| 
-|Out1|Indirizzo uscita di comparazione (per evitare che il device utilizzi questa risorsa inserire il carattere X.X)| +|Out1|1 Output Address of comparison (to prevent the device uses this resource to put the X.X character)| 
-|Out2|Indirizzo uscita di comparazione (per evitare che il device utilizzi questa risorsa inserire il carattere X.X)|+|Out2|2 Output Address of comparison (to prevent the device uses this resource to put the X.X character)|
  
-===== - Esempio =====+===== - Example =====
  
 <code QCL> <code QCL>
 ;--------------------------------- ;---------------------------------
-Dichiarazione devices+Device declaration
 ;--------------------------------- ;---------------------------------
 INTDEVICE INTDEVICE
-Asse_X   ANINP2     2.AI01     2.OUT01   2.OUT02+Axis_X   ANINP2     2.AI01     2.OUT01   2.OUT02
 </code> </code>
  
-===== - Funzionamento =====+===== - Operation =====
  
-All’accensione del sistemail device controlla la corretta dichiarazione del tipo di ingresso da +When the system is poweredthe device checks the correct input type declaration to use defined in configuration (Type) unit.\\ 
-utilizzare, definito nella unit di configurazione (Type).\\ +If the channel diagnostics ends successfullydata is upgraded on the basis of sampling timeIf errors or inaccuracies are foundthe 
-Se la diagnostica del canale si conclude con successoviene eseguito l‘aggiornamento dei dati +//st_errcfg// state is set to one and the value of the //outbit// variable is forced to zero. 
-sulla base del tempo di campionamentoNel caso vengano riscontrati errori o imprecisionilo +The conversion of the data output from the (//outbit//devicein the unit of measure required by your application
-stato //st_errcfg// viene impostato a uno ed il valore della variabile //outbit// viene forzato a zero. +is performed using scale factors (//scaleA//, //scaleB// e //scaleC//according to the formula:
-La conversione del dato in uscita dal device (//outbit//), nell’unità di misura necessaria per l’applicazione+
-viene eseguita ricorrendo a dei fattori di scala (//scaleA//, //scaleB// e //scaleC//secondo la +
-formula:+
  
 //**outUm = (scaleA x outbit / scaleB) + scaleC**// //**outUm = (scaleA x outbit / scaleB) + scaleC**//
  
-Oltre a questa uscita aggiornata sulla base del tempo di campionamento del device, è disponibile +In addition to this updated release based on the sample time of the device, is available the 
-l‘uscita //outUmF//, filtrata con un tempo di carica programmabile (espresso in ms). +//outUmF// outputfiltered using a programmable charge time (in ms). 
-<WRAP center round info 60%> + 
-Questa funzionalità permette +^:info:^This feature allows you to filter any interferences and fluctuations superimposed to the wanted signal, with the ability to customize the charging time of the filter (//tfilter//).^
-di filtrare eventuali disturbi +
-e fluttuazioni +
-sovrapposte al segnale utile +
-con la possibilità di +
-personalizzare il tempo di +
-carica del filtro (//tfilter//). +
-</WRAP>+
  
 {{:software:devices:aninp2:aninp2_02.png?nolink500}} {{:software:devices:aninp2:aninp2_02.png?nolink500}}
  
-==== - Gestione uscite ====+==== - Outputs management ====
  
-Il device ha la possibilità di gestire delle comparazioni sull’ingresso analogico mediato (//outUmF//+The device he can handle analog input mediated comparisons (//outUmF//
-e variare lo stato delle uscite programmabili in modalità one shot (singola attivazione).\\ +and change the status of the programmable outputs in one shot mode (single activation).\\ 
-Ogni uscita ha la possibilità di essere gestita nei modi seguenti:+Each output can be handled in the following ways:
  
-|{{:software:devices:aninp2:aninp2_03.png?nolink250}}|Attivazione al superamento del setpoint con l’ingresso che si incrementa+|{{:software:devices:aninp2:aninp2_03.png?nolink250}}|Activating setpoint is exceeded by the input that increases
-|{{:software:devices:aninp2:aninp2_04.png?nolink250|}}|Disattivazione al superamento del setpoint con l’ingresso che si incrementa+|{{:software:devices:aninp2:aninp2_04.png?nolink250|}}|Disable setpoint is exceeded by the input that increases
-|{{:software:devices:aninp2:aninp2_05.png?nolink250|}}|Attivazione al superamento del setpoint con l’ingresso che si decrementa+|{{:software:devices:aninp2:aninp2_05.png?nolink250|}}|Activating setpoint is exceeded by the input which decrements
-|{{:software:devices:aninp2:aninp2_06.png?nolink250|}}|Disattivazione al superamento del setpoint con l’ingresso che si decrementa+|{{:software:devices:aninp2:aninp2_06.png?nolink250|}}|Disable setpoint is exceeded by the input which decrements
-|{{:software:devices:aninp2:aninp2_07.png?nolink250|}}|Attivazione al superamento del setpoint con l’ingresso che si incrementa e disattivazione al superamento del setpoint con l’ingresso che si decrementa+|{{:software:devices:aninp2:aninp2_07.png?nolink250|}}|Activating setpoint is exceeded by the input that is incremented and disable setpoint is exceeded by the input which decrements
-|{{:software:devices:aninp2:aninp2_08.png?nolink250|}}|Disattivazione al superamento del setpoint con l’ingresso che si incrementa e attivazione al superamento del setpoint con l’ingresso che si decrementa|+|{{:software:devices:aninp2:aninp2_08.png?nolink250|}}|Disable setpoint is exceeded by the input that is incremented and activating setpoint is exceeded by the input which decrements|
  
-==== - Isteresi ====+==== - Hysteresis ====
  
-Il device ha la possibilità di gestire le comparazioni delle uscite con un interesi.\\ +The device can manage the output comparisons with interests.\\ 
-Ogni volta che il device varia lo stato di un uscitala comparazione viene disabilitata finché +Whenever the device varies the State of an outputthe input is disabled until the comparison does not deviate from the setpoint hysteresis value.\\ 
-l’ingresso non si discosta dal punto del setpoint del valore di isteresi.\\ +Specifically the comparison is rearm when the entrance takes on the values listed in the examples following:\\
-Nello specifico la comparazione si ri-arma quando l’ingresso assume i valori riportati negli esempi +
-a seguito:\\+
 |Mode = 1|outUmF = setpoint - hysteresis| |Mode = 1|outUmF = setpoint - hysteresis|
 |Mode = 2|outUmF = setpoint - hysteresis| |Mode = 2|outUmF = setpoint - hysteresis|
 |Mode = 3|outUmF = setpoint + hysteresis| |Mode = 3|outUmF = setpoint + hysteresis|
 |Mode = 4|outUmF = setpoint + hysteresis| |Mode = 4|outUmF = setpoint + hysteresis|
-Se si utilizzano i modi 6, l’uscita si comporterà nel modo seguente+If you are using the snd modesthe output will behave as follows
-| |Attivazione|Disattivazione|+| |Activation|Deactivation|
 |Mode = 5|outUmF = setpoint|outUmF = setpoint - hysteresis| |Mode = 5|outUmF = setpoint|outUmF = setpoint - hysteresis|
 |Mode = 6|outUmF = setpoint - hysteresis|outUmF = setpoint| |Mode = 6|outUmF = setpoint - hysteresis|outUmF = setpoint|
  
-===== - Gestione errori device =====+===== - Device Error Management =====
  
-La presenza di un errore nel device viene segnalato dallo stato //st_error//.\\ +A bug in the device is signaled by the //st_error// state.\\ 
-Quando st_error è uguale a 1, troviamo presente sulla variabile //errcode// il tipo di errore intervenuto +When st_error is equal to 1, we find the //errcode// variable for the error type 
-(vedi tabellae nella variabile //errvalue// una indicazione sulla causa dell’errore+(see the tableand the //errvalue// variable for the indication on the cause of the error
  
-^Codice^Priorità^Descrizione^+^Code^Priority^Description^
 |-|-|-| |-|-|-|
  
-Se il device va in erroreper poter riprendere la lavorazione bisogna cancellare lo stato //st_error// attraverso il comando //RSERR//.+If the device goes in errorin order to start the work you must to clear the //st_error// status through the //RSERR// command.
  
-===== - Gestione warning device =====+===== - Warning Device Management =====
  
-La presenza di un warning nel sistema camming viene segnalato dallo stato //st_warning//.\\ +warning in the camming system is reported by the //st_warning// state.\\ 
-Essendo causato da un evento non grave ed essendo garantita in questa situazione la gestione +Being caused by a minor event and being guaranteed in this situation, the management of the slave axisthe slave axis continues his work.\\ 
-dell’asse slave, l’asse slave continua il suo lavoro.\\ +When //st_warning// variable is 1, are present on the wrncode variable the warning type 
-Quando //st_warning// è uguale a 1, troviamo presente sulla variabile wrncode il tipo di warning +(see the tableand in the //wrnvalue// variable an indication as to the cause that produced the warning.
-intervenuto (vedi tabellae nella variabile //wrnvalue// una indicazione sulla causa che ha provocato +
-il warning.+
  
-^Codice^Priorità^Descrizione+^Code^Priority^Description
-|1|0|Comando non eseguito|+|1|0|Command not executed|
  
-Per cancellare lo stato //st_warning// bisogna inviare il comando //RSWRN//.+To clear the //st_warning// status must send the //RSWRN// command.
  
-===== - Tabella comandi e parametri =====+===== - Commands and parameters table =====
  
-==== - Simbologia adottata ====+==== - Symbols used ====
  
-Il **nome** del parametrostato o comando viene riportato alla sinistra della tabella.+The **name** of the paramenterstate or command are carry to the left side of the table.
  
 **R**\\ **R**\\
-Indica se il relativo parametro o stato è ritentivo (al momento dell’inizializzazione del device +Indicates if the related parameter or stare is ritentive (upon initialization of the device maintains the previously defined), or is the State that bears upon initialization of the device.\\ 
-mantiene lo stato precedentemente definito), oppure indica lo stato che assume al momento +If the device does not need to initialize the 'R' field indicates the value that the parameter assume on the turning on the card.\\ 
-dell’inizializzazione del device.\\ +R = Ritentive\\ 
-Se il device non necessita di inizializzazione il campo “R” indica il valore che il parametro o stato +0 = At the initialization moment of the device the value is forced to zero.\\ 
-assume all’accensione della scheda.\\ +1 = At the initialization moment of the device the value is forced to one.\\ 
-R = Ritentivo\\ +- = At the initialization moment of the device significant value is displayed.
-0 = Al momento dell’inizializzazione del device il valore viene forzato a zero.\\ +
-1 = Al momento dell’inizializzazione del device il valore viene forzato a uno.\\ +
-- = Al momento dell’inizializzazione del device viene presentato il valore significativo.+
  
 **D**\\ **D**\\
-Indica la dimensione del parametro.\\+Indicates the size of the parameter.\\
 F = Flag\\ F = Flag\\
 B = Byte\\ B = Byte\\
Line 153: Line 135:
 S = Single Float S = Single Float
  
-=== - Condizioni === +=== - Conditions === 
-Vengono descritte tutte le **condizioni necessarie affinché il parametro sia considerato corretto o perché il comando venga accettato**.\\ + 
-In alcuni casi vengono specificati dei valori limite per l’accettazione del parametrose vengono introdotti dei valori esterni ai limiti impostatiil dato viene comunque accettatopertanto devono essere previsti opportuni controlli dell’applicativo tali da garantire il corretto funzionamento.\\ +Describes all of the **conditions that is considered correct or because the command is accepted**.\\ 
-Per l’esecuzione di un comandotutte le relative condizioni devono necessariamente essere soddisfattein caso contrario il comando non viene eseguito.+In some cases, limit values are specified for the acceptance of the parameterIf any values outside the limits setthe data will still be acceptedtherefore appropriate controls of the application must be provided to ensure proper operation.\\ 
 +To run a commandall the conditions required to be metotherwise the command does not run.
  
 **A**\\ **A**\\
-Indica la modalità di accesso.\\ +Indicates the access mode.\\ 
-R = Read (lettura).\\ +R = Read (read).\\ 
-W = Write (scrittura).\\+W = Write (write).\\
 RW = Read / Write.\\ RW = Read / Write.\\
  
-==== - Parametri ====+==== - Parameters ====
  
-^Nome^D^R^A^Condizioni^Descrizione+^Name^D^R^A^Conditions^Description
-|outbit|W|-|R|Nessuna|**Output measure in bits**\\ Valore letto dal canale di ingresso compensato dell'Offset.\\ Range valido: 0 ÷ 32767| +|outbit|W|-|R|None|**Output measure in bits**\\ Value read by the input channel offset even.\\ Valid Range: 0 ÷ 32767| 
-|offset|W|R|RW|Nessuna|**Offset compensation**\\ Offset uscita DAC in bit. Definisce il valore in bit della correzione relativa all'ingresso analogico in modo da compensare l'eventuale deriva del sistema.\\ Range valido: -32768 ÷ 32767| +|offset|W|R|RW|None|**Offset compensation**\\ DAC output offset in bit. Defines the value in bits of the correction on the analog input in order to compensate for any drift in the system.\\ Valid Range: -32768 ÷ 32767| 
-|scaleA|W|R|RW|Nessuna|**Scale A**\\ Valore intero parametro formula di scaling.\\ Range valido: -32768 ÷ 32767| +|scaleA|W|R|RW|None|**A Scale**\\A integer parameter scaling formula.\\ Valid Range: -32768 ÷ 32767| 
-|scaleB|W|R|RW|Nessuna|**Scale B**\\ Valore parametro utilizzato nella formula di scaling. Deve essere necessariamente diverso da zero.\\ Range valido: -32768 ÷ 32767| +|scaleB|W|R|RW|None|**B Scale**\\B parameter value used in the scaling formulaMust be nonzero.\\ Valid Range: -32768 ÷ 32767| 
-|scaleC|W|R|RW|Nessuna|**Scale C**\\Valore parametro utilizzzato nella formula di scaling.\\ Range valido: -32768 ÷ 32767| +|scaleC|W|R|RW|None|**C Scale**\\C parameter value used in the scaling formula.\\ Valid Range: -32768 ÷ 32767| 
-|outUm|L|-|R|Nessuna|**Output measure in unity**\\ Uscita derivata dalla formula di scaling.\\ Range valido: -32768 ÷ 32767| +|outUm|L|-|R|None|**Output measure in unity**\\ Derived exit from scaling formula.\\ Valid Range: -32768 ÷ 32767| 
-|tfilter|W|R|RW|Nessuna|**Filter time**\\ Tempo di carica del filtro RC. Se tfilter < = Tcamp device, il filtro è disattivatoValore espresso in unità ms.\\ Range valido: 0 ÷ 32767| +|tfilter|W|R|RW|None|**Filter time**\\ Charging time of RC filterIf tfilter < = Tcamp device, the filter is disableValue expressed in ms.\\ Valid Range: 0 ÷ 32767| 
-|outUmF|L|-|R|Nessuna|**Filtered output in unity of measure**\\ Uscita in unità di misurafiltrata.\\ Range valido: -32768 ÷ 32767| +|outUmF|L|-|R|None|**Filtered output in unity of measure**\\ Output in unitsfiltered.\\ Valid Range: -32768 ÷ 32767| 
-|hysteresis|L|R|RW|Nessuna|**Comparation hysteresis**\\ Isteresi delle comparazioni per la gestione delle usciteVedi capitolo dedicato.\\ Range valido: -32768 ÷ 32767| +|hysteresis|L|R|RW|None|**Comparation hysteresis**\\ Hysteresis of comparisons for outputs managingSee the dedicated chapter.\\ Valid Range: -32768 ÷ 32767| 
-|mode1|B|R|R-W|Nessuna|**Function mode 1**\\ Definisce il tipo di comparazione da eseguire sull'uscita indicata nel parametro //selout1//.\\ **0** = L'uscita permane nello stato in cui si trova\\ **1** = Attivazione al passaggio per il setpoint con l'ingresso che si incrementa\\ **2** = Disattivazione al passaggio per il setpoint con il conteggio che si incrementa\\ **3** = Attivazione al passaggio per il setpoint con l'ingresso che si decrementa\\ **4** = Disattivazione passaggio per il setpoint con l'ingresso che si decrementa\\ **5** = Attivazione passaggio per il setpoint con l'ingresso che si incrementa e disattivazione passaggio per il setpoint con l'ingresso che si decrementa\\ **6** = Disattivazione passaggio per il setpoint con l'ingresso che si incrementa e attivazione al passaggio per il setpoint con l'ingresso che si decrementa\\ Range valido: 0 ÷ 6.| +|mode1|B|R|R-W|None|**Function mode 1**\\ Defines the comparison type to be performed on the output shown in the //selout1// parameter.\\ **0** = The output remains in the state it is\\ **1** = Passage activation to the setpoint to the input that increase\\ **2** = Passage deactivation to the setpoint with the count that increases\\ **3** = Passage activation for the setpoint with the input that it decrements\\ **4** = Passage disabling for the setpoint with the input that it decrements\\ **5** = Passage activation for the setpoint with the input that is incremented and passage deactivating with the setpoint to the input that it decrements\\ **6** = Passage disabling for the setpoint with the input that is incremented and passage activation with the setpoint to the input that it decrements\\ Valid Range: 0 ÷ 6.| 
-|selout1|B|R|R-W|Nessuna|**Output selection1**\\ Indica su quale uscita viene eseguita l'azione della prima comparazione\\ **0** = Out1\\ **1** = Out2\\ Range valido: 0 ÷ 1.| +|selout1|B|R|R-W|None|**Output selection1**\\ Indicates the first output where the action of the first comparison\\ **0** = Out1\\ **1** = Out2\\ Valid Range: 0 ÷ 1.| 
-|setpoint1|L|R|R-W|Nessuna|**Set point 1**\\ Definisce il setpoint della comparazione da eseguire sull'uscita indicata nel parametro //selout1//.\\ Range valido: -999999 ÷ 999999.| +|setpoint1|L|R|R-W|None|**Set point 1**\\ Defines the set point of comparison to be performed on the output shown in the parameter //selout1//.\\ Valild Range: -999999 ÷ 999999.| 
-|timer1|W|R|R-W|Nessuna|**Timer 1**\\ Definisce il timer da porre in esecuzione sull'uscita indicata nel parametro //selout1//.\\ Range valido: 0 ÷ 32767.| +|timer1|W|R|R-W|None|**Timer 1**\\ Defines the timer to be running on the output shown in the parameter //selout1//.\\ Valid Range: 0 ÷ 32767.| 
-|mode2|B|R|R-W|Nessuna|**Function mode 2**\\ Definisce il tipo di comparazione da eseguire sull'uscita indicata nel parametro //selout2//.\\ **0** = L'uscita permane nello stato in cui si trova\\ **1** = Attivazione al passaggio per il setpoint con l'ingresso che si incrementa\\ **2** = Disattivazione al passaggio per il setpoint con l'ingresso che si incrementa\\ **3** = Attivazione al passaggio per il setpoint con l'ingresso che si decrementa\\ **4** = Disattivazione passaggio per il setpoint con l'ingresso che si decrementa\\ **5** = Attivazione passaggio per il setpoint con l'ingresso che si incrementa e disattivazione passaggio per il setpoint con l'ingresso che si decrementa\\ **6** = Disattivazione passaggio per il setpoint con l'ingresso che si incrementa e attivazione al passaggio per il setpoint con il conteggio che si decrementa\\ Range valido: 0 ÷ 6.| +|mode2|B|R|R-W|None|**Function mode 2**\\ Defines the comparison type to be performed on the output shown in the //selout2// parameter.\\ **0** = The output remains in the State where is\\ **1** = Passage activation for the setpoint to the input that you increase\\ **2** = Passage deactivation in step for the setpoint to the input that you increase\\ **3** = Passage activation for the setpoint to the input that it decrements\\ **4** = Passage disabling for the setpoint with the admission that it decrements\\ **5** = Passage activation for the setpoint with the input that is incremented and passage deactivating for the setpoint with the input that it decrements\\ **6** = Passage disabling for the setpoint with the input that is incremented and passage activation for the setpoint with counting that decrements\\ Valid Range: 0 ÷ 6.| 
-|selout2|B|R|R-W|Nessuna|**Output selection2**\\ Indica su quale uscita viene eseguita l'azione della seconda comparazione\\ **0** = Out1\\ **1** = Out2\\ Range valido: 0 ÷ 1.| +|selout2|B|R|R-W|None|**Output selection2**\\ Indicates the output where the action runs the second comparison\\ **0** = Out1\\ **1** = Out2\\ Valid Range: 0 ÷ 1.| 
-|setpoint2|L|R|R-W|Nessuna|**Set point 2**\\ Definisce il setpoint della comparazione da eseguire sull'uscita indicata nel parametro //selout2//.\\ Range valido: -999999 ÷ 999999.| +|setpoint2|L|R|R-W|None|**Set point 2**\\ Defines the set point comparison to be performed on the output shown in the //selout2// parameter.\\ Valid Range: -999999 ÷ 999999.| 
-|timer2|W|R|R-W|Nessuna|**Timer 2**\\ Definisce il timer da porre in esecuzione sull'uscita indicata nel parametro //selout2//.\\ Range valido: 0 ÷ 32767.|+|timer2|W|R|R-W|None|**Timer 2**\\ Defines the timer to be running on the output shown in the //selout2// parameter.\\ Valid Range: 0 ÷ 32767.|
  
  
-==== - Stati ====+==== - States ====
  
-^NOME^D^R^A^Condizioni^Descrizione+^NAME^D^R^A^Conditions^Description
-|st_errcfg|F|-|R|Nessuna|**Configuration error**\\ Segnala che è stato rilevato un errore nella configurazione dell'ingresso.\\ **0** = Non è stato rilevato nessun errore.\\ **1** = È stato rilevato un errore.| +|st_errcfg|F|-|R|None|**Configuration error**\\ Signals that an error was detected in the input configuration.\\ **0** = There was no error.\\ **1** = An error was detected.| 
-|st_cmp1|F|0|R|Nessuna|**Status of first comparation**\\ Segnalazione di comparazione 1.\\ **0** = Comparazione disattiva.\\ **1** = Comparazione attiva.\\ All'accensione per default viene posto a zero.| +|st_cmp1|F|0|R|None|**Status of first comparation**\\ 1 comparison report.\\ **0** = 1 disable comparison.\\ **1** = 1 active comparison.\\ At the power on by default is set to zero.| 
-|st_cmp2|F|0|R|Nessuna|**Status of second comparation**\\ Segnalazione di comparazione 2.\\ **0** = Comparazione disattiva.\\ **1** = Comparazione attiva.\\ All'accensione per default viene posto a zero.| +|st_cmp2|F|0|R|None|**Status of second comparation**\\ 2 comparison report.\\ **0** = 2 disable comparison.\\ **1** = 2 active comparison.\\ At the power on by default is set to zero.| 
-|st_error|F|0|R|Nessuna|**Status of device error**\\ Indica lo stato di errore nel device.\\ Per la decodifica dell'errore si deve fare riferimento alla variabile errcode ed errvalue.\\ **0** = Errore non presente.\\ **1** = Errore presente.\\ All'accensione per default viene posto a zero.| +|st_error|F|0|R|None|**Status of device error**\\ Indicates the error status in device.\\ To decode the error you must refer to the errcode and errvalue variables.\\ **0** = Error not present.\\ **1** = Error present.\\ At the power on by default is set to zero.| 
-|st_warning|F|0|R|Nessuna|**Status of device warnin**\\ Indica lo stato di warning nel device.\\ Per la decodifica del warning si deve fare riferimento alla variabile wrncode wrnvalue.\\ **0** = Warning non presente.\\ **1** = Warning presente\\ All'accensione per default viene posto a zero.|+|st_warning|F|0|R|None|**Status of device warning**\\ Indicates the warning state in device.\\ To decode the error you must refer to the wrncode and wrnvalue variables.\\ **0** = Warning not present.\\ **1** = Warning present.\\ At the power on by default is set to zero.|
  
-==== - Comandi ====+==== - Commands ====
  
-I comandi sono stati ordinati con priorità decrescenteAd esempio, in caso di contemporaneità dei comandi //SETCMP1// ed //RESCMP1//, viene acquisito per primo il comando //SETCMP1//.+Controls were organized by decreasing priorityFor example, in the case of contemporary //SETCMP1// and //RESCMP1// controlsis acquired first //SETCMP1// command.
  
-^Nome^Descrizione^Descrizione+^Name^Description^Description
-|SETCMP1|Nessuna|**Set of comparation 1**\\ Attiva lo stato st_cmp1.| +|SETCMP1|None|**Set of comparation 1**\\ Activates the st_cmp1 status.| 
-|RESCMP1|Nessuna|**Reset of comparation 1**\\ Azzera lo stato st_cmp1.| +|RESCMP1|None|**Reset of comparation 1**\\ Reset the st_cmp1 status.| 
-|SETCMP2|Nessuna|**Set of comparation 2**\\ Attiva lo stato st_cmp2.| +|SETCMP2|None|**Set of comparation 2**\\ Activates the st_cmp2 status.| 
-|RESCMP2|Nessuna|**Reset of comparation 2**\\ Azzera lo stato st_cmp2.| +|RESCMP2|None|**Reset of comparation 2**\\ Reset the st_cmp2 status.| 
-|RSERR|Nessuna|**Reset error**\\ Azzera lo stato st_error.| +|RSERR|None|**Reset error**\\ Reset the st_error status.| 
-|RSWRN|Nessuna|**Reset warning**\\ Azzera lo stato st_warning.|+|RSWRN|None|**Reset warning**\\ Reset the st_warning status.|
  
  
-===== - Limitazioni =====+===== - Limitations =====
  
 ==== - Scaling ==== ==== - Scaling ====
  
-//ScaleB// deve essere impostato diverso da zero, in caso contrario //OutUm// viene forzato a 0.+//ScaleB// must be set to non-zero, otherwise //OutUm// is forced to 0.
  
-==== - Filtro ====+==== - Filter ====
  
-Il tempo di carica del filtro RC //tfilter// deve essere impostato maggiore o uguale al tempo di +The charging time of RC element //tfilter// must be set greater than or equal to the time of sampling device (Tcamp), otherwise it disables the filter and the //OutUmF// parameter refreshes that has the same value as //OutUm//.
-campionamento del device (Tcamp), in caso contrario viene disattivato il filtro ed il parametro +
-//OutUmF// viene aggiornata con lo stesso valore di //OutUm//.+
  
 ==== - Offset ==== ==== - Offset ====
  
-Il parametro //offset// viene sommato all’ingresso analogico acquisito (//outbit//), non viene eseguito +The //offset// parameter is added to the analog input acquired (//outbit//), don't execute the control over the overflow of the sum.
-il controllo sull‘overflow della somma.+
  
-==== - Configurazione ====+==== - Configuration ====
  
-<WRAP center round info 60%> +^:info:^In the case that a single channel is managed by multiple ANINP device with //Type// differents,\\ the compiler does not detect errors and the channel is set with the last //Type// declared.^
-Nel caso che un singolo canale +
-venga gestito da più +
-device ANINP aventi //Type// +
-diversiil compilatore non +
-rileva errori e il canale viene +
-impostato con l’ultimo +
-//Type// dichiarato. +
-</WRAP>+
  
-Una singola risorsa hardware (ogni singolo ingressopuò essere gestita da più device ANINP contemporaneamente, +A single hardware resource (each inputcan be handled by multiple ANINP devices simultaneouslyprovided that the identification number of the input (Type), contained in the Declaration of the device (configuration file), is the sameotherwise the analog input is configured as the last device declared in the configuration file.
-a condizione che il numero identificativo dell’ingresso (Type), inserito nella +
-dichiarazione del device (file di configurazione), sia ugualein caso contrario l’ingresso analogico +
-viene configurato come l’ultimo device dichiarato nel file di configurazione.+
  
  
-===== - Esempio applicativo =====+===== - Application example =====
  
-==== - Unit di configurazione ====+==== - Configuration Unit ====
  
 <code QCL> <code QCL>
 ;************************************************************************************* ;*************************************************************************************
-Nome Modulo: Ex_Aninp2.CNF                Progetto: Ex_ANINP2 +Module Name: Ex_Aninp2.CNF                Project: Ex_ANINP2 
-Autore: QEM srl                           Data : 01/05/99 +Author: QEM srl                           Date : 01/05/99 
-Sistema: QMove1 / QCL3                    Libreria: 1LIB4001 +Siystem: QMove1 / QCL3                    Library: 1LIB4001 
-FunzionalitàEsempio gestione ANINP2     Release: 0+Functionality: ANINP2 use management      Release: 0
 ;------------------------------------- Note ------------------------------------------ ;------------------------------------- Note ------------------------------------------
-; [1] - Applicativo di esempio per utilizzo device ANINP2+; [1] - Application example using device ANINP2
 ;************************************************************************************* ;*************************************************************************************
  
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
-Definizione Costanti+Constants Defining
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
 CONST CONST
  
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
-Definizione Variabili SYSTEM+; SYSTEM Variable Definition
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
 SYSTEM SYSTEM
Line 270: Line 239:
  
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
-Definizione Variabili GLOBAL+; GLOBAL Variable Definition
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
 GLOBAL GLOBAL
  
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
-Definizione Variabili TIMER+; TIMER Variable Definition
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
 TIMER TIMER
  
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
-Definizione DATAGROUP+; DATAGROUP Definition
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
 DATAGROUP DATAGROUP
  
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
-Configurazione Bus+; Bus Configuration
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
 BUS BUS
Line 294: Line 263:
        
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
-Definizione Variabili INPUT+; INPUT Variable Definition
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
 INPUT INPUT
-ifAbilComp       3.INP01                      ;Abilitazione comparazioni+ifAbilComp       3.INP01                      ;Enabling comparisons
  
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
-Definizione Variabili OUTPUT+; OUTPUT Variable Definition
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
 OUTPUT OUTPUT
-out301           3.OUT01                      ;Segnalazione setpoint +out301           3.OUT01                      ;1 setpoint signal 
-out302           3.OUT02                      ;Segnalazione setpoint 2+out302           3.OUT02                      ;2 setpoint signal
  
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
-Dichiarazione device interni+Internal devices declaration
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
 INTDEVICE INTDEVICE
-;Nome    Tipo    TCamp    Contatore Type +;Name    Type    TCamp    Counter Type 
-Asse     ANINP   0004     2.AI01 2  3.OUT01  3.OUT02+Axis     ANINP   0004     2.AI01 2  3.OUT01  3.OUT02
  
 END END
 </code> </code>
  
-==== - Gestione ANINP2 ====+==== - ANINP2 management ====
  
 <code QCL> <code QCL>
 ;************************************************************************************* ;*************************************************************************************
-Nome File: TASK_00.MOD +; File name: TASK_00.MOD 
-Progetto: EX_ANINP2 +Project: EX_ANINP2 
-DescrizioneGestione Posizionamento+DescriptionPositioning Control
 ;************************************************************************************* ;*************************************************************************************
  
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
-Operazioni di Inizializzazione Asse+Initialization work Axis
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
-Asse:offset = 0                                 ;Tensione di offset+Axis:offset = 0                                 ;Offset voltage
  
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
-Fattore di scala: (scaleA * outbit / scaleB) + scaleC +Scale factor: (scaleA * outbit / scaleB) + scaleC 
-; outUm minima = (4 * 0 / 8 ) + 3 = 3 +; outUm min = (4 * 0 / 8 ) + 3 = 3 
-; outUm massima = (4 * 4095 / 8) + 3 = 2050+; outUm max = (4 * 4095 / 8) + 3 = 2050
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
-Asse: scaleA = 4                                ;Fattore di scala +Axis: scaleA = 4                                ;A scale factor 
-Asse: scaleB = 8                                ;Fattore di scala +Axis: scaleB = 8                                ;B scale factor 
-Asse: scaleC = 3                                ;Fattore di scala +Axis: scaleC = 3                                ;C scale factor 
-Asse: tfilter = 10                              ;Tempo del filtro di acquisizione +Axis: tfilter = 10                              ;Capture filter time 
-Asse: hysteresis = 0                            ;Isteresi dell’uscita+Axis: hysteresis = 0                            ;Output hysteresis
  
 IF   slSet1 EQ 0 IF   slSet1 EQ 0
Line 350: Line 319:
 MAIN: MAIN:
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
-Comparazioni sul conteggio solo se ifAbilComp attivoaltrimenti le uscite +Comparisons on the count only if ifAbilComp is activeotherwise the outputs 
-sono disattive +are inactive 
-; ----------------------------- variabili utilizzate -------------------------------- +; ----------------------------- used variables -------------------------------- 
-; slSet1: Quota di comparazione per uscita 2.OUT01 +; slSet1: Comparison quota for 2.OUT01 output 
-; slSet1: Quota di comparazione per uscita 2.OUT02+; slSet1: Comparison quota for 2.OUT02 output
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
  
 IF ifAbilComp IF ifAbilComp
      IF NOT gfApp01      IF NOT gfApp01
-       Asse: mode1 = 5                         ;Attiva out1 se posit>setpoint1 +       Axis: mode1 = 5                         ;Activates out1 if posit > setpoint1 
-       Asse: selout1 = 0                       ;e disattiva out1 se posit<setpoint1 +       Axis: selout1 = 0                       ;and disable out1 if posit < setpoint1 
-       Asse: setpoint1 = slSet1 +       Axis: setpoint1 = slSet1 
-       Asse: timer1 = 0 +       Axis: timer1 = 0 
-       Asse: mode2 = 6                         ;Disattiva out2 se posit<setpoint2 +       Axis: mode2 = 6                         ;Disable out2 if posit < setpoint2 
-       Asse: selout2 = 1                       ;e attiva out2 se posit<setpoint2 +       Axis: selout2 = 1                       ;and disable out2 if posit < setpoint2 
-       Asse: setpoint2 = slSet2 +       Axis: setpoint2 = slSet2 
-       Asse: timer2 = 0+       Axis: timer2 = 0
        gfApp01 = 1        gfApp01 = 1
        gfApp02 = 0        gfApp02 = 0
Line 372: Line 341:
 ELSE ELSE
      IF NOT gfApp02      IF NOT gfApp02
-       Asse:mode1 = 0 +       Axis:mode1 = 0 
-       RESOUT out201                           ;Disattiva out1 +       RESOUT out201                           ;Disable out1 
-       Asse: selout1 = 0 +       Axis: selout1 = 0 
-       Asse: mode2 = 0 +       Axis: mode2 = 0 
-       RESOUT out202                           ;Disattiva out2 +       RESOUT out202                           ;Disable out2 
-       Asse: selout2 = 1+       Axis: selout2 = 1
        gfApp01 = 0        gfApp01 = 0
        gfApp02 = 1        gfApp02 = 1
Line 384: Line 353:
  
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
-Operazioni finali+Final operations
 ;------------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------------
   WAIT 1   WAIT 1
  • Last modified: 2019/08/29 17:18