#! ../../bin/linux-x86_64/modbusApp
dbLoadDatabase("../../dbd/modbus.dbd")
modbus_registerRecordDeviceDriver(pdbbase)
drvAsynIPPortConfigure("AC500","192.168.0.10:1201",0,0,1)
#asynSetOption("AC500", 0, "disconnectOnReadTimeout", "Y")
modbusInterposeConfig("AC500", 0, 5000, 0)
drvModbusAsynConfigure("AC_DW1", "AC500", 0, 4, 0, 1, 0, 100, "AC500")
drvModbusAsynConfigure("AC_DW2", "AC500", 0, 4, 1, 1, 0, 100, "AC500")
asynSetTraceIOMask("AC500", 0, 4)
asynSetTraceIOTruncateSize("AC500", 0, 512)
dbLoadTemplate("abb.substitutions")
iocInit
--------------------------------------------------------------------------------------------------------------
file "../../db/longin.template" {pattern
{P, R, PORT, OFFSET, SCAN,}
{AC500:, DW1, AC_DW1, 0, "I/O Intr",}
{AC500:, DW2, AC_DW2, 0, "I/O Intr",}
}
Here is the iocShell output:
#! ../../bin/linux-x86_64/modbusApp
dbLoadDatabase("../../dbd/modbus.dbd")
modbus_registerRecordDeviceDriver(pdbbase)
drvAsynIPPortConfigure("AC500","192.168.0.10:1201",0,0,0)
#asynSetOption("AC500", 0, "disconnectOnReadTimeout", "Y")
modbusInterposeConfig("AC500", 0, 5000, 0)
drvModbusAsynConfigure("AC_DW1", "AC500", 0, 4, 0, 1, 0, 100, "AC500")
drvModbusAsynConfigure("AC_DW2", "AC500", 0, 4, 1, 1, 0, 100, "AC500")
asynSetTraceIOMask("AC500", 0, 4)
asynSetTraceIOTruncateSize("AC500", 0, 512)
dbLoadTemplate("abb.substitutions")
iocInit
Starting iocInit
############################################################################
## EPICS R3.16.1-DEV
## EPICS Base built Oct 24 2018
############################################################################
2018/11/16 10:22:35.526 drvModbusAsyn::doModbusIO port AC_DW1 error calling writeRead, error=192.168.0.10:1201 read error: Connection reset by peer, nwrite=6/6, nread=0
2018/11/16 10:22:35.580 drvModbusAsyn::doModbusIO port AC_DW2 error calling writeRead, error=192.168.0.10:1201 read error: Connection reset by peer, nwrite=6/6, nread=0
iocRun: All initialization complete
epics>