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  <20192020  2021  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  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: How fast can EPICS communicate with a device?
From: Mark Rivers via Tech-talk <[email protected]>
To: "'Sobhani, Bayan'" <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Fri, 15 Feb 2019 15:38:14 +0000
That shows that the device is responding within about 10 ms.  However, it is then another 1 second before the next write.  That is probably because the higher level software is waiting for more input and then finally timing out after 1 second.  Perhaps it expects \r\n rather than just \n as the terminator?

devGPIB is obsolete and no longer supported.  You could reproduce this communication using a single ai record and StreamDevice with a single protocol.  You could also reproduce it with just a single asyn record.  Try one of those and see what performance you get.

Mark


-----Original Message-----
From: Sobhani, Bayan <[email protected]> 
Sent: Friday, February 15, 2019 8:46 AM
To: Mark Rivers <[email protected]>
Cc: [email protected]
Subject: RE: How fast can EPICS communicate with a device?

The IOC I am using is an old keithley IOC I found online which seems to be using devGPIB:

https://epics.anl.gov/download/modules/keithley2400-1.1.tar.gz

The messages when I turn on asyn trace are:

2019/02/15 09:45:00.087 192.168.56.7:5025 write 7
:READ?\n
2019/02/15 09:45:00.097 192.168.56.7:5025 read 13
4.203473E-02\n
2019/02/15 09:45:01.099 192.168.56.7:5025 write 7
:READ?\n
2019/02/15 09:45:01.106 192.168.56.7:5025 read 14
-8.474424E-02\n
2019/02/15 09:45:02.112 192.168.56.7:5025 write 7
:READ?\n
2019/02/15 09:45:02.121 192.168.56.7:5025 read 14
-2.418922E-02\n
2019/02/15 09:45:03.126 192.168.56.7:5025 write 7
:READ?\n
2019/02/15 09:45:03.135 192.168.56.7:5025 read 13
7.028082E-02\n
2019/02/15 09:45:04.140 192.168.56.7:5025 write 7
:READ?\n
2019/02/15 09:45:04.149 192.168.56.7:5025 read 13
6.516452E-02\n
2019/02/15 09:45:05.160 192.168.56.7:5025 write 7
:READ?\n
2019/02/15 09:45:05.169 192.168.56.7:5025 read 13
6.202125E-02\n
2019/02/15 09:45:06.172 192.168.56.7:5025 write 7
:READ?\n
2019/02/15 09:45:06.181 192.168.56.7:5025 read 13
1.992785E-02\n
2019/02/15 09:45:07.187 192.168.56.7:5025 write 7
:READ?\n
2019/02/15 09:45:07.197 192.168.56.7:5025 read 13
9.599727E-03\n
2019/02/15 09:45:08.202 192.168.56.7:5025 write 7
:READ?\n
2019/02/15 09:45:08.211 192.168.56.7:5025 read 14
-5.647328E-02\n

-----Original Message-----
From: Mark Rivers <[email protected]> 
Sent: Friday, February 15, 2019 9:25 AM
To: Mark Rivers <[email protected]>
Cc: Sobhani, Bayan <[email protected]>; [email protected]
Subject: Re: How fast can EPICS communicate with a device?

Sorry I missed that you added .01 second in the dbd file, so ignore that question.

I suspect you are getting a timeout if you only get 1 Hz. Turn on asynTrace to see what is happening on the communication link.

What device support are you using? StreamDevice, asyn device support, etc.?

Mark

Sent from my iPhone

> On Feb 15, 2019, at 8:20 AM, Mark Rivers via Tech-talk <[email protected]> wrote:
> 
> There is no limit in the speed of communicating with EPICS, only the speed of the link and the device latency.
> 
> How did you get SCAN=.01 second? Did you redefine the EPICS scan rates?
> 
> If you want to go as fast as possible you cannot use periodic scanning. You can use a set of FNLKs that for a loop or other mechanism to scan faster.
> 
> Are you using an asyn serial or IP port driver? If so you can turn in asynTrace to get time stamped messages to measure performance.
> 
> Mark
> 
> 
> Sent from my iPhone
> 
> On Feb 15, 2019, at 8:05 AM, Sobhani, Bayan via Tech-talk <[email protected]<mailto:[email protected]>> wrote:
> 
> What exactly are the limitations on how fast EPICS can communicate with a device?
> 
> I have a device I can communicate with around 200Hz if I send it commands with a python program that uses the telnetlib module. I was wondering if it would be possible for the device to communicate with EPICS close to this rate.
> 
> I tried modify EPICS database definition files to make records process faster. To test this, I made a PV that does no device communication, but counts up when it was processed. When I added a line in the dbd file to add a scan option of .01 second, and set the SCAN field to .01, this record increases by 100 every second when I run the IOC, which is expected behavior.
> 
> However, when I tried having this record send commands to the device, it was much slower, around once per second. In general, when I process PVs that communicate with a device, it seems to take a while to get a response, whereas when I send commands directly through telnet I get the result back almost instantaneously.  Is there a limit to how fast EPICS can communicate with a device, apart from the SCAN field options?
> 
> Alex

Replies:
RE: How fast can EPICS communicate with a device? Sobhani, Bayan via Tech-talk
References:
How fast can EPICS communicate with a device? Sobhani, Bayan via Tech-talk
Re: How fast can EPICS communicate with a device? Mark Rivers via Tech-talk
Re: How fast can EPICS communicate with a device? Mark Rivers via Tech-talk
RE: How fast can EPICS communicate with a device? Sobhani, Bayan via Tech-talk

Navigate by Date:
Prev: AreaDetector OCR plugin Rod Nussbaumer via Tech-talk
Next: RE: How fast can EPICS communicate with a device? Sobhani, Bayan 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  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: How fast can EPICS communicate with a device? Sobhani, Bayan via Tech-talk
Next: RE: How fast can EPICS communicate with a device? Sobhani, Bayan 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  <20192020  2021  2022  2023  2024 
ANJ, 15 Feb 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·