Experimental Physics and Industrial Control System
|
Thanks mark, and Michael,
Yes it is , looks like we are having similar issues!!! we have a 'work around' but would like a clean solution , appreciate it, and will look at what you did.Michael.
I have been looking though the trace files, which is how we are seeing the different size messages arriving. as well as looking at what Michael has done, it would be good to get any hints on how to ensure I get the whole message and only a single message arriving over streams.
And yes, we are through a portserver, which could be the issue as you indicate. I will try direct
Steve
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
- References:
- Streams question Steven Hunt via Tech-talk
- Re: Streams question Michael Davidsaver via Tech-talk
- Navigate by Date:
- Prev:
Re: Streams question Michael Davidsaver via Tech-talk
- Next:
Cross compiling for arm Dudley, David 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 Michael Davidsaver via Tech-talk
- Next:
Cross compiling for arm Dudley, David 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
·
|