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 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
<== Date ==> <== Thread ==>

Subject: RE: Streamdevice: wild card in InTerminator?
From: Mark Rivers <rivers@cars.uchicago.edu>
To: Eric Norum <eric@norum.ca>, "Brown, Garth" <gwbrown@slac.stanford.edu>
Cc: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Thu, 16 Mar 2017 03:07:52 +0000
> How about just setting the input terminator to “>” ?

That might not work if that character is ever a part of a normal response.

However, another approach is not to define the terminators in the protocol file at all.  Rather, define \r\n as the terminator for asyn in your startup script.

StreamDevice will then get all characters up to \r\n.  The 53210A> should be discarded by the "flush" operation at the start of the next transaction, which is normally flush/write/read.

Mark


________________________________
From: tech-talk-bounces@aps.anl.gov [tech-talk-bounces@aps.anl.gov] on behalf of Eric Norum [eric@norum.ca]
Sent: Wednesday, March 15, 2017 10:02 PM
To: Brown, Garth
Cc: tech-talk@aps.anl.gov
Subject: Re: Streamdevice: wild card in InTerminator?

How about just setting the input terminator to “>” ?

On Mar 15, 2017, at 4:37 PM, Brown, Garth <gwbrown@slac.stanford.edu<mailto:gwbrown@slac.stanford.edu>> wrote:

We have a 53210A frequency counter that adds "\r\n53210A> " at the end of its responses. So we specified that as the InTerminator. That worked fine until we got a 53220A. We'd like to use both of them with as little redundant code as possible. The only difference in the protocol is that 1 vs. 2 in the response. Is there a way to accommodate that small difference?
Selected lines from the protocol file:

--
Eric Norum
eric@norum.ca<mailto:eric@norum.ca>






References:
Streamdevice: wild card in InTerminator? Brown, Garth
Re: Streamdevice: wild card in InTerminator? Eric Norum

Navigate by Date:
Prev: Re: Streamdevice: wild card in InTerminator? Eric Norum
Next: Asyn 4-30 Problem on Arm processor Jörn Dreyer
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
Navigate by Thread:
Prev: Re: Streamdevice: wild card in InTerminator? Eric Norum
Next: Re: Streamdevice: wild card in InTerminator? Pearson, Matthew R.
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
ANJ, 16 Mar 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·