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  2021  2022  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  2021  2022  2023  2024  2025  <2026
<== Date ==> <== Thread ==>

Subject: Re: Streams question
From: Michael Davidsaver via Tech-talk <tech-talk at aps.anl.gov>
To: Steven Hunt <Hunt at lbl.gov>
Cc: tech-talk <tech-talk at aps.anl.gov>
Date: Fri, 20 Mar 2026 11:10:10 -0700
Hi Steve,

On 3/20/26 9:59 AM, Steven Hunt via Tech-talk wrote:
Hi we have a device that reads the following data over RS232

"000001 0000F9 0000 0000 0000 0000 0F 00 00<0d><0a>"

The data comes quite slowly, every 4 seconds (@ 9600 baud if I remember correctly)  via a port server , we were using the following proto file (simplified version)

Would this happen to be a Health Physics Instruments (HPI) device?

Circa 2013 I integrated an HPI 6016, which send out a similarly structured line at 1Hz.

Due to the circumstances of that moment, there was a focus on making this IOC "robust".  To the point that the repository below includes a simulator with fault injection.  I started out with asyn+stream as you have, but just could not make it handle weirdness properly.  So I ended up doing a custom driver.

https ://github.com/mdavidsaver/hpi6016



ReadTimeout = 1000;
Terminator = CR LF;

dose_rate {in "%x %*x %*x %*x %*x %*x %*x %*x %*x";}


This has been working well, but occasionally we get last character is missing.

StreamIoSuccess input="000001 00005A 0000 0000 0000 0000 0F 00 00<0d>", size=43)

Then catch it in the next buffer
.  
StreamIoSuccess input="<0a>000001 00005A 0000 0000 0000 0000 0F 00 00<0d><0a>", size=45)
 
We have tried many combinations of the proto file, changing timeout, ignore extra input etc, putting everything into a long char buffer ,,,,,   

Can anyone advise on the best protocol file entry to capture this type of data cleanly?

Steve





Replies:
Re: Streams question Steven Hunt via Tech-talk
References:
Streams question Steven Hunt via Tech-talk

Navigate by Date:
Prev: Re: Streams question Mark Rivers via Tech-talk
Next: Re: Streams question Steven Hunt 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  2021  2022  2023  2024  2025  <2026
Navigate by Thread:
Prev: Re: Streams question Mark Rivers via Tech-talk
Next: Re: Streams question Steven Hunt 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  2021  2022  2023  2024  2025  <2026
ANJ, 20 Mar 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·