EPICS Controls 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  2018  2019  <20202021  2022  2023  2024  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  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Issues connecting to siemens PLC
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: Anders Lindh Olsson <Anders.LindhOlsson at ess.eu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 17 Sep 2020 11:33:58 +0000
> #                                           portName,                           tcpPortName,            slaveAddr,     modbusFct,       addr,   length, dataType,       pollMsec,       plcType,

> drvModbusAsynConfigure("ESS_NBLM_PLC502_AS_WRITE_0",            "ESS_NBLM_PLC502",              1,                     16,                      0,              40,             8,                      1,                      "SIEMENS")

> 2020/09/17 09:38:36.122 drvModbusAsyn::doModbusIO port ESS_NBLM_PLC502_AS_WRITE_0 error calling writeRead, error=172.30.150.83:502 write error: Broken pipe, nwrite=0/6, nread=0


Prior to that drvModbusAsynConfigure command you should have called drvAsynIPPortConfigure() and modbusInterposeConfig().  Did both of those calls succeed?  Prior to calling drvModbusAsynConfigure I would suggest adding this command to your startup to make sure the IP port is created and connected.


asynReport(10, "ESS_NBLM_PLC502")


Mark




________________________________
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Anders Lindh Olsson via Tech-talk <tech-talk at aps.anl.gov>
Sent: Thursday, September 17, 2020 2:57 AM
To: tech-talk at aps.anl.gov
Subject: Issues connecting to siemens PLC


Hi,



I have an IOC that is supposed to control a Siemens S7 PLC using s7plc (1.4.1) and modbus (3.0.0), developed by someone that is not me. I have been running into two (possibly separate but I don’t think so) issues.



First some errors during set up:



#                                           portName,                           tcpPortName,            slaveAddr,     modbusFct,       addr,   length, dataType,       pollMsec,       plcType,

drvModbusAsynConfigure("ESS_NBLM_PLC502_AS_WRITE_0",            "ESS_NBLM_PLC502",              1,                     16,                      0,              40,             8,                      1,                      "SIEMENS")

2020/09/17 09:38:36.122 drvModbusAsyn::doModbusIO port ESS_NBLM_PLC502_AS_WRITE_0 error calling writeRead, error=172.30.150.83:502 write error: Broken pipe, nwrite=0/6, nread=0

drvModbusAsynConfigure("ESS_NBLM_PLC508_AS_WRITE_0",            "ESS_NBLM_PLC508",              1,                     16,                      0,              6,              4,                      1,                      "SIEMENS")

2020/09/17 09:38:36.122 drvModbusAsyn::doModbusIO port ESS_NBLM_PLC508_AS_WRITE_0 error calling writeRead, error=172.30.150.83:508 write error: Broken pipe, nwrite=0/6, nread=0

drvModbusAsynConfigure("ESS_NBLM_PLC509_AS_WRITE_0",            "ESS_NBLM_PLC509",              1,                     16,                      0,              2,              8,                      1,                      "SIEMENS")

2020/09/17 09:38:36.123 drvModbusAsyn::doModbusIO port ESS_NBLM_PLC509_AS_WRITE_0 error calling writeRead, error=172.30.150.83:509 read error: Connection reset by peer, nwrite=6/6, nread=0

drvModbusAsynConfigure("ESS_NBLM_PLC503_AS_WRITE_0",            "ESS_NBLM_PLC503",              1,                     16,                      0,              40,             8,                      1,                      "SIEMENS")

2020/09/17 09:38:36.124 drvModbusAsyn::doModbusIO port ESS_NBLM_PLC503_AS_WRITE_0 error calling writeRead, error=172.30.150.83:503 write error: Broken pipe, nwrite=0/6, nread=0

drvModbusAsynConfigure("ESS_NBLM_PLC504_AS_WRITE_0",            "ESS_NBLM_PLC504",              1,                     16,                      0,              40,             8,                      1,                      "SIEMENS")

2020/09/17 09:38:36.124 drvModbusAsyn::doModbusIO port ESS_NBLM_PLC504_AS_WRITE_0 error calling writeRead, error=172.30.150.83:504 write error: Broken pipe, nwrite=0/6, nread=0

drvModbusAsynConfigure("ESS_NBLM_PLC507_AS_WRITE_0",            "ESS_NBLM_PLC507",              1,                     16,                      0,              40,             8,                      1,                      "SIEMENS")

2020/09/17 09:38:36.124 drvModbusAsyn::doModbusIO port ESS_NBLM_PLC507_AS_WRITE_0 error calling writeRead, error=172.30.150.83:507 write error: Broken pipe, nwrite=0/6, nread=0

drvModbusAsynConfigure("ESS_NBLM_PLC505_AS_WRITE_0",            "ESS_NBLM_PLC505",              1,                     16,                      0,              40,             8,                      1,                      "SIEMENS")

2020/09/17 09:38:36.124 drvModbusAsyn::doModbusIO port ESS_NBLM_PLC505_AS_WRITE_0 error calling writeRead, error=172.30.150.83:505 write error: Broken pipe, nwrite=0/6, nread=0

drvModbusAsynConfigure("ESS_NBLM_PLC506_AS_WRITE_0",            "ESS_NBLM_PLC506",              1,                     16,                      0,              40,             8,                      1,                      "SIEMENS")

2020/09/17 09:38:36.124 drvModbusAsyn::doModbusIO port ESS_NBLM_PLC506_AS_WRITE_0 error calling writeRead, error=172.30.150.83:506 write error: Broken pipe, nwrite=0/6, nread=0

drvModbusAsynConfigure("ESS_NBLM_PLC502_TS_WRITE_4000",         "ESS_NBLM_PLC502",              1,                     5,                       4000,   1640,   0,                      1,                      "SIEMENS")

2020/09/17 09:38:36.124 drvModbusAsyn::doModbusIO port ESS_NBLM_PLC502_TS_WRITE_4000 error calling writeRead, error=asynManager::queueLockPort queueRequest failed: port ESS_NBLM_PLC502 not connected, nwrite=0/6, nread=0

drvModbusAsynConfigure("ESS_NBLM_PLC502_TS_WRITE_6400",         "ESS_NBLM_PLC502",              1,                     5,                       6400,   1640,   0,                      1,                      "SIEMENS")

2020/09/17 09:38:36.124 drvModbusAsyn::doModbusIO port ESS_NBLM_PLC502_TS_WRITE_6400 error calling writeRead, error=asynManager::queueLockPort queueRequest failed: port ESS_NBLM_PLC502 not connected, nwrite=0/6, nread=0

drvModbusAsynConfigure("ESS_NBLM_PLC502_TS_WRITE_8800",         "ESS_NBLM_PLC502",              1,                     5,                       8800,   3,              0,                      1,                      "SIEMENS")

2020/09/17 09:38:36.124 drvModbusAsyn::doModbusIO port ESS_NBLM_PLC502_TS_WRITE_8800 error calling writeRead, error=asynManager::queueLockPort queueRequest failed: port ESS_NBLM_PLC502 not connected, nwrite=0/6, nread=0



And later when the IOC shell is started:



04d5808-xblm-ct-25485 > 09/17/20 09:38:37.387 s7plcConnect ESS_NBLM_PLC: connected to 172.30.150.83:2000

09/17/20 09:38:37.387 s7plcReceiveThread ESS_NBLM_PLC: recv(32, ..., 534, 0) failed: Connection reset by peer

09/17/20 09:38:37.387 s7plcCloseConnection ESS_NBLM_PLC

09/17/20 09:38:38.638 s7plcConnect ESS_NBLM_PLC: connected to 172.30.150.83:2000

09/17/20 09:38:38.639 s7plcReceiveThread ESS_NBLM_PLC: recv(32, ..., 534, 0) failed: Connection reset by peer

09/17/20 09:38:38.639 s7plcCloseConnection ESS_NBLM_PLC

09/17/20 09:38:39.889 s7plcConnect ESS_NBLM_PLC: connected to 172.30.150.83:2000

09/17/20 09:38:39.890 s7plcReceiveThread ESS_NBLM_PLC: recv(32, ..., 534, 0) failed: Connection reset by peer

09/17/20 09:38:39.890 s7plcCloseConnection ESS_NBLM_PLC



Any help would be appreciated.





Cheers

Anders

Replies:
RE: Issues connecting to siemens PLC Anders Lindh Olsson via Tech-talk
References:
Issues connecting to siemens PLC Anders Lindh Olsson via Tech-talk

Navigate by Date:
Prev: Re: ASLO doesn't work Vishnu Patel via Tech-talk
Next: Re: ASLO doesn't work Mark Rivers via Tech-talk
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  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Issues connecting to siemens PLC Anders Lindh Olsson via Tech-talk
Next: RE: Issues connecting to siemens PLC Anders Lindh Olsson via Tech-talk
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  2018  2019  <20202021  2022  2023  2024 
ANJ, 17 Sep 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·