Using KST for graphing

In the last year of my physics degree I did some work for the physics department developing a sun tracking sensor for a balloon based telescope. I got to use a great piece of free and open source graphing software called KST. Its a program designed specificely for plotting large amounts of scientific data. From the KST website:

"Kst is the fastest real-time large-dataset viewing and plotting tool available and has basic data analysis functionality. Kst contains many powerful built-in features and is expandable with plugins and extensions. Extensive help is available, both from within kst and on the web. Kst is a KDE application and is freely available for anyone to download and use."

Its a great program to use to plot energy monitor data. Here's an example of data being plotted from the non-invaive current trasformer method:

How to install on Ubuntu

In a terminal window type: $ sudo apt-get install kst

On windows

If your a windows user kst can be downloaded here: http://kst.kde.org/download.html

How to start graphing

  1. First you will need ArduinoComm which is detailed here.
  2. Run the program with $ java Program >tmp.dat. The addition of >tmp.dat at the end of the run command line writes the data outputed by the java program to a file for storage.
  3. Run KST by typing $ kst
  4. Once KST is open click the magic wand button: the data wizard.
  5. Find your tmp.dat file and click next
  6. Move all available data Fields to the selected data field box by clicking the right arrow.
  7. Click on the 'Next' button.. and again...and then 'Finish'
  8. You should now see several graphs are in the above picture and they should be updating in real time!
  9. To get KST to calculate and display usfull stats like Standard Deviation, Mean etc click on text label then select from the 'insert scalar in label' drop down box

Update Aug 2013:

 

 

Getting up and running with KST in with Ubuntu 13.04

Install KST through Ubuntu Software Centre or in terminal by running the following. I used KST V2.0.3

$ sudo apt-get install kst

Install Java JDK, this was already installed for me, not sure if it's installed as standard. 

$ sudo apt-get install openjdk-7-jdk

Download arduinocomm from http://openenergymonitor.org/emon/arduinocomm
Extract and open window in terminal and compile wit

$ javac *.java

Download RXTX Linux binary from: (I used 2.1-7r2)
http://rxtx.qbang.org/wiki/index.php/Download

copy librxtxParallel.so, librxtxSerial.so to and RXTXcomm.jar to java folder. Mine was

/usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext#

$ sudo cp librxtxParallel.so /usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext
$ sudo cp librxtxSerial.so /usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext
$ sudo cp RXTXcomm.jar /usr/lib/jvm/java-7-openjdk-i386/jre/lib/ext

Edit Program.java in a text editor to set the serial port and baude (e.g. myArduino.start("/dev/ttyUSB0",9600);) that you wish to read from 

To run Arduinocomm type:

$ sudo java Program

You should now see serial data coming into the terminal window.  To log to tmp.dat file ready to open in KST  run:

$ sudo java Program >tmp.dat

Vigneshwar Raj's picture

Re: Graphing in KST

Whether it will work from RS232 serial port...

TrystanLea's picture

Re: Graphing in KST

 May do not sure...