EvilZone

Programming and Scripting => .NET Framework => : Kryptonite August 31, 2013, 01:47:36 PM

: Visual Basic - Real time graphing
: Kryptonite August 31, 2013, 01:47:36 PM
Good day guys,


I am currently working with VB 2010, and am to receive values via RS232 communication, and plot these received values in a real time graph.


I have searched the net, but I cannot seem to narrow down on a proper tutorial or explanation on how to achieve this.


Would anybody here be able to help or explain what needs to be done?


Thanks in advance
: Re: Visual Basic - Real time graphing
: Kulverstukas August 31, 2013, 08:38:00 PM
Do you HAVE to use VB? It would be easier in Python.
http://pyserial.sourceforge.net/
Used this once, worked great: http://matplotlib.org/
: Re: Visual Basic - Real time graphing
: Kryptonite September 01, 2013, 09:27:48 AM
I'm not forced to use VB, but that's what I'm familiar with, because I still have to create a GUI and perform several other functions and interact with databases. If I use Python, I'll have to learn the language first
: Re: Visual Basic - Real time graphing
: Kulverstukas September 01, 2013, 10:16:42 AM
You'll end up making it in Python faster than VB either way. I'd go with python if I were you.
: Re: Visual Basic - Real time graphing
: ArkPhaze November 01, 2013, 02:56:58 AM
In the event that he can't go with Python... What kind of graph are you looking for @OP? It's easy enough to create a custom graph control using GDI in .NET. I've made a few of them already. But there are chart controls already available to you.
: Re: Visual Basic - Real time graphing
: Kryptonite December 02, 2013, 11:12:26 PM
I was able to use a few chart controls built into the VB environment. If anybody needs any help with a similar problem in the future, contact me and I shall provide my code and project
: Re: Visual Basic - Real time graphing
: Kulverstukas December 03, 2013, 05:26:46 AM
I was able to use a few chart controls built into the VB environment. If anybody needs any help with a similar problem in the future, contact me and I shall provide my code and project
And why not share it now?
: Re: Visual Basic - Real time graphing
: Kryptonite December 03, 2013, 03:30:07 PM
The goal of the project attached was to:
- receive information in the form of a string via serial communication
- extract the various readings
- plot and display a real time graph
- and to save various values into a database


Use it as you will, but please make sure not to include any of the names in the project


(it may not work if the database directory isn't corrected)
: Re: Visual Basic - Real time graphing
: ArkPhaze December 10, 2013, 03:59:58 AM
IMO you should be using more features of the language to write such a project. Arrays, etc... All you have is repeated code, a bunch of forms, single letter variables, a lack of loops that would've been valuable in more than several cases, and more. Where's your separation of concerns?

Functions? Classes?  ???