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: Slow TCP/IP Modbus and data lose
From: "Engbretson, Mark S. via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov (tech-talk at aps.anl.gov)" <tech-talk at aps.anl.gov>
Date: Thu, 10 Sep 2020 18:25:37 +0000
Mark? Question

I have an Teledyne D-Series Syringe Pump that speaks modbus. It has 142 read/write data bits , 80 read/write 2 register Floats, and 22 read only 2 register floats.

Since the data size is larger than modbus supports, I have broken it up into smaller reads and writes that should be of legal size. Doing tests on any given object seems to work, most of the time.

What happens is that the expected data tends to return 'short', and I see a flush happening to discard  bytes that are either appearing out of order or delayed. So the data that I am trying to decode tends to be missing data off the end.

If I make the request small enough, I might get more packets that survive intact, but then I also have to do more reads to get all the data. At some point, I start losing bytes again in specific requests; flushing more data, and if this goes on for a while, I will end up dropping the connection to the hardware , but I never reach a point where I am sure that all of the data that this hardware exposes is 'real',  much less trusting trying to write settings back to it.

You have an idea of what might be causing this data to be returned out of order or what might be a work around? I am assuming that this hardware just does not have the processing power  to keep up with the requests and I don't know how to dumb the code down to a request and data rate that it can keep up with. Suggestions? 

The basic command template  that I am using is some variation of this

drvModbusAsynConfigure("$(PORT)_Reg_In_1",  "$(PORT)", 1,  3, 0, 20, 8, 1000, "Teledyne")

with a substitution table like

file "$(MODBUS)/db/aiFloat64.template" {
pattern
{      P,           R,            PORT,  OFFSET,   DATA_TYPE,  LOPR,  HOPR, PREC,   EGU,       SCAN,   DESC}
{16bmSP:, reg:0_RBV,     SP1_Reg_In_1,    0,     FLOAT32_BE,   0,    10,    4,  egu, "I/O Intr", "Register"}
. . .
}

Trace info

2020/09/09 14:38:20.270 164.54.105.209:502 flushed 21 bytes
2020/09/09 14:38:20.280 164.54.105.209:502 write 12

00 02 00 00 00 06 01 03 00 00 00 32 
2020/09/09 14:38:20.316 164.54.105.209:502 read 80

00 02 00 00 00 67 01 03 64 43 4f 00 00 43 4f 00 00 43 4f 00 
00 43 4f 00 00 43 4f 00 00 43 4f 00 00 41 b0 00 00 41 b0 00 
00 38 d1 b7 17 38 d1 b7 17 41 b0 00 00 38 d1 b7 17 41 e8 00 
00 41 e8 00 00 00 00 00 00 00 00 00 00 48 49 fe c0 48 49 fe 
2020/09/09 14:38:24.316 164.54.105.209:502 flushed 29 bytes
2020/09/09 14:38:24.327 164.54.105.209:502 write 12

00 03 00 00 00 06 01 03 00 00 00 32 
2020/09/09 14:38:24.366 164.54.105.209:502 read 80

00 03 00 00 00 67 01 03 64 43 4f 00 00 43 4f 00 00 43 4f 00 
00 43 4f 00 00 43 4f 00 00 43 4f 00 00 41 b0 00 00 41 b0 00 
00 38 d1 b7 17 38 d1 b7 17 41 b0 00 00 38 d1 b7 17 41 e8 00 
00 41 e8 00 00 00 00 00 00 00 00 00 00 48 49 fe c0 48 49 fe 
2020/09/09 14:38:28.366 164.54.105.209:502 flushed 29 bytes
2020/09/09 14:38:28.376 164.54.105.209:502 write 12

00 04 00 00 00 06 01 03 00 00 00 32 
2020/09/09 14:38:28.416 164.54.105.209:502 read 80

00 04 00 00 00 67 01 03 64 43 4f 00 00 43 4f 00 00 43 4f 00 
00 43 4f 00 00 43 4f 00 00 43 4f 00 00 41 b0 00 00 41 b0 00 
00 38 d1 b7 17 38 d1 b7 17 41 b0 00 00 38 d1 b7 17 41 e8 00 
00 41 e8 00 00 00 00 00 00 00 00 00 00 48 49 fe c0 48 49 fe 
2020/09/09 14:38:32.416 164.54.105.209:502 flushed 29 bytes
2020/09/09 14:38:32.426 164.54.105.209:502 write 12

00 05 00 00 00 06 01 03 00 00 00 32 
2020/09/09 14:38:32.465 164.54.105.209:502 read 80

00 05 00 00 00 67 01 03 64 43 4f 00 00 43 4f 00 00 43 4f 00 
00 43 4f 00 00 43 4f 00 00 43 4f 00 00 41 b0 00 00 41 b0 00 
00 38 d1 b7 17 38 d1 b7 17 41 b0 00 00 38 d1 b7 17 41 e8 00 
00 41 e8 00 00 00 00 00 00 00 00 00 00 48 49 fe c0 48 49 fe 
2020/09/09 14:38:36.466 164.54.105.209:502 flushed 29 bytes
2020/09/09 14:38:36.476 164.54.105.209:502 write 12

00 06 00 00 00 06 01 03 00 00 00 32 
2020/09/09 14:38:36.515 164.54.105.209:502 read 72

00 06 00 00 00 67 01 03 64 43 4f 00 00 43 4f 00 00 43 4f 00 
00 43 4f 00 00 43 4f 00 00 43 4f 00 00 41 b0 00 00 41 b0 00 
00 38 d1 b7 17 38 d1 b7 17 41 b0 00 00 38 d1 b7 17 41 e8 00 
00 41 e8 00 00 00 00 00 00 00 00 00 
2020/09/09 14:38:40.515 164.54.105.209:502 flushed 37 bytes
2020/09/09 14:38:40.526 164.54.105.209:502 write 12

00 07 00 00 00 06 01 03 00 00 00 32 
2020/09/09 14:38:40.565 164.54.105.209:502 read 72

00 07 00 00 00 67 01 03 64 43 4f 00 00 43 4f 00 00 43 4f 00 
00 43 4f 00 00 43 4f 00 00 43 4f 00 00 41 b0 00 00 41 b0 00 
00 38 d1 b7 17 38 d1 b7 17 41 b0 00 00 38 d1 b7 17 41 e8 00 
00 41 e8 00 00 00 00 00 00 00 00 00



Replies:
RE: Slow TCP/IP Modbus and data lose Mark Rivers via Tech-talk

Navigate by Date:
Prev: Phoebus Logbook ui preferences Florian Feldbauer via Tech-talk
Next: RE: Slow TCP/IP Modbus and data lose 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: Phoebus Logbook ui preferences Florian Feldbauer via Tech-talk
Next: RE: Slow TCP/IP Modbus and data lose 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 
ANJ, 10 Sep 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·