analogdevicesinc / iio-oscilloscope

A GTK+ based oscilloscope application for interfacing with various IIO devices
https://wiki.analog.com/resources/tools-software/linux-software/iio_oscilloscope
GNU General Public License v2.0
253 stars 142 forks source link

Plot limited to sampling frequency #489

Open javiercarrascocruz opened 5 months ago

javiercarrascocruz commented 5 months ago

Hi, I am connected to a remote target over the network and I am able to read properties and single values from an IIO device (hts221), which provides a triggered buffer, and its maximum sampling frequency is 13 samples/second.

The plot view only lets me capture up to 13 samples in both single shot and continuous measurement. If I try to read more samples than the sampling frequency (e.g. 14, any value greater than 13), the application freezes and I see on the target that iiod throws a timeout:

iiod[541]: WARNING: High-speed mode not enabled iiod[541]: ERROR: Reading from device failed: -110

Is the plot view limited to the samples than can be taken in one second?

When at it, is there any way to get processed samples (offset and scale applied) in the plot view like it is already done in the DMM mode? Thanks.

dNechita commented 3 months ago

Hi, The plot view is not expected to enforce such a limit. Error 110 means that connections has timed out. What iio-osciloscope has, is an internal hardcoded timeout. One way to go forward would be to modify this internal value which can be done via the .ini file. Also make sure you have the latest iio-oscillscope (the latest from main branch and not the latest release). For example, to force the internal timeout value to 5 seconds, you can modify the .ini file (that gets saved once the iio-osc closes and gets loaded when the iio-osc opens up) like this: "capture_timeout=5000"

Regarding applying offset and scale, yes, the plot allows adding some simple math operations for each channel. Just right click on a channel and select the 'math' option. Then you will be able to provide an offset to be added to the signal and a gain value to be multiplied to the signal.

I apologize for the late reply.