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 mbbi format-converter problem
From: "Mooney, Tim M. via Tech-talk" <tech-talk at aps.anl.gov>
To: "Hu, Yong" <yhu at bnl.gov>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 8 Apr 2021 17:03:23 +0000
Hi Yong,

get_units { out "REMOTE; CHAN \$1; UNITS?";  in "%{cm|in|\?}"; }
worked!  Thanks for your help.

Tim Mooney (mooney at anl.gov) (630)252-5417
Beamline Controls Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab


From: Hu, Yong <yhu at bnl.gov>
Sent: Thursday, April 8, 2021 11:55 AM
To: Mooney, Tim M. <mooney at anl.gov>; tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: StreamDevice mbbi format-converter problem
 

Hi Tim,

 

Quick search “%%” on https://paulscherrerinstitute.github.io/StreamDevice/formats.html , “%%” or “\%” should have worked.

Nonetheless, give a try on this (basically use \? for enum value 2):

get_units { out "REMOTE; CHAN \$1; UNITS?";  in "%{cm|in|\?}"; }

 

Cheers,

Yong

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Reply-To: "Mooney, Tim M." <mooney at anl.gov>
Date: Thursday, April 8, 2021 at 11:52 AM
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Subject: StreamDevice mbbi format-converter problem

 

Dear folks,

 

I have an mbbi record with streamDevice support, and the following protocol:

get_units { out "REMOTE; CHAN \$1; UNITS?";  in "%{cm|in|%%}"; }

 

Here is the record definition:

record(mbbi, "$(device):UNITS")

{

    field(DESC, "Units")

    field(DTYP, "stream")

    field(INP,  "@cryomagLM510.proto get_units($(chan)) $(port)")

    field(ZRST, "cm")

    field(ONST, "in")

    field(TWST, "%")

    field(SCAN, "Passive")

}

 

When the device response is "cm" or "in" it is handled correctly, but when the response is "%" the record value doesn't change, even though the asyn trace output shows that the character received actually was "%"

 

2021/04/08 10:03:28.517 164.54.115.98:4266 write 23

REMOTE; CHAN 1; UNITS?

2021/04/08 10:03:28.617 164.54.115.98:4266 read 3

%

 

(Three characters are received because the input terminator is "interminator  = CR LF;")

 

Originally, I had the protocol wrong because I didn't realize the "%" would be treated as a format converter:

get_units { out "REMOTE; CHAN \$1; UNITS?";  in "%{cm|in|%}"; }

But then I tried changing the protocol file to this:

get_units { out "REMOTE; CHAN \$1; UNITS?";  in "%{cm|in|\%}"; }

followed by streamReload(), which didn't work, and finally to this:

get_units { out "REMOTE; CHAN \$1; UNITS?";  in "%{cm|in|%%}"; }

followed by streamReload(), which also didn't work.

 

I'm using StreamDevice-2-8-9.  I can't figure out what I'm doing wrong.

 

Tim Mooney (mooney at anl.gov) (630)252-5417
Beamline Controls Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab


References:
StreamDevice mbbi format-converter problem Mooney, Tim M. via Tech-talk
Re: StreamDevice mbbi format-converter problem Hu, Yong via Tech-talk

Navigate by Date:
Prev: Re: StreamDevice mbbi format-converter problem Hu, Yong via Tech-talk
Next: Running 8+ Keysight oscilloscopes in st.cmd Wang, Andrew 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 mbbi format-converter problem Hu, Yong via Tech-talk
Next: Running 8+ Keysight oscilloscopes in st.cmd Wang, Andrew 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, 08 Apr 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·