Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
en:software:devices:modbus [2016/12/21 14:38] – [1. Introduction] qem103 | en:software:devices:modbus [2016/12/21 16:46] – [5.2.2. Comandi per inviare il messaggio:] qem103 | ||
---|---|---|---|
Line 139: | Line 139: | ||
The MODBUS device can use a serial port or TCPIP to communicate in master mode (parameter //mode// = 0). Allows (via parameters, states and commands) all instruments to be able to communicate with any equipment utilizing Modbus.\\ | The MODBUS device can use a serial port or TCPIP to communicate in master mode (parameter //mode// = 0). Allows (via parameters, states and commands) all instruments to be able to communicate with any equipment utilizing Modbus.\\ | ||
- | FIXME Il device | + | The device |
- | usati in QCL e cioè WORD, LONG e FLAG. Il tipo “BYTE” | + | |
- | ==== - Accesso dei dati input e coil ==== | + | ==== - Input and coil Data Access |
- | I dati tipo input o //coi//l hanno nel protocollo | + | The data input or //coil// type have in the modbus |
- | nella tabella di scambio dati è definita la seguente modalità: ogni registro | + | The // |
- | 16 elementi che vengono numerati da sinistra verso destra. Per le scritture o letture | + | |
- | sono superiori a quelli contenuti nel registro l’operazione continua nel registro successivo.\\ | + | |
- | Gli stati // | + | |
- | tabella. | + | |
- | ==== - Modo di funzionamento | + | ==== - Mode of MASTER |
- | La modalità | + | The master mode is set with the mode parameter |
- | del QCL e non automaticamente. Per “formattare” la stringa del messaggio | + | Using the two commands |
- | Mediante i due comandi | + | |
- | permettono una verifica sull’operazione eseguita. Vediamo | + | |
- | === - Parametri per formattare il messaggio: === | + | === - Parameters for formatting the message: === |
- | **type** = tipo di richiesta che si vuole processare (lettura o scrittura di word o di bit).\\ | + | |
- | **idcard** = indirizzo dell’unità slave verso cui si vuole inviare la richiesta.\\ | + | |
- | **addr** = indice da cui iniziare a leggere o da cui iniziare a scrivere nello slave in questione.\\ | + | |
- | **tabreg** = per le operazioni di lettura (type = 1, 2, 3, 4), questo parametro indica la posizione nella “tabella dei dati letti” dove verrà memorizzato il dato letto sullo slave. Per le operazioni di scrittura (type = 5, 6, 15, 16), questo parametro indica da posizione nella “tabella dei dati da scrivere” dove si trova il dato da scrivere sullo slave. Sono previsti valori tra 1 e 512 per valori del parametro type = 1, 2, 5, 15 (scrittura e lettura di bit), mentre per valori type = 3, 4, 6, 16 (scrittura e lettura di word) i valori previsti sono tra 1 e 32.\\ | + | |
- | **num** = numero di valori che si intendono leggere o scrivere (se il tipo richiesta type lo prevede). Sono previsti valori tra 1 e 128 per valori del parametro type = 1, 2, (lettura di bit), mentre per valori type = 3, 4, 16 (scrittura multipla e lettura di word) i valori previsti sono tra 1 e 32. | + | |
- | === - Comandi per inviare il messaggio: === | + | **type** = request type that you want to process (reading or writing word or bit).\\ |
- | SEND invia il messaggio di richiesta allo slave.\\ | + | **idcard** = address of the slave drive to which you want to send the request.\\ |
- | SENDSYC | + | **addr** = the index from which to start reading or at which to start writing in the slave.\\ |
+ | **tabreg** = for read operations (type = 1, 2, 3, 4), This parameter indicates the position in the “table of data read” where will store the read data on the slave. For write operations (type = 5, 6, 15, 16), this parameter indicates the position in the “table of data to be written” where is the data to be written on the slave. Are accepted values are between 1 and 512 for values of type parameter = 1, 2, 5, 15 (writing and reading of bits), while for type value = 3, 4, 6, 16 (writing and reading of word) the expected values are between 1 and 32.\\ | ||
+ | **num** = number of values that are read or write (if the request type so provides). Are accepted values are between 1 and 128 for values of type parameter = 1, 2, (reading of bits), while for type value = 3, 4, 16 (multiple word reading and writing) the accepted value are between 1 and 32. | ||
+ | |||
+ | === - Commands to send the message: === | ||
+ | |||
+ | SEND sends the request message to the slave.\\ | ||
+ | SENDSYC | ||
=== - Variabili di Stato per diagnostica operazione: === | === - Variabili di Stato per diagnostica operazione: === |