i currently need to receive data from usb serial port for the data reading of my voltage lvl in volts, so far i hav managed to establish the link with my computer , my problem is how to save the input data and how do i plot a graph with the input with y-axis the voltage and x - axis the time , i heard of zedgraph , but i have no idea how to assign array to plot with it. any1 ? or any other advice ? i need some sample code , i seen dynamic real time example from zedgraph , but i dont know how to modify it. please very much help is appreciated here. |
| rawdy Sunday, November 18, 2007 4:35 PM |
| rawdy wrote: |
|
i currently need to receive data from usb serial port for the data reading of my voltage lvl in volts, so far i hav managed to establish the link with my computer , my problem is how to save the input data and how do i plot a graph with the input with y-axis the voltage and x - axis the time , i heard of zedgraph , but i have no idea how to assign array to plot with it. any1 ? or any other advice ? i need some sample code , i seen dynamic real time example from zedgraph , but i dont know how to modify it. please very much help is appreciated here. | |
Go to Nplot.com: Scientific Charting Library for .NET/C# etc. Download it. You will have a bunch of sample graphs with input arrays in the source code or separate XML files. Just modify what you need. It is an excellent tool. I've been using it for months. Greatly modified for my needs at this point. |
| AlexBB - Vista Ult64 SqlSer64 WinSer64 Sunday, November 18, 2007 6:40 PM |
Hello, I worked with zedgraph. I think even you can work on it. Y i recommend it because it has lot of examples and more than that it has its own (ACTIVE) forum, where you will get a lot of help. This is zedgraph tutorial web add:http://www.codeproject.com/csharp/zedgraph.asp
here to store the data , store it in "PointPairList" class.(nothing but an array of point x and y). there ends . It is really easy.
Cheers
|
| Watashi_me Tuesday, November 20, 2007 2:45 AM |
Hello, have you read the the below article. http://www.codeproject.com/csharp/zedgraph.asp
That article contains examples.Apart from that example the site also have lot of other links which will be helpful.
This zedgraph have a axis type dedicated to date and time which will be very useful(i think so according to u r description) for you.
you can use a timer or just initiate the start time with datetime variable and then using the method addsecond();, you can increment the time. I think second one will be better.
cheers.
|
| Watashi_me Wednesday, November 21, 2007 12:58 AM |
| rawdy wrote: |
|
i currently need to receive data from usb serial port for the data reading of my voltage lvl in volts, so far i hav managed to establish the link with my computer , my problem is how to save the input data and how do i plot a graph with the input with y-axis the voltage and x - axis the time , i heard of zedgraph , but i have no idea how to assign array to plot with it. any1 ? or any other advice ? i need some sample code , i seen dynamic real time example from zedgraph , but i dont know how to modify it. please very much help is appreciated here. | |
Go to Nplot.com: Scientific Charting Library for .NET/C# etc. Download it. You will have a bunch of sample graphs with input arrays in the source code or separate XML files. Just modify what you need. It is an excellent tool. I've been using it for months. Greatly modified for my needs at this point. |
| AlexBB - Vista Ult64 SqlSer64 WinSer64 Sunday, November 18, 2007 6:40 PM |
okay , thanks for the info , but do u mind please list the entire coding for the nplot example or website ? cause the website i go to , doesnt seems to provide the array. i am sorry because i am really desperate for it since my project deadline is due in next week, i need all the possbile code and ways to plot a graph with serial port data. thanks.. |
| rawdy Monday, November 19, 2007 5:07 PM |
| rawdy wrote: |
|
okay , thanks for the info , but do u mind please list the entire coding for the nplot example or website ? cause the website i go to , doesnt seems to provide the array. i am sorry because i am really desperate for it since my project deadline is due in next week, i need all the possbile code and ways to plot a graph with serial port data. thanks.. | |
OK, I do have the entire project NPlot in one of my directories. I will try to post the whole code for one crucial C# class that has all demos however it is so large that I am not sure if MSDN will take it. I will try it in the next post, not this one. This one will give you the sign that an attempt is coming.
If this does not go through, I ca try to email to you the entire NPlot project. Most likely it is not an upgraded version. There is a newer code out there but I am happy with what I have.
So you can try to post your email address for this purpose and later erase it or if it is listed in you profile I can do it also. |
| AlexBB - Vista Ult64 SqlSer64 WinSer64 Monday, November 19, 2007 9:45 PM |
I am sorry, it did not go. MSDN said that maximum input cannot exceed 50,000 characters. Apparently the file was larger. I tried to castrate it to no avail. Give me your email address.
BTW the arrays are clearly visible in many samples. In some instances they are not external but filled mathematically at runtime, like a plot for harmonics analyzer, etc. The arrays are huge in the end but they are not input.
|
| AlexBB - Vista Ult64 SqlSer64 WinSer64 Monday, November 19, 2007 9:53 PM |
Hello, I worked with zedgraph. I think even you can work on it. Y i recommend it because it has lot of examples and more than that it has its own (ACTIVE) forum, where you will get a lot of help. This is zedgraph tutorial web add:http://www.codeproject.com/csharp/zedgraph.asp
here to store the data , store it in "PointPairList" class.(nothing but an array of point x and y). there ends . It is really easy.
Cheers
|
| Watashi_me Tuesday, November 20, 2007 2:45 AM |
ok thanks alot alexBB , cause i really quite glad you are so helpful in my project btw my email is rawdy_502@hotmail.com any1 with sample coding on how to manipulate the array from the nplot or zedgraph , please dont hesistate to send me or paste here. because i am not very good in using C#.
|
| rawdy Tuesday, November 20, 2007 4:00 AM |
thanks alot watashi_me, do u know the forum or any sample coding ? because i have no idea how to increase the array x axis as it is mean for the time in second, and y array is the voltage reading of the input from the serial port. like 1st sec from the input from serial port = y[0] = voltage reading1 , i do need a timer right ? or any other way ? thanks for all the helpful info , cause i am really desperate ...... |
| rawdy Tuesday, November 20, 2007 4:05 AM |
Hello, have you read the the below article. http://www.codeproject.com/csharp/zedgraph.asp
That article contains examples.Apart from that example the site also have lot of other links which will be helpful.
This zedgraph have a axis type dedicated to date and time which will be very useful(i think so according to u r description) for you.
you can use a timer or just initiate the start time with datetime variable and then using the method addsecond();, you can increment the time. I think second one will be better.
cheers.
|
| Watashi_me Wednesday, November 21, 2007 12:58 AM |
| rawdy wrote: |
| ok thanks alot alexBB , cause i really quite glad you are so helpful in my project btw my email is rawdy_502@hotmail.com any1 with sample coding on how to manipulate the array from the nplot or zedgraph , please dont hesistate to send me or paste here. because i am not very good in using C#.
| |
I emailed to you some of the code yesterday. Have you got it? Was it helpful? |
| AlexBB - Vista Ult64 SqlSer64 WinSer64 Wednesday, November 21, 2007 4:59 PM |
thanks for all your support. if not i wont get things done. 1 last part that i need to do now. that is how do i save the usb incoming data in a readfile , and how do i convert the 8bits = 1bytes into a float ? any1 gt codes on that. really a heartfelt thanks to alexbb and watashi.
|
| rawdy Thursday, November 22, 2007 2:49 AM |
Hello, i have answered to this question in http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2433186&SiteID=1
Cheers
|
| Watashi_me Thursday, November 22, 2007 4:49 AM |
Hello,AlexBB,can you send one copy of the entire code to me please?Now i am doing a project which requires me to plot a 3D head motion track in C#.I think i need the code for a reference.My email address is yanlin1986@msn.com.
BTW,do you have some better suggestions for my project?
Thank you~
|
| kevinlin_5 Wednesday, December 05, 2007 1:51 AM |
Check my article http://www.codeproject.com/KB/mobile/PPC_WAVEFORM_DRAWING.aspx?msg=3227645 Hope it helps you. |
| ptyrodyx 14 hours 46 minutes ago |