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

Subject: Re: StreamDevice mbbi format-converter problem
From: "Mooney, Tim M. via Tech-talk" <[email protected]>
To: "Hu, Yong" <[email protected]>, "[email protected]" <[email protected]>
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 ([email protected]) (630)252-5417
Beamline Controls Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab


From: Hu, Yong <[email protected]>
Sent: Thursday, April 8, 2021 11:55 AM
To: Mooney, Tim M. <[email protected]>; [email protected] <[email protected]>
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 <[email protected]> on behalf of "[email protected]" <[email protected]>
Reply-To: "Mooney, Tim M." <[email protected]>
Date: Thursday, April 8, 2021 at 11:52 AM
To: "[email protected]" <[email protected]>
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 ([email protected]) (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  2025  2026 
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  2025  2026 
ANJ, 19 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·