Re: Help needed

Adrian Scripcă <[email protected]>
Newsgroups gmane.linux.hardware.gpib.general
Message-ID <CAC9ou4XY7Uvr7ggU0L5vUHBizuhh5rMd07iX2Sh9qX36XoHG4A@mail.gmail.com>
Hi all,

I would like to thank Dave P. and Paul G. for their suggestions. I think we
all agree that all in all it is easier to read the data and plot it with
gnuplot or something else but I wanted to have the second option suggested
by Dave for the sake of completeness. Following Dave's suggestion I did the
following:

   - looked around through examples folder in linux-gpib-user-4.3.0 and
   found slave_read_to_file.c
   - configured the 70206A to plot on a listen only plotter
   - used the slave_read_to_file binary to capture the output to a file
   - issued plot command on the device

While that seemed to have worked and I managed to get valid PLT content,
this approach has some problems which I hope you can help me with:

   1. I cannot seem to reliably start the listener in order to capture the
   plotting content. I only managed once and I'm not sure as to what I did to
   make it work. Currently I start the same program (slave_read_to_file) and
   issue a PLOT command on the SA but nothing happens; the slave does not
   capture anything and the device remains in a blocked state.
   2. The slave_read_to_file uses ibrdf(). I looked into the source code
   and it seems that ibrdf() uses a buffer of 0x4000 bytes. This causes
   content to only be written to the file in 16KB chunks, so I get incomplete
   PLT content in the file whenever the plot size is not aligned to a 16KB
   boundary. One idea would be to be able to read one byte at a time and track
   the output and stop whenever the plot finishes.

How would you suggest I tackle these problems? I am a programmer by trade
so I'm not afraid to get my hands dirty with code. I'm mostly interested in
solving the 1st problem. Is there a way I can debug things? What is the
expected sequence of events in this particular setup?

Thank you very much,
Adrian

On Thu, Dec 19, 2019 at 7:27 PM dave penkler <[email protected]> wrote:

> Generally it is easier to read the data and then use something like
> gnuplot to plot it. It is possible to plot to the card by sending the
> appropriate low level set talker and listener commands and then initiating
> the plot from the instrument while reading the plot output
> programmatically.
> cheers,
> -Dave
>
>
> On Thu, 19 Dec 2019, 18:01 Adrian Scripcă, <[email protected]> wrote:
>
>> Hello all,
>>
>> I am just getting started with linux-gpib and gpib in general and I would
>> require some guidance from more knowledgeable members.
>>
>> Context: I have some HP equipment (HP8656B and a 70000 series SA) which I
>> am trying to communicate with and an Agilent 82357B adapter bought from
>> eBay (most likely a clone but should do).
>>
>> I run a Ubuntu 19.10 distribution with 5.3.0-24-generic kernel so I
>> installed linux-gpib-4.3.0 first. Installation went painlessly. I finally
>> managed to connect to the equipment and issue commands, modifying and
>> querying the state.
>>
>> The next step however is to see whether I can obtain plot data from the
>> spectrum analyzer. So here goes my question: is there a way in which I can
>> emulate a listener with a given address on the GPIB bus and read data while
>> also being connected to the SA and issue commands to it?
>>
>> Sorry if my questions sound confusing but as I mentioned before this is
>> my first interaction with linux-gpib and gpib in general.
>>
>> Thank you,
>> Adrian
>>
>>
>>
>> _______________________________________________
>> Linux-gpib-general mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/linux-gpib-general
>>
>

_______________________________________________
Linux-gpib-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-gpib-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.