octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58252] [octave forge] (instrument-control) us


From: Walter Sjursen
Subject: [Octave-bug-tracker] [bug #58252] [octave forge] (instrument-control) ustmc_read() does not read all the waveform data from oscilloscope
Date: Fri, 1 May 2020 10:22:40 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0

Follow-up Comment #15, bug #58252 (project octave):

[1] In the code base for Linux, I found USBTMC_TIMEOUT is set to 5000ms
(default). This is plenty of time for the scope to return its data.
[2] I ran a script from the Linux command line to talk directly with the scope
as a character device "/dev/usbtmc0". The data was returned lightning fast (so
fast, I did not realize at first that it did anything). Here is the script:

echo "*IDN?" > /dev/usbtmc0
head -n 1 /dev/usbtmc0 > scope.id
echo ":WAVEFORM:FORMAT ASCII" > /dev/usbtmc0
echo ":WAVEFORM:POINTS:MODE RAW" > /dev/usbtmc0
echo ":WAVEFORM:PREAMBLE?" > /dev/usbtmc0
head -n 1 /dev/usbtmc0 > scope.preamble
echo ":WAVEFORM:DATA?" > /dev/usbtmc0
head -n 1 /dev/usbtmc0 > scope.data

It only took one read (last head command) to retrieve all the waveform data
from the scope. The script sends all its output to files:

-rw-rw-r-- 1 waltersjursen waltersjursen 875010 Apr 30 19:35 scope.data
-rw-rw-r-- 1 waltersjursen waltersjursen     62 Apr 30 19:35 scope.id
-rw-rw-r-- 1 waltersjursen waltersjursen      5 Apr 30 20:52 scope.points
-rw-rw-r-- 1 waltersjursen waltersjursen     85 Apr 30 19:35 scope.preamble




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58252>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]