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  2020  <20212022  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  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: StreamDevice protocol file question
From: "Zimoch Dirk \(PSI\) via Tech-talk" <tech-talk at aps.anl.gov>
To: "Wang, Andrew" <wang126 at llnl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Date: Sat, 31 Jul 2021 08:48:21 +0000
Yes, it will.

Dirk

Am 31.07.2021 um 10:10 schrieb Wang, Andrew <wang126 at llnl.gov>:


Thanks Zinoch,

I do have extra input set to ignore. Will using in “” still clear the buffer? 

From: Zimoch Dirk (PSI) <dirk.zimoch at psi.ch>
Sent: Saturday, July 31, 2021 1:07:22 AM
To: Wang, Andrew <wang126 at llnl.gov>
Cc: EPICS tech-talk <tech-talk at aps.anl.gov>
Subject: Re: StreamDevice protocol file question
 
Use in „OK“. Then the record is in no alarm state when the device responds OK and in INVALID alarm state when the device responds BAD.

You can redirect the response to another record if you like. To a bi for example:
in „%(otherrecord){OK|BAD}“
In that other record you may want to set an alarm on the one state.

You should get an error with in „“ except if you have extrainput=ignore.

Dirk

Am 30.07.2021 um 16:22 schrieb Wang, Andrew via Tech-talk <tech-talk at aps.anl.gov>:


All,

Quick question about the protocol file in StreamDevice. Suppose I have an instrument where after I send a command to change one of its attributes, it responds back with a status of either  OK or BAD. Furthermore, I have an analog output record, whose value is used by a protocol file. 

If I want to properly flush the status response, what is the preferred method of doing so, especially since the status response is a string, not a scaler value.

What I’m currently doing in the protocol is this:

setProp
{
       out “set %f”;
       in “”;
}

What is weird is that I am not getting a mismatch error, and it does seem like I am properly flushing the input with that method.

After looking at other code, Is it better to do this?

setProp
{
       out “set %f”;
       in “%*s”; # or this “%*f”;
}

Thanks!
Andy

References:
StreamDevice protocol file question Wang, Andrew via Tech-talk
Re: StreamDevice protocol file question Zimoch Dirk (PSI) via Tech-talk
Re: StreamDevice protocol file question Wang, Andrew via Tech-talk

Navigate by Date:
Prev: Re: Stream device: Reading values from two almost identical input strings using I/O intr Zimoch Dirk (PSI) via Tech-talk
Next: Re: ADVimba image acquisition issues 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  <20212022  2023  2024 
Navigate by Thread:
Prev: Re: StreamDevice protocol file question Wang, Andrew via Tech-talk
Next: Asyn Module Francisco Ramos 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  <20212022  2023  2024 
ANJ, 31 Jul 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·