Experimental Physics and Industrial Control System
|
Hi Mark,
As a follow up question, how is the read timeout set? Is this separate from the read timeout that is specified on the protocol file listed under System variables.
Thanks,
Andy
From: Wang, Andrew <wang126 at llnl.gov>
Sent: Monday, December 12, 2022 2:11 PM
To: Mark Rivers <rivers at cars.uchicago.edu>; EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: Re: Ways to know if instrument connected via TCP/IP through StreamDevice has lost connection
This is extremely helpful. I will let you know if I have follow up questions.
> I feel like there is a better way than me trying to use a calcout record and check if any record has its STAT
field set to COMM. Like, is it possible to monitor for connection status without needing to process a record whose device type is StreamDevice and check its STAT field?
Yes, there is a better way.
First, you probably want to use this line in your startup script:
asynSetOption("$(PORT)",0, "disconnectOnReadTimeout", "Y")
That will cause the port to disconnect if there is a timeout. If you don't do that then the asyn won't know that
the port is disconnected for a very long time on Linux, it will just keep giving "temporarily unavailable" messages.
In your startup script load an asyn record that is connected to that asyn port. Here is an example:
dbLoadRecords("$(ASYN)/db/asynRecord.db", "P=IOC:, R=asyn1, PORT=ARIES1, ADDR=0, OMAX=256, IMAX=256")
You can monitor the IOC:asyn1.CNCT field, which will either be "Connect" or "Disconnect".
Basically, I was wondering if there is a better way to know if communication to an instrument has been lost. I understand that this can be done either by simplying looking at the
IOC shell for disconnection errors or checking if the STAT field is set to COMM.
I was wondering if there is another method of determining if the instrument is still connected or not besides the two methods described above. Additionally, I would like
to have a record called "is_instrument_connected", that holds a value like 1 to indicate the instrument is connected and a 0 if it is not. I feel like there is a better way than me trying to use a calcout record and check if any record has its STAT field set
to COMM. Like, is it possible to monitor for connection status without needing to process a record whose device type is StreamDevice and check its STAT field?
|
- Replies:
- RE: Ways to know if instrument connected via TCP/IP through StreamDevice has lost connection Mark Rivers via Tech-talk
- Navigate by Date:
- Prev:
RE: base R7.0.3.1-1.0 db field DOL="" different behavior then in R3.14.12 Luchini, Kristi L. via Tech-talk
- Next:
Thorlab and Standa Motion stages Ernesto Paiser 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
2020
2021
2022
<2023>
2024
- Navigate by Thread:
- Prev:
RE: base R7.0.3.1-1.0 db field DOL="" different behavior then in R3.14.12 Luchini, Kristi L. via Tech-talk
- Next:
RE: Ways to know if instrument connected via TCP/IP through StreamDevice has lost connection 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
2020
2021
2022
<2023>
2024
|
ANJ, 06 Mar 2023 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|