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: StreamDevice mbbi format-converter problem
From: "Mooney, Tim M. via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Thu, 8 Apr 2021 15:52:32 +0000
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


Replies:
Re: StreamDevice mbbi format-converter problem Hu, Yong via Tech-talk

Navigate by Date:
Prev: Re: Handling Ethernet-to-Serial Connection when vendor SDK expects tty device Mark Rivers via Tech-talk
Next: Re: Handling Ethernet-to-Serial Connection when vendor SDK expects tty device Maren Purves 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: MDEL Field Alfio Rizzo via Tech-talk
Next: Re: StreamDevice mbbi format-converter problem Hu, Yong 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 ·