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  <20152016  2017  2018  2019  2020  2021  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  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: StreamDevice reading waveforms
From: Anthony Pietryla <[email protected]>
To: <[email protected]>
Date: Thu, 9 Apr 2015 16:01:12 -0500
I have a device which uses SCPI protocol and returns sets of waveforms in columns where I can request how many rows to return. For instance I can query the device for 3 values of position data and it will return 2 columns (X & Y) and 3 rows. I want to read the columns into separate waveform records. I am having problems with the protocol file for which I need help.

The database records and the protocol file are listed below. When I process the record only the first values (first row of data) are written to each record. With asyn debugging turned on the console shows all three sets of data:

epics> 2015/04/09 13:52:36.877 L0 wrote
TBT_XY 3

2015/04/09 13:52:36.878 L0 read
  2000   6000
  7143   4286
  4286   1429

caget shows only the first value stored:

caget -# 5 B:Spark:TBT_Horizontal
B:Spark:TBT_Horizontal 5 3333 0 0 0 0

caget -# 5 B:Spark:TBT_Vertical
B:Spark:TBT_Vertical 5 -1111 -3333 0 0 0

*******************
The protocol file has:

getTBT_XY {
   Separator = "\n";
   out "TBT_XY 3";
   in   " %(\$1TBT_Horizontal)d %(\$1TBT_Vertical)d";
   ExtraInput = Ignore;
}

**************
The database records are:

record(waveform, "$(P)$(R)TBT_Horizontal")
{
   field(DESC, "TBT Horizontal")
   field(DTYP, "stream")
   field(INP,  "@spark.proto getTBT_XY($(P)$(R)) $(PORT)")
   field(NELM, "262144")
   field(EGU,  "um")
   field(FTVL, "LONG")
}

record(waveform, "$(P)$(R)TBT_Vertical")
{
   field(DESC, "TBT Vertical")
   field(DTYP, "Soft Channel")
   field(NELM, "262144")
   field(EGU,  "um")
   field(FTVL, "LONG")
}

********************
When I comment out the “ExtraInput = Ignore;” line in the protocol file I get error messages:

2015/04/09 15:53:58.170 L0 wrote
TBT_XY 3

2015/04/09 15:53:58.170 L0 asynOctetBase interrupt
2015/04/09 15:53:58.171 L0 read
  3333  -1111
 -3333  -5556
 -2000      0

2015/04/09 15:53:58.271 L0 B:Spark:TBT_Horizontal: 29 bytes surplus input "<0a> -3333  -5556<0a> -200..."
2015/04/09 15:53:58.271 L0 B:Spark:TBT_Horizontal: after 13 bytes: "  3333  -1111"

caget -# 5 B:Spark:TBT_Horizontal
B:Spark:TBT_Horizontal 5 3333 0 0 0 0

caget -# 5 B:Spark:TBT_Vertical
B:Spark:TBT_Vertical 5 -1111 -3333 0 0 0


--
Anthony Pietryla
Principal Controls Engineer
Advanced Photon Source
Argonne National Laboratory

Phone: 630-252-7430
Fax: 630-252-6123


Replies:
Re: StreamDevice reading waveforms Davide Marcato
Re: StreamDevice reading waveforms Dirk Zimoch

Navigate by Date:
Prev: ARCUS Ethernet Motors Eric Norum
Next: Acromag IP230 / IP230A 16-bit DAC EPICS Driver? Stubbs, Scott A.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: ARCUS Ethernet Motors Robert Wheat
Next: Re: StreamDevice reading waveforms Davide Marcato
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·