Results 1 to 5 of 5
- 04-12-2008, 05:44 PM #1
Member
- Join Date
- Apr 2008
- Posts
- 4
- Rep Power
- 0
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.
-
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."The sole cause of man’s unhappiness is that he does not know how to stay quietly in his room." - Blaise Pascal
- 04-14-2008, 04:08 PM #3
Member
- Join Date
- Apr 2008
- Posts
- 4
- Rep Power
- 0
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.
-
There is no main methods for applets. I recommend you to read the basics first.
"The sole cause of man’s unhappiness is that he does not know how to stay quietly in his room." - Blaise Pascal
- 02-11-2009, 06:49 PM #5
Member
- Join Date
- Feb 2009
- Posts
- 5
- Rep Power
- 0
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
-
Java chart & graph lib
By saturdaybugs in forum Java 2DReplies: 1Last Post: 04-24-2008, 01:59 PM -
Need Help for Dot Plot Graph
By BHCluster in forum Java 2DReplies: 5Last Post: 04-15-2008, 02:54 PM -
Help with a Graph Data Structure and the Shortest Path
By rhm54 in forum New To JavaReplies: 1Last Post: 03-21-2008, 03:14 PM -
Help Creating A Graph From Inputted Data
By adlb1300 in forum New To JavaReplies: 6Last Post: 10-28-2007, 04:45 AM -
How to insert graph in java
By valery in forum Advanced JavaReplies: 1Last Post: 08-06-2007, 08:38 PM


LinkBack URL
About LinkBacks

Bookmarks