[Kst] serial connection for data streaming
Barth Netterfield
netterfield at astro.utoronto.ca
Fri Mar 30 18:58:31 CEST 2007
Hi Alper,
This is the sort of case we use kst for, but we tend to architecture it
differently: We always store our data to a file, and then read it with kst.
Kst monitors files to see if they are growing, and then updates (in real time)
if they are. This has a few advantages:
-you can go back to old data.
-the data logger can be separate from the data viewer.
For our cases (about 1Mbps) there is little to no speed penalty in doing this
assuming you use an appropriate data format - the data are still in cache
when kst wants to read them, so there is no re-reading of data.
So, for your case, if I understand it well, I would try the following:
1) write a simple program which reads the serial port and dumps to a file
(ASCII should be fine given your 200 Hz data rates).
2) Tell kst to read this data file and create a histogram of whatever column
of data you want.
If you want kst to restart, on new runs, etc, you could do this with DCOP
commands coming from your data logging program.
The other option you have (which I do not recommend) is to write a data source
which can read your serial port... Much harder, and in the end, less
flexable.
Let me know if you have more questions on how to do all this.
cbn
On Friday 30 March 2007 9:46:13 am Alper Yilmaz wrote:
> Dear Kst authors or users,
> I would like to inquire information about using Kst in a specific
> situation.
> Let me describe the setup first. The machine we want to collect data
> from is called fraction collector. This machine runs 15 mililiters of
> sample thru thin tubing and distributes to smaller fractions. During
> distribution optical reader determines optical density in the thin
> tubing continuously. Machine's optical reader sends data to plotter
> which plots a histogram on paper roll.
> Our aim is to direct optical density readings to computer so that the
> plot is generated digitally. Optical reader has a serial port to send
> data out. We are looking for a software to plot the data output and we
> came across Kst. We were wondering if Kst can plot a histogram for us
> according to conditions below.
>
> - Streaming data is sent every 5 miliseconds and fractionation takes 5
> minutes.
> - There's no saved data, in other words there's no text file. Data need
> to be collected, processed and plotted in real-time.
> - Data is not a single column of numbers, it contains optical density
> and fraction number information.
>
> thanks,
> --
>
> Alper Yilmaz
> Graduate Research Associate
> The Ohio State Univ.
> Columbus, OH
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst
More information about the Kst
mailing list