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  <20202021  2022  2023  2024  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  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Stream device with waveform records
From: "Roehrig, Christian via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Wed, 11 Nov 2020 17:45:12 +0000

Hello,

 

    I could use some help formatting an output from a waveform record that uses stream.

 

My IOC is built with:

    Base 7.0.4

    Asyn 4.40

    StreamDevice 2.8.8

    SNCSEQ 2.2.6

 

Here is the record definition.

 

record (waveform, "$(P)$(R):ScanListC")

{

   field(DESC, "Send configuration command.")

   field(DTYP, "stream")

   field(OUT,  "@daq970A.proto set_scan_route $(PORT)")

   field(NELM, "22")

   field(FTVL, "STRING")

}

 

Here is the stream protocol.

 

set_scan_route {

   separator=",";

   out "ROUT:SCAN(@%d)";

}

 

Here is the part of the SNL program that I use to put data into the waveform record.  It may put anywhere from 0 to NUM_CHANNELS (currently 22) integers into the waveform record.

 

int scan_list[NUM_CHANNELS];

assign scan_list to "{P}{R}:ScanListC.VAL";

 

ss set_scan {

 

   state construct_list {

               

      when (set_scan_list == 1) {

 

         set_scan_list = 0;

         counter = 0;

     

         for (channel = 0; channel < NUM_CHANNELS; channel++)

         {

            pvGet(channel_include_in_scan_901A[channel]);

 

            if (channel_include_in_scan_901A[channel] == 1)

            {

               scan_list[counter] = channel + 101;

               counter = counter + 1;

            }

         }

         pvPut(scan_list);

     

      } state construct_list  

   }

}

 

Here is the output on the asyn port when that part of the program runs after I have selected channels 101 and 103 on the MEDM screen and clicked the “Set Scan List” button.

 

ROUT:SCAN(@101,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)

 

What I want the output to be is:

 

ROUT:SCAN(@101,103)

 

 

Is there a way to have stream reject the zeros that are not valid data?

 

Chris

--

Christian Roehrig

Principal Controls Engineer

Accelerator Systems Division

Argonne National Laboratory

Office: 630-252-7278

Cell: 630-327-6855


Replies:
Re: Stream device with waveform records Johnson, Andrew N. via Tech-talk

Navigate by Date:
Prev: Re: Connection to PVA server fails despite server Michael Davidsaver via Tech-talk
Next: Re: Stream device with waveform records Johnson, Andrew N. 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  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: EPICS Integrator for Sweden TEL-EPC-201028 Jef Kong via Tech-talk
Next: Re: Stream device with waveform records Johnson, Andrew N. 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  <20202021  2022  2023  2024 
ANJ, 11 Nov 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·