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 2020 2021 <2022> 2023 2024 2025 | 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 2020 2021 <2022> 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Exploring EPICS performance/processing limits |
From: | "Marco A. Barra Montevechi Filho via Tech-talk" <tech-talk at aps.anl.gov> |
To: | Mark Rivers <rivers at cars.uchicago.edu>, Matthew Newville <newville at cars.uchicago.edu>, Allan Borgato <allan.borgato at lnls.br> |
Cc: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Fri, 7 Oct 2022 20:42:55 +0000 |
Problem solved, Mark!
I read the streamDevice documentation again to better understand your explanations. It became clear that the lack of terminator in the replies coming from the 60000 port was causing the timeouts as you said. To verify that i used "var streamError 1" right after iocInit and indeed it acused several timeouts whenever i tried to trigger certain records. I talked to the current developer of the protocol (Allan Borgato, who is now on copy) and together we reimplemented it with terminators. Also, we dont know why they were configured in the protocol file. After adding the terminators in the protocol several improvements were noticed not only with the record we wanted but also with some other records that worked but used to take too much time to take effect. In particular, "var streamError 1" right after iocInit stopped accusing the timeouts. To sum up the problem and its solution, if I understand the situation correctly:
Thanks for your help. Allan also sends his thanks.
Cheers, Marco From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: 07 October 2022 12:24 To: Marco A. Barra Montevechi Filho <marco.filho at lnls.br>; Matthew Newville <newville at cars.uchicago.edu> Cc: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov> Subject: RE: Exploring EPICS performance/processing limits Ø I dont know why the previous developer defined these terminators in the .proto file but if this is the problem we are close to fixing it.
It is actually OK to define the terminator in the protocol file. I prefer to do it with the commands in iocsh because then any software using the port (e.g. asynRecord) will be using the correct terminator, not just stream. But the problem is that the protocol file DOES define the terminator, but it seems like it is not being used when it communicates. You need to figure out why. You also need to understand if your server on port 60000 expects to receive terminators on input and appends a terminator on output.
Mark
From: Marco A. Barra Montevechi Filho <marco.filho at lnls.br>
Hi! From: Mark Rivers <rivers at cars.uchicago.edu>
Hi Marco,
Your example is pretty complex, it is best to simplify as much as possible for tests like this.
I have some questions. - Your drvAsynIPPort driver is connecting to 127.0.0.1:60000. What server are you running on port 60000? I was using the standard Echo Protocol service on port 7. - Your protocol file has Terminator = LF; However, the asynTrace output shows that there is actually no LF terminator being sent or received. Do you understand this?
2022/10/07 11:15:41.810 127.0.0.1:60000 write 92 {\"id\":\"1\", \"method\":\"HS_ImgChipNumberID_Command\", \"params\": [[\"1\", \"0\"]], \"jsonr 2022/10/07 11:15:41.815 127.0.0.1:60000 read 57 {\"id\":\"1\", \"result\":\"Selected sensor 0\", \"jsonrpc\":\"2.0\"} 2022/10/07 11:15:41.917 127.0.0.1:60000 write 87
- The asynTrace shows that it is almost exactly 0.1 seconds between the 2 write commands. This is the same thing I was seeing, and I believe it is due to a read timeout because you are not using a terminator.
Mark
From: Marco A. Barra Montevechi Filho <marco.filho at lnls.br>
Hi, Mark! From: Mark Rivers <rivers at cars.uchicago.edu>
Hi Marco,
Please post:
- The complete output when your IOC starts - The database containing MOBICDTE:Backend:ImgChipNumberID - The protocol file you are using - The output of asynTrace as I suggested my message this morning
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov>
On Behalf Of Marco A. Barra Montevechi Filho via Tech-talk
Hi, Matt! field(A,"0") field(B,"154") field(C,"198") field(D,"208") field(E,"57") field(F, "1") field(G, "1") field(H,"182") field(OUTA,"${P}${BE}:ImgChipNumberID PP") field(OUTB,"${P}${BE}:DAC_GND PP") field(OUTC,"${P}${BE}:DAC_CAS PP") field(OUTD,"${P}${BE}:DAC_FBK PP") field(OUTE,"${P}${BE}:DAC_DiscL PP") field(OUTF,"$(P)$(R)Tmr1 PP") field(OUTG,"${P}${BE}:ImgChipNumberID PP") field(OUTH,"${P}${BE}:DAC_GND PP") }
def changer(x): for i in range(0,4): epics.caput("MOBICDTE:Backend:ImgChipNumberID", i) time.sleep(x)
changer(float(sys.argv[1])) 127.000.000.001.55780-127.000.000.001.60000: {"id":"1", "method":"HS_ImgChipNumberID_Command", "params": [["0"]], "jsonrpc": "2.0"} 127.000.000.001.55780-127.000.000.001.60000: {"id":"1", "method":"HS_ImgChipNumberID_Command", "params": [["1", "1"]], "jsonrpc": "2.0"} 127.000.000.001.55780-127.000.000.001.60000: {"id":"1", "method":"HS_ImgChipNumberID_Command", "params": [["0"]], "jsonrpc": "2.0"} 127.000.000.001.55780-127.000.000.001.60000: {"id":"1", "method":"HS_ImgChipNumberID_Command", "params": [["1", "2"]], "jsonrpc": "2.0"} 127.000.000.001.55780-127.000.000.001.60000: {"id":"1", "method":"HS_ImgChipNumberID_Command", "params": [["0"]], "jsonrpc": "2.0"} 127.000.000.001.55780-127.000.000.001.60000: {"id":"1", "method":"HS_ImgChipNumberID_Command", "params": [["1", "3"]], "jsonrpc": "2.0"} 127.000.000.001.55780-127.000.000.001.60000: {"id":"1", "method":"HS_ImgChipNumberID_Command", "params": [["0"]], "jsonrpc": "2.0"} CA.Client.Exception............................................... Warning: "Identical process variable names on multiple servers" Context: "Channel: "MOBICDTE:Backend:ImgChipNumberID", Connecting to: 192.168.55.1:5064, Ignored: s-mgn-mob01-l.abtlus.org.br:5064" Source File: ../cac.cpp line 1320 Current Time: Thu Oct 06 2022 14:56:42.275342454 .................................................................. MOBICDTE:Backend:ImgChipNumberID 2022-10-06 14:31:09.112389 3 READ INVALID MOBICDTE:Backend:ImgChipNumberID 2022-10-06 14:57:59.690554 0 READ INVALID MOBICDTE:Backend:ImgChipNumberID 2022-10-06 14:58:04.690451 1 READ INVALID MOBICDTE:Backend:ImgChipNumberID 2022-10-06 14:58:09.692468 2 READ INVALID MOBICDTE:Backend:ImgChipNumberID 2022-10-06 14:58:14.696379 3 READ INVALID FOR 0.1 SECONDS OF SLEEP TIME: TCPFLOW: 127.000.000.001.55780-127.000.000.001.60000: {"id":"1", "method":"HS_ImgChipNumberID_Command", "params": [["0"]], "jsonrpc": "2.0"} 127.000.000.001.55780-127.000.000.001.60000: {"id":"1", "method":"HS_ImgChipNumberID_Command", "params": [["1", "1"]], "jsonrpc": "2.0"} 127.000.000.001.55780-127.000.000.001.60000: {"id":"1", "method":"HS_ImgChipNumberID_Command", "params": [["0"]], "jsonrpc": "2.0"} 127.000.000.001.55780-127.000.000.001.60000: {"id":"1", "method":"HS_ImgChipNumberID_Command", "params": [["1", "3"]], "jsonrpc": "2.0"} 127.000.000.001.55780-127.000.000.001.60000: {"id":"1", "method":"HS_ImgChipNumberID_Command", "params": [["0"]], "jsonrpc": "2.0"} From: Matt Newville <newville at cars.uchicago.edu>
Hi Marco,
I don't understand that behavior and would ask whether that observation is only when using tcpflow or also appears from using a camonitor. To be clear, you should not need `sleep()` there, and certainly not as long as 0.5 seconds. Yes, the IOC and Channel Access should be capable of dealing with time intervals much smaller than that.
Since "VALUE" is left to the imagination of the reader, is it obvious that this should be a new value (ie, different from the current value) for all PVs?
--Matt
Aviso Legal: Esta mensagem e seus anexos podem conter informações confidenciais e/ou de uso restrito. Observe atentamente seu conteúdo e considere eventual consulta ao remetente antes de copiá-la, divulgá-la ou distribuí-la. Se você recebeu esta mensagem por engano, por favor avise o remetente e apague-a imediatamente. Disclaimer: This email and its attachments may contain confidential and/or privileged information. Observe its content carefully and consider possible querying to the sender before copying, disclosing or distributing it. If you have received this email by mistake, please notify the sender and delete it immediately. |