Hi,
There are radiation dose monitor devices by using modbus tcp protocol to communicate.
The communications have succeeded to establish
by using epics 3.14.12.5, modbusR1-2 combined with asynR4-9 (very old version) many years ago.
Therefore, I want to upgrade to the latest program by using modbusR2-9 combined with asynR4-30 and epics 3.14.12.5.
My settings are the same as the old version of modbusR1-2 in start.cmd file:
drvAsynIPPortConfigure("Koyo3R", "192.168.1.241:502",0,1,1)
modbusInterposeConfig("Koyo3R", 2,0,2000)
drvModbusAsynConfigure("RD3R", "Koyo3R", 3, 0, 95, 0, 1160, "rpDevice") #
modbusR1-2 version
I noticed that there was a little difference of parameter settings in the command
drvModbusAsynConfigure of new version (modbusR2-9). The manual says
:"For TCP the slave address is used for the "unit identifier", the last field in the MBAP header.", and the last field in the MBAP header, as i know, is the slave address (ranging from 1 to 247). So, i randomly set:
drvModbusAsynConfigure("RD3R", "Koyo3R",
111, 3, 0, 95, 0, 1160, "rpDevice") #
modbusR2-9 version, I randomly set 111
or:
drvModbusAsynConfigure("RD3R", "Koyo3R",
0xFF, 3, 0, 95, 0, 1160, "rpDevice") #
use 0xFF to disable the parameter
however, I cannot establish the communications by using the new version of modbus and I have no idea how to do.
The error messages are as follows:
epics> 2018/01/24 15:19:26.062 drvModbusAsyn::doModbusIO port RD3R is disconnected
2018/01/24 15:19:30.069 drvModbusAsyn::doModbusIO port RD3R error calling writeRead, error=192.168.1.241:502 timeout: Resource temporarily unavailable, nwrite=6/6, nread=0
2018/01/24 15:19:31.229 drvModbusAsyn::doModbusIO port RD3R has I/O error
2018/01/24 15:19:35.234 drvModbusAsyn::doModbusIO port RD3R error calling writeRead, error=192.168.1.241:502 timeout: Resource temporarily unavailable, nwrite=6/6, nread=0
Any help will be appreciated, and thanks in advance !
Zhefu