[Top][All Lists]

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

Re: Streaming Serial Octave

From: Stefan Mahr
Subject: Re: Streaming Serial Octave
Date: Sat, 02 Aug 2014 11:09:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

However, initial benchmarking against PySerial streaming at 500*15
bytes/second (with 115200 baudrate) shows some gaps in the Octave stream. I
can detect this because one of the bytes is a counter (0-199).

I am not finished with the evaluation yet and I may be able to eliminate the
I write to a log file after each read that I may be able to eliminate.
Python has a bytes in waiting function which I use in the serial read
statement; for Octave I am using a fixed 15-byte read. Do you know of any
way to get something like bytes_to_read = serial.inWaiting() with Octave?
(I can try to make  a short side-by-side Python/Octave streaming script
comparison if it would be useful.)

Instrument control doesn't support asynchronous mode yet, so it's not possible to get the size of input buffer.

srl_read (s0, N) reads N bytes from operating systems input buffer. This must happen fast enough to ensure the input buffer doesn't overflow. In your case I suggest to use N > 250*15.

Second question: has anyone interfaced Instrument-Control or Octave with the
nidaqmx API ? (analogous to PyDAQmx)That is another data source of interest
to capture into Octave for some real time physical control applications.

No, the National Instruments API cannot be linked to octave, since it's not released under a GPL compatible license. If you don't distribute your work you are free to link directly to the API or write a simple wrapper.

An alternative is to use linux with comedi library [1]. Unfortunately it doesn't support my NI DAC, so I have no experience with this library.



reply via email to

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