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  <20232024  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  <20232024 
<== Date ==> <== Thread ==>

Subject: Using waveform to read array in StreamDevice
From: =?gb18030?b?yPTAvA==?= via Tech-talk <tech-talk at aps.anl.gov>
To: "=?gb18030?b?dGVjaC10YWxr?=" <tech-talk at aps.anl.gov>
Date: Wed, 19 Apr 2023 19:53:44 +0800
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 Zimoch Dirk via Tech-talk
Re: Using waveform to read array in StreamDevice Zimoch Dirk via Tech-talk

Navigate by Date:
Prev: Re: Is the Sequencer and SNL still widely used? Zhang Yuliang via Tech-talk
Next: Re: Using waveform to read array in StreamDevice Zimoch Dirk 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  <20232024 
Navigate by Thread:
Prev: Motion Controls Engineer position at ALS in LBNL Miroslaw Dach via Tech-talk
Next: Re: Using waveform to read array in StreamDevice Zimoch Dirk 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  <20232024 
ANJ, 20 Apr 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·