en:software:devices:canopen

Differences

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

Link to this comparison view

Next revision
Previous revision
en:software:devices:canopen [2016/11/03 15:54] – created qem103en:software:devices:canopen [2020/07/13 14:52] (current) qem103
Line 2: Line 2:
  
  
-===== - Introduzione =====+====== - Introduction ======
  
-Il device CANOPEN è un oggetto utilizzabile per la configurazioneil monitoring e la gestione di una rete CANOpen. CANOpen è un protocollo di comunicazione basato su CAN bus. Per ogni riferimento a documenti sul protocollo fare riferimento al sito della CiA: l'organizzazione internazionale che sviluppa e promuove i protocolli su base CAN bus (http://www.can-cia.org/cia).+The CANOPEN device is an object that can be used for configuring, monitoring and managing a CANOpen networkCANopen is a communication protocol based on CAN bus. For every reference to CiA documents please refer to Protocolthe international organization that develops and promotes the protocols based on CAN bus (http://www.can-cia.org/cia).
  
  
-===== - Dichiarazione del device =====+===== - Device declaration =====
  
-Nella unit di configurazione, la sezione INTDEVICE deve essere dichiarata in modo tale che siano presenti le risorse hardware necessarie all'utilizzo del device CANOPEN. Nella sezione INTDEVICE della unit di configurazione deve essere aggiunta la seguente definizione:+In the configuration section INTDEVICE unit must be declared so that you have the hardware necessary to use the CANOPEN deviceIn the INTDEVICE section of the unit of configuration must be added the following definition:
  
 <code QCL> <code QCL>
 ;---------------------------------  ;--------------------------------- 
-Dichiarazione device+Device declaration
 ;---------------------------------  ;--------------------------------- 
 INTDEVICE  INTDEVICE 
 ... ...
-<nome_device>  CANOPEN TCamp  Speed Port+<device_name>  CANOPEN TCamp  Speed Port
 </code> </code>
  
-Dove+Where
-|<nome_device>|nome assegnato al device| +|<device_name>|the name given to the device| 
-|CANOPEN|parola chiave che identifica il device posizionatore analogico+|CANOPEN|keyword that identifies the device analog positioner
-|TCamp|tempo di campionamento device (1÷255 ms)| +|TCamp|sample time device (1÷255 ms)| 
-|Speed|indica il valore in Kbps della velocità CANbusI valori ammessi sono 1000, 500, 250 125. Su alcuni hardware è possibile impostare anche il valore 0. In questo caso la velocità del CANbus sarà impostata con appositi dip-switchIl valore della velocità selezionata sarà visibile nel parametro speed| +|Speed|indicates the value in Kbps of speedAccepted values are 1000, 500, 250 and 125. On some hardware, you can also set the value 0. In this case the CANbus speed is set with the dip-switchesThe value of the selected speed will be visible in the parameter speed| 
-|Port|indica il dispositivo CAN al quale il device deve riferirsiSe l'hardware è previsto di una sola porta CAN utilizzare il valore 0|+|Port|indicates the CAN unit to which the device is to be referredIf your hardware is slated to only one port CAN use the value 0|
    
-<WRAP center round important 60%> +^:important:^Attention: It is necessary that each definition are present on the same line.^
-**Attenzione:**\\ +
-È necessario che tutte le voci di definizione siano presenti sulla stessa linea. +
-</WRAP>+
  
  
-===== - Funzionamento =====+===== - Operation =====
  
-Le principali caratteristiche del device CANOPEN sono:  +The main features of the CANOPEN device are:  
-  * monitorizzazione della rete CANbus: alcuni parametri permettono di controllare gli errori della rete CAN, di calcolare una stima del traffico bus, di verificare alcuni stati tipici della periferica CANbus +  * CANbus network monitoringsome switches allow you to control the errors of the CAN networkto estimate traffic bus, check some typical CANbus device States 
-  * ricezione e decodifica dei messaggi di emergenza tipici del protocollo CANOpen +  * receiving and decoding of emergency messages typical of the CANOpen protocol 
-  * gestione dei QDO (Qem Data Object) che sono dei oggetti che non hanno una relazione diretta con il protocolloma che permettono di assicurare la possibilità di configurazione della libreria di comunicazione CANOpen. Per esempio i QDO vengono utilizzati per definire la frequenza di aggiornamento degli ingressi analogiciper definire il fattore di divisione della posizione letta da un drive, etc.+  * managing QDO (Qem Data Object) they are objects that do not have a direct relationship with the Protocolbut enhance ensure the possibility of CANOpen communication library configurationFor example the QDO are used to define the refresh rate of the analog inputsto define the Division factor of position read from a drive, etc.
  
-È qui riportato l'elenco dei QDO attualmente disponibili+Here is a list of currently available QDO: 
-^index^Nome^Valore di default^Accesso^Range di valori^Breve descrizione+^index^Name^Default value^Access^Range of values^Short description
-|  1  |aiperiod|100|RW|0÷32767|Tempo di aggiornamento ingressi analogici e conteggi espresso in ms| +|  1  |aiperiod|100|RW|0÷32767|Update time analog and count inputs expressed in ms| 
-|  2  |setdrivemode|-|RW|0÷255|Imposta il drive per lavorare con il modo indicato e relativo alla specifica DS402| +|  2  |setdrivemode|-|RW|0÷255|Sets the drive to work with indicated mode and DS402 specification
-|  3  |targetpos|-|W|-|Imposta la posizione di origine per il drive. La scrittura deve essere eseguita con il drive non operativoQuesto parametro è impostato automaticamente con il QDO setdrivemode.| +|  3  |targetpos|-|W|-|Sets the source location for the drive. Your writing should be done with the drive not operationalThis parameter is automatically set with the QDO setdrivemode.| 
-|  4  |divfactor|2|RW|0÷4|Imposta il divisore per le posizioniIl valore è il divisore espresso come esponente di 2. (es: 2 significa 2<sup>2</sup> = 4)| +|  4  |divfactor|2|RW|0÷4|Sets the divider for positionsThe value is the divisor expressed as an exponent of 2. (example: 2 means 2<sup>2</sup> = 4)| 
-|  5  |Slave Link Status|-|R| |Indica lo stato di linkup degli slaveLo stato del bit 0 corrisponde allo stato di link dello slave con indirizzo 1| +|  5  |Slave Link Status|-|R| |Indicates the linkup of the slavesThe State of bit 0 corresponds to the status of links of the slave with address 1| 
-|  6  |Slave Link Up|-|W| |Aggiunge alla rete CANOpen uno slave in link down. Il bit corrisponde allo slave con indirizzo 1| +|  6  |Slave Link Up|-|W| |Adds to the CANOpen network one slave in link down. Bit corresponds to the slave with address 1| 
-|  7  |Sync Mode| |RW|0÷1|Imposta la modalità del messaggio SYNC (0 per DS401, 1 per DS402 in interpolation mode)| +|  7  |Sync Mode| |RW|0÷1|Sets the message SYNC mode (0 for DS401, 1 for DS402 in interpolation mode)| 
-|  8  |Guard Time| |RW|-|Imposta il Guard Time del protocollo NodeGuarding| +|  8  |Guard Time| |RW|-|Sets the Guard Time of the NodeGuarding protocol
-|  9  |SDO timeout| |RW|-|Imposta il valore di timeout dei messaggi SDO|+|  9  |SDO timeout| |RW|-|Sets the timeout value of the SDO messages|
  
-==== - Esempio di utilizzo dello "Slave Link Status" ==== +==== - "Slave Link Status" use example ==== 
-Esempio di una unit realizzata per QView con dichiarazioni locali e device CANOPEN dichiarato come REFERENCE.+ 
 +Example of a unit created for Qview with local declaration and CANOPEN device declared as REFERENCE.
  
 <code QCL> <code QCL>
Line 97: Line 95:
  
  
-===== - Tabella parametri =====+===== - Parameters table =====
  
-^Nome^Dimensione^Valore di default^Tipo di accesso^Unità di misura^Range valido^Condizioni di scrittura^Descrizione+^Name^Dimension^Default value^Access type^Unit of measure^Valid range^Write conditions^Description
-|speed|Word|-|R|Kbps|1000, 500, 250, 125 o 0|-|**Velocità di trasmissione**\\ Riporta il dato impostato nella dichiarazione del device per la velocità di trasmissione.| +|speed|Word|-|R|Kbps|1000, 500, 250, 125 o 0|-|**Transmission speed**\\ Shows the relevant setting on the device for the transmission speed.| 
-|maxrxerr|Word|0|RW|-|-|-|**Numero massimo di errori in ricezione**\\ Riporta il numero massimo raggiunto di errori in ricezione.| +|maxrxerr|Word|0|RW|-|-|-|**Maximum number of receive errors**\\ Shows the maximum number of receive errors.| 
-|maxtxerr|Word|0|RW|-|-|-|**Numero massimo di errori in trasmissione**\\ Riporta il numero massimo raggiunto di errori in trasmissione.| +|maxtxerr|Word|0|RW|-|-|-|**Maximum number of errors in transmission**\\ Shows the maximum number of errors in transmission.| 
-|busload|Word|0|R|Percentuale|0÷100|-|**Carico del bus**\\ Indica il carico di traffico della rete in percentualetale valore è aggiornato ogni 500 ms.| +|busload|Word|0|R|Percentage|0÷100|-|**Bus load**\\ Indicates the network traffic load as a percentagethe value is updated every 500 ms.| 
-|maxtraffic|Word|0|RW|Percentuale|0÷100|-|**Carico massimo rilevato nel bus**\\ Riporta la percentuale massima di traffico rilevato nel bus a partire dall'ultimo azzeramento di questo parametro.| +|maxtraffic|Word|0|RW|Percentage|0÷100|-|**Maximum load detected in bus**\\ Shows the maximum percentage of traffic detected on the bus from the last reset of this parameter.| 
-|errflags|Word|0|RW|-|0÷32768|-|**Flag di indicazione di errore**\\ Il valore è il risultato della conversione in decimale dei valori di alcuni bit flagad ogni errore ogni flag viene posto ad 1, per azzerarli è possibile porre il parametro a 0. Tutti questi messaggi di errore sono inviati dal chip che gestisce la comunicazione CAN.\\ **bit0** overrun error\\ **bit1** rx buffer full error\\ **bit2** idle character detect\\ **bit3** bus-off state\\ **bit4** transmitter error passive\\ **bit5** receiver error passive\\ **bit6** transmitter warning\\ **bit7** receiver warning\\ **bit8** acknowledge error\\ **bit9** CRC error\\ **bit10** form error\\ **bit11** stuff bit error\\ **bit12** bit 0 error\\ **bit13** bit 1 error\\ **bit14** received message queue full\\ **bit15** transmit message queue full\\ **bit16** receiver busy| +|errflags|Word|0|RW|-|0÷32768|-|**Error flag indicator**\\ The value is the result of the conversion to decimal values of some bit flagsat every mistake every flag is placed at 1, to clear them you can set the parameter to 0. All of these error messages are sent from the chip that manages communication CAN.\\ **bit0** overrun error\\ **bit1** rx buffer full error\\ **bit2** idle character detect\\ **bit3** bus-off state\\ **bit4** transmitter error passive\\ **bit5** receiver error passive\\ **bit6** transmitter warning\\ **bit7** receiver warning\\ **bit8** acknowledge error\\ **bit9** CRC error\\ **bit10** form error\\ **bit11** stuff bit error\\ **bit12** bit 0 error\\ **bit13** bit 1 error\\ **bit14** received message queue full\\ **bit15** transmit message queue full\\ **bit16** receiver busy| 
-|unit|Byte|0|RW|-|-|-|**Numero di identificazione dell'unità CANOpen**\\ Identifica il numero dell'unità CANOpen che utilizzerà il comando READSDO WRITESDO.| +|unit|Byte|0|RW|-|-|-|**CANOpen unit's identification number**\\ Identifies the number of CANOpen drive that will use the READSDO and WRITESDO commands.| 
-|index|Long|0|RW|-|0÷65535|-|**Indice del dizionario oggetti**\\ Identifica l'indice del dizionario oggetti.| +|index|Long|0|RW|-|0÷65535|-|**Index of Dictionary objects**\\ Identifies the index of the Dictionary objects.| 
-|subindex|Word|0|RW|-|0÷255|-|**Sub-indice del dizionario oggetti**\\ Identifica il sub-indice del dizionario oggetti nel caso in cui l'oggetto sia di tipo complesso.| +|subindex|Word|0|RW|-|0÷255|-|**Sub-Index of Dictionary objects**\\ Identifies the sub-index of the Dictionary objects in the case that the object is of complex type.| 
-|length|Word|0|RW|bytes|-|-|**Dimensione SDO**\\ Indica la dimensione in bytes del SDO letto o da scrivere.| +|length|Word|0|RW|bytes|-|-|**Dimension SDO**\\ Indicates the size in bytes of the SDO read or written.| 
-|data|Long|0|RW|-|-|-|**Valore SDO QDO**\\ Indica il valore del QDO SDO da leggere o da scrivere.| +|data|Long|0|RW|-|-|-|**SDO or QDO value**\\ Indicates the QDO or SDO value to be read or written.| 
-|string1÷16|Byte|0|RW|-|-|-|**Valore SDO**\\ Indica il valore del SDO letto o da scrivere nel caso in cui il dato sia di tipo VISIBLE_STRING OCTET_STRING.| +|string1÷16|Byte|0|RW|-|-|-|**SDO value**\\ Indicates the SDO value read or written in the case that the data is of type VISIBLE_STRING or OCTET_STRING.| 
-|sdoerr|Byte|0|R|-|-|-|**Errore durante elaborazione SDO**\\ Indica un errore incorso durante la lettura o la scrittura del SDO. Il valore deve essere letto dopo che //st_send// viene posto ad 1. I codici di errore sono:\\ **6** unità non valida\\ **10** numero del gruppo non valido\\ **11** SDO non valido\\ **12** errore di comunicazione\\ **13** lunghezza SDO non valida\\ **17** unità errata\\ **28** lunghezza messaggio non valida\\ **29** errore di nell trasmissione\\ **34** lunghezza oggetto non valida+|sdoerr|Byte|0|R|-|-|-|**Error while the SDO processing**\\ Indicates an error made while of the SDO reading or writingThe value must be read after //st_send// is placed to 1. The error codes are:\\ **6** Invalid unit\\ **10** invalid group number\\ **11** invalid SDO\\ **12** communication error\\ **13** length invalid SDO\\ **17** wrong unit\\ **28** invalid message length\\ **29** transmission error\\ **34** not valid object length
-|qdoerr|Byte|0|R|-|-|-|**Errore durante elaborazione QDO**\\ Indica un errore incorso durante la lettura o la scrittura del QDO. Il valore deve essere letto dopo che //st_send// viene posto ad 1. I codici di errore sono:\\ **1** oggetto non disponibile\\ **2** errore nella esecuzione del QDO\\ **3** valore del QDO utilizzato oltre i limiti+|qdoerr|Byte|0|R|-|-|-|**Error while QDO processing**\\ Indicates an error made while of the QDO reading or writingThe value must be read after //st_send// is placed to 1. The error codes are:\\ **1** object not available\\ **2** error in the QDO running\\ **3** value of the QDO used beyond the limits
-|sdoabort|Word|0|R|-|-|-|**Codice SDO abort**\\ Messaggi di errore propri del protocollo CAN. (Non ancora implementato)| +|sdoabort|Word|0|R|-|-|-|**SDO abort code**\\ CAN protocol error messages. (Not yet implemented)| 
-|emcyunit|Byte|0|R|-|-|-|**Unità in emergenza**\\ Indica il numero dell'unità che si trova in emergenza.| +|emcyunit|Byte|0|R|-|-|-|**Emergency unit**\\ Indicates the number of units located in emergency.| 
-|emcycode|Word|0|R|-|-|-|**Codice del messaggio d'emergenza**\\ Indica il codice del messaggio di emergenza.| +|emcycode|Word|0|R|-|-|-|**Emergency message code**\\ Indicates the emergency message code.| 
-|emcyreg|Byte|0|R|-|-|-|**Registro di errore emergenze**\\ Registro di errore del messaggio di emergenza.| +|emcyreg|Byte|0|R|-|-|-|**Error log emergencies**\\ Emergency message error log.| 
-|emcyman1÷5|Byte|0|R|-|-|-|**Errore costruttore**\\ Questi parametri consentono di leggere il valore del campo "manufacturer specific error register" del messaggio di emergenza.| +|emcyman1÷5|Byte|0|R|-|-|-|**Error constructor**\\ These parameters allow you to read the value of the "manufacturer specific error register" field of the emergency message.| 
-|errcode|Byte|0|R|-|0÷100|st_error=1|**Codice di identificazione errore**\\ Indica il tipo di errore intervenuto nel sistemaQuando //st_error// = 1 si trova presente sulla variabile //errcode// il tipo di errore intervenuto e nella variabile //errvalu//una indicazione sulla causa dell'errore.| +|errcode|Byte|0|R|-|0÷100|st_error=1|**Error identification code**\\ Indicates the type of failure intervened in the systemWhen //st_error// = 1 is present on the //errcode// variable the type of failure intervened and in the //errvalu// variable and an indication on the cause of the error.| 
-|errvalue|Byte|0|R|-|0÷100|-|**Codice di identificazione della causa dell'errore**\\ Indica la causa dell'errore intervenuto nel sistemaIl codice è valido solo se //st_error// = 1.| +|errvalue|Byte|0|R|-|0÷100|-|**Identifying code of the cause of the error**\\ Indicates the cause of the error in the systemThe code is valid only if //st_error// = 1.| 
-|wrncode|Byte|0|R|-|0÷100|-|**Codice di identificazione warning**\\ Indica il tipo di warning intervenuto nel sistemaLo stato //st_warning// indica un evento non grave che garantisce comunque il funzionamento del device.\\ Quando //st_warning// è uguale a 1, troviamo presente sulla variabile //wrncode// il tipo di warning intervenuto (vedi tabellae nella variabile //wrnvalue// una indicazione sulla causa che ha provocato il warning.| +|wrncode|Byte|0|R|-|0÷100|-|**Identification code warning**\\ Indicates the type of warning in the systemThe //st_warning// state indicates a minor event that guarantees the operation of the device.\\ When //st_warning// is equal to 1, are present on the //wrncode// variable the type of warning intervened (see the tableand in the //wrnvalue// variable an indication as to the cause of the warning.| 
-|wrnvalue|Byte|0|R|-|0÷100|-|**Codice di identificazione della causa del warning**\\ Indica la causa del warning intervenuto nel sistema.\\ **1**: tentativo di accesso in scrittura su un parametro dove le condizioni per la scrittura non erano soddisfatte,\\ **2**: tentativo di esecuzione di un comando quando le condizioni non erano soddisfatte.|+|wrnvalue|Byte|0|R|-|0÷100|-|**Identification code of the cause of the warning**\\ Indicates the cause of the warning in the system.\\ **1**: attempt to write access on a parameter where the conditions for writing were not met,\\ **2**: attempt to execute a command when the conditions weren't met.|
  
  
-===== - Tabella stati =====+===== - Status table =====
  
-^Nome^Breve descrizione^Descrizione+^Noae^Short description^Descrizption
-|st_send|1|**Comando SDO QDO eseguito**\\ Quando lo stato assume valore indica che il comando SDO (//READSDO// //WRITESDO//QDO (//READQDO// //WRITEQDO//è stato eseguito.| +|st_send|1|**SDO or QDO commands executed**\\ When the State takes the value indicates that the SDO command (//READSDO// or //WRITESDO//or QDO (//READQDO// or //WRITEQDO//it's executed.| 
-|st_emcy|0|**Stato di emergenza**\\ Il device ha ricevuto un messaggio di emergenza quando lo stato vale 1.| +|st_emcy|0|**State of emergency**\\ The device has received an emergency message when the State is worth 1.| 
-|st_error|0|**Presenza di un errore**\\ Indica lo stato di errore del device, per riconoscere il tipo di errore si deve far riferimento alle variabili //errcode// ed //errvalue//:\\ **0**: errore non presente,\\ **1**: errore presente+|st_error|0|**Error presence**\\ Indicates the error status of the device, to recognize the type of error you must refer to the //errcode// and //errvalue// variables:\\ **0**: error not present,\\ **1**: error present
-|st_warning|0|**Presenza di un warning**\\ Indica lo stato di warning del device, per riconoscere il tipo di warning si deve far riferimento alle variabili //wrncode// //wrnalue//:\\ **0**: warning non presente,\\ **1**: warning presente|+|st_warning|0|**The presence of a warning**\\ Indicates the device warning statusto recognize the type of warning you must refer to the //wrncode// eand //wrnalue// variables:\\ **0**: warning not present,\\ **1**: warning present|
  
  
-===== - Tabella comandi =====+===== - Commands table =====
  
-^Nome^Condizione^Descrizione+^Name^Condition^Description
-|READSDO|st_send=1|**Lettura di un SDO**\\ Comando di lettura di un SDOÈ necessario che siano impostati i seguenti parametri: //unit//, //index//, //subindex//.\\ All'attivazione dello stato //st_send// è possibile verificare i parametri relativi per verificare la presenza di un erroreSe l'operazione è andata a buon fine allora nei parametri //data// //string1÷16// si trovano il valore dell'oggetto e nel parametro //length// si trova la dimensione del dato.| +|READSDO|st_send=1|**Reading an SDO**\\ Read commandThe following parameters must be set: //unit//, //index//, //subindex//.\\ Upon activation of the //st_send// state you can verify the parameters to check for an errorIf the operation went successful then in //data// or //string1÷16// parameters, you will find the value of the object and in the //length// parameter you find the size of the data.| 
-|WRITESDO|st_send=1|**Scrittura di un SDO**\\ Comando di scrittura di un SDO. È necessario che siano impostati i seguenti parametri: //unit//, //index//, //subindex//, //length// //data//.\\ All'attivazione dello stato //st_send// è possibile verificare i parametri relativi per verificare la presenza di un errore.| +|WRITESDO|st_send=1|**Writing an SDO**\\ Command of writing an SDO. The following parameters must be set: //unit//, //index//, //subindex//, //length// and //data//.\\ Upon activation of the //st_send// state you can verify the parameters to check for an error.| 
-|READQDO|st_send=1|**Lettura di un SDO**\\ Comando di lettura di un QDO. È necessario che siano impostati i seguenti parametri: //unit//, //index//, //subindex//.\\ All'attivazione dello stato //st_send// è possibile verificare il parametro //qdoerr// per verificare la presenza di un errore.| +|READQDO|st_send=1|**Reading an SDO**\\ Read command a QDO. The following parameters must be set: //unit//, //index//, //subindex//.\\ Upon activation of the //st_send// state you can verify the //qdoerr// parameter to check for an error.| 
-|WRITEQDO|st_send=1|**Scrittura di un SDO**\\ Comando di scrittura di un QDO. È necessario che siano impostati i seguenti parametri: //unit//, //index//, //subindex//, //length// //data//.\\ All'attivazione dello stato //st_send// è possibile verificare il parametro //qdoerr// per verificare la presenza di un errore.| +|WRITEQDO|st_send=1|**Writing an SDO**\\ A write command QDO. The following parameters must be set: //unit//, //index//, //subindex//, //length// and //data//.\\ Upon activation of the //st_send// state you can check the //qdoerr// parameter to check for an error.| 
-|READEMCY|st_emcy=1|**Lettura di un messaggio di emergenza**\\ Comanda la lettura di un messaggio di emergenzaQuando lo stato //st_emcy// diventa attivo significa che il device ha ricevuto un messaggio di errore e sarà possibile leggerlo con questo comandoI parametri //emcyunit//, //emcycode//, //emcyreg// ed //emcyman1÷5// rappresentano i dati del messaggio.| +|READEMCY|st_emcy=1|**Reading an emergency message**\\ It commands an emergency message readingWhen the //st_emcy// state becomes active means that the device has received an error message, and you can read it with this commandThe //emcyunit//, //emcycode//, //emcyreg// and //emcyman1÷5// parameters represent the data in your message.| 
-|RSERR|st_error=1|**Reset dello stato di errore**\\ Azzera lo stato //st_error//.| +|RSERR|st_error=1|**Reset error state**\\ Reset the //st_error// state.| 
-|RSWRN|st_warning=1|**Reset dello stato di warning**\\ Azzera lo stato //st_warning//.|+|RSWRN|st_warning=1|**Reset warning state**\\ Reset the //st_warning// state.|
  
  
  • Last modified: 2019/08/29 17:18