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 16:46] – [5.2.2. Comandi per inviare il messaggio:] qem103 | en:software:devices:modbus [2016/12/21 17:39] – [Read Holding Register] qem103 | ||
---|---|---|---|
Line 164: | Line 164: | ||
SENDSYC sends the request message to a QEM slave of MODBUS type and reports the operation concluded (// | SENDSYC sends the request message to a QEM slave of MODBUS type and reports the operation concluded (// | ||
- | === - Variabili di Stato per diagnostica operazione: === | + | === - State variables for diagnostic operation: === |
- | Quando l’operazione di trasmissione messaggio è conclusa, viene impostata a 1 la variabile di stato st_sended. Se è | + | |
- | stato utilizzato il comando SEND lo stato viene posto a 1 quando il master riceve la conferma del messaggio inviato. Se | + | |
- | invece è stato utilizzato nel master il comando SENDSYC allora questo stato verrà impostato a 1 quando lo slave QEM | + | |
- | avrà eseguito il comando RECEIVED. In caso di errore, invece, questo stato viene posto comunque a 1 (dopo il tempo | + | |
- | // | + | |
- | Il comando SENDSYC si rende necessario quando si vuole sincronizzare la scrittura del master di un pacchetto dati con la lettura degli stessi dati da parte dello slave (può essere usato quando sia master che slave sono Qmove). | + | |
- | ==== - Richieste di lettura | + | When ended the message send operation, the status st_sended variable is set to 1. If you used the SEND command the state is set to 1 when the master receive the confirmation of the message being sent. If you have used the SENDSYC command in the master then this status will be set to 1 when the slave QEM will execute the RECEIVED command. In case of error, This status is still in set to 1 (After the //toutsyc// time) but the err parameter indicates the cause of the error (see the description of this parameter for details).\\ |
+ | The SENDSYC coomand it becomes necessary when you want to synchronize master data packet writing by reading the same data from the slave (can be used when both master and slave are Qmove). | ||
+ | |||
+ | ==== - Read request | ||
=== Read Coil === | === Read Coil === | ||
- | Funzione di lettura | + | |
- | impostare | + | Bit read function. You want to read the bits of a slave (// |
- | numero di bit che si intendono leggere. Bisogna impostare | + | (//addr// + //num// - 1) <= 512 e (//tabreg// + //num// - 1) <= 512 otherwise the request will fail (reporting by //wcmd//). |
- | master | + | |
- | soddisfare sempre le seguenti due condizioni:\\ | + | |
- | (//addr// + //num// - 1) <= 512 e (//tabreg// + //num// - 1) <= 512 altrimenti la richiesta non potrà essere eseguita | + | |
=== Read Input === | === Read Input === | ||
- | Funzione di lettura a bit. Si vogliono leggere i bit di un certo slave (// | + | |
+ | Bit read function. To read the bits of a slave (// | ||
=== Read Holding Register === | === Read Holding Register === | ||
- | Funzione di lettura a word. Si vogliono leggere le word di un certo slave (idcard). | + | |
- | Bisogna impostare | + | Word read function. Si vogliono leggere le word di un certo slave (idcard). |
- | indica il numero di word che si intendono leggere. Bisogna impostare | + | You must to set addr to indicate the address of the word in the slave from which to start reading. The num parameter indicates the number of word to be read. You must set tabreg |
- | dei dai letti” del master | + | (addr + num - 1) <= 32 e (tabreg + num - 1) <= 32 otherwise the request will fail (reporting by wcmd). |
- | Si raccomanda di soddisfare sempre le seguenti due condizioni:\\ | + | |
- | (addr + num - 1) <= 32 e (tabreg + num - 1) <= 32 altrimenti la richiesta non potrà essere eseguita | + | |
- | wcmd). | + | |
=== Read Input Register === | === Read Input Register === |