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  <20122013  2014  2015  2016  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  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Reading scope waveforms with StreamDevice + asyn
From: Rod Nussbaumer <[email protected]>
To: epics Techtalk <[email protected]>
Date: Thu, 12 Jan 2012 14:10:08 -0800
Hi all.

I've been trying to read waveforms from a Tektronix TDS8000 scope using R3.14.11 + StreamDevice (2.4) + asyn (4.13) + linux-gpib using a NI PCI GPIB interface on an x86 PC platform. I cannot seem to find the right message termination to satisfy all of the various components.

The scope documentation says it does not use end-of-line terminator characters, but rather sets EOI on the GPIB to signal end of messages. Nevertheless, there are LF characters appended to each message, even binary formatted waveform data. I'm trying to use RIB encoded (Intel-endian binary) waveform data, 4-byte words.

I'm hoping to read 10 waveforms per second on a periodic scan of an EPICS waveform record, (500 integer data points).

A simple bit of C code is able to read waveforms at about 80 waveforms per second in a tight loop. In there, I have used the 'ibeos()' function to cause my C code to not terminate reads on any character delimiters, and this seems to have the desired effect. In the gpib.conf file, I've include the setting:

set-reos = no

There is also the setting...

eos = ___

... which I've set to 0x0, commented out completely, and set to 0x0a, none of which seems to change anything, and which is in accordance with my expectation.

Most/some of the settings in gpib.conf seem to correspond to the capabilities of the asynSetOption() function which I've also used in the EPICS startup script. There, it does seem to make a difference. If I set...
asynSetOption("GPIB0",10,0x0c,0)
...then asynTrace shows me that it does two things:
   1. terminates its sequential reads on each binary zero byte
   2. times out at the end of the read (and sees/reads the trailing LF)

I seem to be stuck between a rock and a hard place: either I use an end-of-line terminator, which will eventually show up in the binary data and prematurely terminate the read, or if I try to use the option to not use end-of-message characters, it will wait until the read times out, which seems to have the effect of invalidating the record, and slowing things down a lot. Any hints on how to proceed, tests to make or requests for further info are welcomed.
Thanks.

Rod Nussbaumer
ISAC Controls, TRIUMF
Vancouver, Canada.


Replies:
RE: Reading scope waveforms with StreamDevice + asyn Mark Rivers
Re: Reading scope waveforms with StreamDevice + asyn Dirk Zimoch

Navigate by Date:
Prev: Re: porting strategy from IDL Abe Massry
Next: RE: Reading scope waveforms with StreamDevice + asyn Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Does areaDetector Prosilica driver support Manta-series camera ? Michael Davidsaver
Next: RE: Reading scope waveforms with StreamDevice + asyn Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·