plot graph real time on vb

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 9jaguy
    New Member
    • Jul 2008
    • 3

    plot graph real time on vb

    Guys, I treally appreciate the way questions are answered on this forum. I hope I get someone to help on this quickly too. :)

    I am using vb 2005 and getting data directly from two sensors in two separate rtf text boxes labelled X and Y coordiantes. I now need to plot a graph real time that can get use the values from the rtf boxes to plot the coordinates. The initial reading from the sensors when it is switched on is the original value and set to 0,0 and subsequent values are relative to this.

    Can anyone help?
  • TTCEric
    New Member
    • Jul 2008
    • 26

    #2
    on each TextChanged event of your richtextbox, update your graphs drawing surface to plot the values.
    if its time-based (which most of them are, I think), use a timer that will consume the values in the rtf.
    so for every interval, you'll plot your points on a graph.
    or for every textchange. it really depends on how you want to implement.

    so, i guess my question to you:
    real-time with a time as a measure,
    or change as a measure?

    Comment

    • 9jaguy
      New Member
      • Jul 2008
      • 3

      #3
      Originally posted by TTCEric
      on each TextChanged event of your richtextbox, update your graphs drawing surface to plot the values.
      if its time-based (which most of them are, I think), use a timer that will consume the values in the rtf.
      so for every interval, you'll plot your points on a graph.
      or for every textchange. it really depends on how you want to implement.

      so, i guess my question to you:
      real-time with a time as a measure,
      or change as a measure?
      tanx for ur response. Its change as a measure. as the position on the x-y axes change, the graph shld update to the new position. as the sensors are built on one block, the dot representing the coordinates on the graph will seem to move in the direction of the sensors.

      Comment

      • TTCEric
        New Member
        • Jul 2008
        • 26

        #4
        Originally posted by 9jaguy
        tanx for ur response. Its change as a measure. as the position on the x-y axes change, the graph shld update to the new position. as the sensors are built on one block, the dot representing the coordinates on the graph will seem to move in the direction of the sensors.
        Is your question how this should be represented? if so, id suggest asking your users. There are many ways coordinates can be rendered. For example, as a monitor where coordinates change and previous coordinates are still seen. This alot like echocardiogram you see in hospitals. Or, it can be simple bar that goes up and down or side to side or both. This is like a pulse monitor.

        Comment

        • 9jaguy
          New Member
          • Jul 2008
          • 3

          #5
          Originally posted by TTCEric
          Is your question how this should be represented? if so, id suggest asking your users. There are many ways coordinates can be rendered. For example, as a monitor where coordinates change and previous coordinates are still seen. This alot like echocardiogram you see in hospitals. Or, it can be simple bar that goes up and down or side to side or both. This is like a pulse monitor.
          I actually do not want previous coordinates to be seen. Just the new coordinate. To be honest, Im very new at VB and Im just learning how to plot graphs (and that aint going too well too :( ) so Il appreciate any help.

          Comment

          • TTCEric
            New Member
            • Jul 2008
            • 26

            #6
            Originally posted by 9jaguy
            I actually do not want previous coordinates to be seen. Just the new coordinate. To be honest, Im very new at VB and Im just learning how to plot graphs (and that aint going too well too :( ) so Il appreciate any help.
            yes, you should look at the point class to understand where on the screen you could indicate the measure on whatever object you are plotting to.
            With some GDI+, you could make some decent code. Learning GDI+ is a bit of a curve but certainly worth it in your case.
            There are no native/intrinsic graphs in VB.NET that I know of. So, you'll need to mock one up.

            Comment

            Working...