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
|