Results 1 to 5 of 5
  1. #1
    spratana is offline Member
    Join Date
    Apr 2008
    Posts
    4
    Rep Power
    0

    Default Plot 2D graph in Java from RS-232 data

    I need to plot ECG graph, real-time from tx-port of RS-232 hardware, so it is only receiving the data.

    So I need :
    1) Serial com part for Java
    2) I need 2D plotting algorithm, esp. the x- and y- axis ratio and scale, and x-axis need to be time dependent.

    Can anyone help me solve this problem?

    I found something for the use of rxtx.dll and RXTXcomm.jar
    The said this 2 files could be included in ..jre/bin and ..jre/lib/ext respectively, but I d/l the complete program that is already compiled not a source file. So I think there should be some original code or structure for this which I am not sure where I could get start with all this combination of code for Java Comm.

    Please help cos I need to plot this graph via TCP/IP on web, so I need the graph to be set of applet i could include in the website-based and plotting almost real-time with some certain delay or reading from RS-232 and write to file and read back and plot afterwards.

  2. #2
    Java Tip's Avatar
    Java Tip is offline Moderator
    Join Date
    Nov 2007
    Posts
    1,694
    Blog Entries
    430
    Rep Power
    9

    Default

    For both of the purposes, you can use existing apis. Java has an api (first link on google search) for serial port access. But it looks like windows support of it is dropped. It was a pain to install it but i remember, at the end i had found a working tutorial on it. Sorry but i dont have its link. It was long time ago.

    For plot, search "java chart library" on google, there are several libraries and you might find your chart already supported by one of them. If not you can develop your own chart by extending them.

    And for your purpose, to show the chart on an applet, i recommend you to write the data to be drawn to the file. The applet can have a thread which frequently checks the file for updates and present the new chart when data is update.

    Good luck.

  3. #3
    spratana is offline Member
    Join Date
    Apr 2008
    Posts
    4
    Rep Power
    0

    Default Plot 2D from RS-232

    Well, those recommends is a junk program I found in internet they need someone to pay for download the stuff for graph, but not what I really want for my implementation.

    Right now I have trouble with compilation of the Applet..
    How to add main argument to complie the applet

    if

    I have

    my class extends JApplet {
    ...}

    public static void main[](...)
    { //should I do
    JApplet.SetLookandFeel...???

    }
    Thanks, I'm not an expert in this field.

    but my applet and JFrame is not working and it compile perfectly from the example I had but I can't see the result.

    Pratana S.

  4. #4
    Java Tip's Avatar
    Java Tip is offline Moderator
    Join Date
    Nov 2007
    Posts
    1,694
    Blog Entries
    430
    Rep Power
    9

    Default

    There is no main methods for applets. I recommend you to read the basics first.

  5. #5
    bharath333 is offline Member
    Join Date
    Feb 2009
    Posts
    5
    Rep Power
    0

    Default

    Hi spartana,

    I saw your post regarding the Plot 2D graph in Java from RS-232 data and I have a few queries.

    Actually I am involved in a similar kind of project and
    If its possible can u help me out.

    How many lead ECG sensor did u use? 3 or 12 lead?
    Did you use any database for storing the values of the ECG signals.

    I request u to kindly share ur experiences as I would be of great help for me.

    Thanking you

Similar Threads

  1. Java chart & graph lib
    By saturdaybugs in forum Java 2D
    Replies: 1
    Last Post: 04-24-2008, 01:59 PM
  2. Need Help for Dot Plot Graph
    By BHCluster in forum Java 2D
    Replies: 5
    Last Post: 04-15-2008, 02:54 PM
  3. Replies: 1
    Last Post: 03-21-2008, 03:14 PM
  4. Help Creating A Graph From Inputted Data
    By adlb1300 in forum New To Java
    Replies: 6
    Last Post: 10-28-2007, 04:45 AM
  5. How to insert graph in java
    By valery in forum Advanced Java
    Replies: 1
    Last Post: 08-06-2007, 08:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •