Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
en:software:devices:modbus [2016/12/21 15:01] – [5.1. Input e coil Data Access] qem103 | en:software:devices:modbus [2016/12/21 15:13] – [5.2.1. Parametri per formattare il messaggio:] qem103 |
---|
The //st_ibit0//... and //st_obit1//... states are useful in order to facilitate access to information bit, only in the first table log. | The //st_ibit0//... and //st_obit1//... states are useful in order to facilitate access to information bit, only in the first table log. |
| |
==== - Modo di funzionamento MASTER ==== | ==== - Mode of MASTER operation ==== |
| |
La modalità master viene impostata con il parametro mode = 0. La scheda genera messaggi modbus solamente su comando | The master mode is set with the mode parameter = 0. The card generates modbus messages only on QCL ordering and does not automatically. To "format" the modbus message string there are a number of parameters.\\ |
del QCL e non automaticamente. Per “formattare” la stringa del messaggio modbus vi sono una serie di parametri.\\ | Using the two commands SEND or SENDSYC you send the read or write request to the slave, a number of States allow an audit on the operation being executed. We see in detail: |
Mediante i due comandi SEND o SENDSYC si inviano la richiesta di lettura o scrittura allo slave, una serie di stati | |
permettono una verifica sull’operazione eseguita. Vediamo in dettaglio: | |
| |
=== - 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.\\ | **type** = request type that you want to process (reading or writing word or bit).\\ |
**addr** = indice da cui iniziare a leggere o da cui iniziare a scrivere nello slave in questione.\\ | **idcard** = address of the slave drive to which you want to send the request.\\ |
**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.\\ | **addr** = the index from which to start reading or at which to start writing in the slave.\\ |
**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. | **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. |
| |
=== - Comandi per inviare il messaggio: === | === - Comandi per inviare il messaggio: === |