Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020 
<== Date ==> <== Thread ==>

Subject: modbus connection error to ABB PLC
From: 黄佳伟 <jwhuang@pims.ac.cn>
To: tech-talk@aps.anl.gov <tech-talk@aps.anl.gov>
Date: Fri, 16 Nov 2018 10:30:23 +0800
Hello,
    I want to control an ABB AC500 PLC by EPICS through TCP/IP, so I use modbus support from Mark Rivers. I do a little modifications to "Koyo1.cmd" scripts but things do not go well. PLC can be connected by asyn ip port but it shows "Connection reset by peer" when asyn modbus port connects to registers in PLC. I googled this and is told that the reason may be that response telegrams contain RST signal. This error might be a protocol problem.

As mentioned in documents, this modbus support does not support Siemens PLC. Is ABB PLC also not supported? The default port of AC500 PLC is 1201, not 502,as shown below.  Does this matter?

Thank you for any help,
Jasper


Here are my *.cmd and *.substitutions scripts:
 
#! ../../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> 

Replies:
Re: modbus connection error to ABB PLC Mark Rivers

Navigate by Date:
Prev: Re: streamDevice redirection-to-records & PVs that start with a number Peterson, Kevin M. via Tech-talk
Next: Re: modbus connection error to ABB PLC Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020 
Navigate by Thread:
Prev: Re: streamDevice redirection-to-records & PVs that start with a number Peterson, Kevin M. via Tech-talk
Next: Re: modbus connection error to ABB PLC Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020 
ANJ, 15 Nov 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·