Hello Kevin,
Unfortunately, StreamDevice does not yet support columns (or tables).
You may be able to read the whole array into a waveform then use a aSub Record
to filter out the columns, but that s a bit tricky because of , and CR LF.
Maybe I can say more tomorrow...
Dirk
On Wed, 2023-04-19 at 19:53 +0800, 若兰 via Tech-talk wrote:
> Hello everyone,
> I have a Counter which can store data to a buffer.
> (1) With command "GSDAL?", an array can be read out from the buffer, which looks like this:
>
> fig.1
>
>
> The first 8 colums are Counter data and the last coloum is Timer data. Every line end with CR+RF.
> (2) With another command “GSCRD?00000000100”, the buffer can get the following array. Every line end with CR+RF.
>
> fig.2
>
>
> Question 1. How to read the 2-d array (fig 1) into EPICS? Can I use a waveform to do it? Does anybody has an example for it?
>
> Question2. I used a waveform to read the second array (in fig.2).
> record(waveform, "$(D):Array0")
> {
> field(DTYP, "stream")
> field(INP, "@xxx.proto array_in $(PORT)")
> field(NELM, "100")
> field(FTVL, "SHORT")
> field(SCAN, "5 second")
> }
>
> in the xxx.proto:
> array_in {
> seperator=CR; #or CR LF, no different result
> out "GSCRD?00000000100";
> in "%5d";
> }
>
> and the result shows:
> xxx:Array0 200 0 0 0 0 0 .... 0
> Surely the data is not read correctly.
>
> I wonder what the problem is.
> Can I use waveform to read it?
> Is there any problem with waveform? For example, the seperator?
> If not use waveform, how can I read the array out from device buffer?
>
> Thanks very much for any advice.
>
> Best reguards
>
> Kevin
> 279762081 at qq.com
>
>
>
- Replies:
- Re: Using waveform to read array in StreamDevice Maren Purves via Tech-talk
- References:
- Using waveform to read array in StreamDevice =?gb18030?b?yPTAvA==?= via Tech-talk
- Navigate by Date:
- Prev:
Using waveform to read array in StreamDevice =?gb18030?b?yPTAvA==?= via Tech-talk
- Next:
Re: Using waveform to read array in StreamDevice 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
2021
2022
<2023>
2024
- Navigate by Thread:
- Prev:
Using waveform to read array in StreamDevice =?gb18030?b?yPTAvA==?= via Tech-talk
- Next:
Re: Using waveform to read array in StreamDevice 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
2021
2022
<2023>
2024
|