Differenze
Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.
Entrambe le parti precedenti la revisione Revisione precedente Prossima revisione | Revisione precedente Prossima revisioneEntrambe le parti successive la revisione | ||
software:devices:modbus [2015/09/16 10:08] – [5.5. Esempi] qem207 | software:devices:modbus [2015/09/16 10:10] – [6.1.1. Impostazioni modbus e apertura del canale di comunicazione di tipo seriale] qem207 | ||
---|---|---|---|
Linea 283: | Linea 283: | ||
modbus.mode = 0 ; modbus master | modbus.mode = 0 ; modbus master | ||
modbus.prot = 2 ; TCPIP | modbus.prot = 2 ; TCPIP | ||
+ | modbus.tout = 100 ; timeout | ||
tcpip_port= 502 ; number of tcpip port (default 502) | tcpip_port= 502 ; number of tcpip port (default 502) | ||
modbus.stopb = tcpip_port / & | modbus.stopb = tcpip_port / & | ||
modbus.par | modbus.par | ||
- | modbus.tout = 100 ; timeout | ||
modbus.OPENCOM | modbus.OPENCOM | ||
Linea 499: | Linea 499: | ||
tm_opencom = 100 ; timeout for OPENCOM command | tm_opencom = 100 ; timeout for OPENCOM command | ||
WAIT modbus.st_opencom OR tm_opencom | WAIT modbus.st_opencom OR tm_opencom | ||
+ | IF NOT modbus.st_opencom | ||
+ | OpenComError = 1 ; com not opened | ||
+ | ENDIF | ||
+ | </ | ||
+ | === - Impostazioni modbus e apertura del canale di comunicazione di tipo TCPIP === | ||
+ | <code QCL> | ||
+ | modbus.mode = 1 ; modbus slave | ||
+ | modbus.prot = 2 ; TCPIP | ||
+ | |||
+ | tcpip_port= 502 ; number of tcpip port (default 502) | ||
+ | modbus.stopb = tcpip_port / & | ||
+ | modbus.par | ||
+ | |||
+ | modbus.OPENCOM | ||
+ | tm_opencom = 500 ; waiting time to have a correct response | ||
+ | WAIT tm_opencom | ||
IF NOT modbus.st_opencom | IF NOT modbus.st_opencom | ||
OpenComError = 1 ; com not opened | OpenComError = 1 ; com not opened |