[Kst] plotting data in realtime: tips and tricks?

Brisset, Nicolas Nicolas.Brisset at eurocopter.com
Fri Jun 11 08:04:16 CEST 2010


Hi Timo,

> 

Eurocopter Deutschland GmbH
Sitz der Gesellschaft/Registered Office: Donauwoerth
Registergericht/Registration Court: Amtsgericht Augsburg HRB 16508
Vorsitzender des Aufsichtsrates/Chairman of the Supervisory Board: Dr. Lutz Bertling
Geschaeftsfuehrung/Board of Management:
Dr. Wolfgang Schoder, Vorsitzender/CEO; Friedrich-Wilhelm Hormel; Ralf Barnscheidt

CONFIDENTIALITY NOTICE 

This communication and the information it contains is intended for the addressee(s) named above and for no other persons or organizations. It is confidential and may be legally privileged and protected by law. The unauthorized use, copying or disclosure of this communication or any part of it is prohibited and may be unlawful. 
If you have received this communication in error, kindly notify us by return e-mail and discard and/or delete the communication. Thank you very much. 
It is possible for e-mails to be intercepted or affected by viruses. Whilst we maintain virus checks on our e-mails, we accept no liability for viruses or other material which might be introduced with this message. 
-----Ursprüngliche Nachricht-----
> Von: Timo Juhani Lindfors [mailto:timo.lindfors at iki.fi]
> Gesendet: Freitag, 11. Juni 2010 00:43
> An: kst at kde.org
> Betreff: [Kst] plotting data in realtime: tips and tricks?
> 
> Hi,
> 
> I'd like to plot data from an AD converter in realtime (10000 16-bit
> samples per second, four channels). Using
> 
> read-data | kst -y 1 -y 2 -y 3 -y 4 stdin
> 
> works but configuring ranges for X axis seems to be tricky: I would
> like kst always show me the data that has been received during the
> last five seconds and not more.  I tried set range to "expression" and
> then used from range [P1/XMax] - 50000 and "to" range [P1/XMax].
I am not sure I understand what you are trying to do nor do I have experience with the stdin source, but I would simply check "count from end" and set the vector ranges to 50000 samples, either in the wizard (but I guess it does not work for stdin, and there does not seem to be a commandline switch for "count from end") or in the Tools -> Change Data Sample Ranges tool menu.
In the worst case, you could send the output to an ASCII file and read it with the ASCII datasource. It is probably not as good performance-wise due to the file I/O operations (unless you write on a ramdisk maybe?) but it definitely would allow showing only the last 5 seconds with scrolling curves.

Nicolas



More information about the Kst mailing list