Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-12-2008, 06:44 PM
Member
 
Join Date: Apr 2008
Posts: 5
spratana is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-12-2008, 09:58 PM
Moderator
 
Join Date: Nov 2007
Posts: 1,102
Java Tip will become famous soon enoughJava Tip will become famous soon enough
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.
__________________
Want to make your IDE the best? Vote Now
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-14-2008, 05:08 PM
Member
 
Join Date: Apr 2008
Posts: 5
spratana is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 04-14-2008, 05:11 PM
Moderator
 
Join Date: Nov 2007
Posts: 1,102
Java Tip will become famous soon enoughJava Tip will become famous soon enough
There is no main methods for applets. I recommend you to read the basics first.
__________________
Want to make your IDE the best? Vote Now
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java chart & graph lib saturdaybugs Java 2D 1 04-24-2008 02:59 PM
Need Help for Dot Plot Graph BHCluster Java 2D 5 04-15-2008 03:54 PM
Help with a Graph Data Structure and the Shortest Path rhm54 New To Java 1 03-21-2008 04:14 PM
Help Creating A Graph From Inputted Data adlb1300 New To Java 6 10-28-2007 05:45 AM
How to insert graph in java valery Advanced Java 1 08-06-2007 09:38 PM


All times are GMT +3. The time now is 10:39 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org