Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 Real-Time Graphics Tools for .Net (VB and C#)
 Specifying Time Values to graph
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bechbd

15 Posts

Posted - 29 Sep 2005 :  19:18:30  Show Profile  Reply with Quote
Hello,
I am using the real time graphing functionality and I was wondering if there was a way to specifying the time on the x axis. What I am trying to do is that I have to display a live graph of real time data. After real time data collection is complete they want the ability to play back the recording and have it look the same as if it were live.

quinncurtis

1164 Posts

Posted - 29 Sep 2005 :  22:37:38  Show Profile  Reply with Quote
Almost every real-time example program uses a time x-axis. You need to be very specific about what you want that is different than all of those examples. Look at the ScrollApplication1 example to start.

Replaying data is exactly the same is collecting it live. Only the data source changes. If you store the data you should store it with a time stamp. When you replay the data you can use the time stamp to place the data at the proper position on the x-axis. Use the RTProcessVar.SetCurrentValue overload that has a time stamp parameter. See the ScrollApplication1 example program.


currentTemperature1.SetCurrentValue(tod, currentTemperatureValue1);
Go to Top of Page

bechbd

15 Posts

Posted - 03 Oct 2005 :  17:01:47  Show Profile  Reply with Quote
I have tried doing it the way that you specified but it will not graph the data when I add the date time into the Set Current Value paramter. When I do that it appears to graph because the axis autoscales and such but no line is displayed on the screen. When I remove that parameter the data appears graphs but it does not show the correct times on the graph. Here is the code I am using to setup the time coordinates for the graph:

Dim startTime As New ChartCalendar(CDate(ds.Tables("GSR").Rows(0).Item("gsr_time")))
Dim endTime As New ChartCalendar(CDate(ds.Tables("GSR").Rows(0).Item("gsr_time")))

endTime.Add(ChartCalendar.SECOND, 45)

ptransform1 = New TimeCoordinates(startTime, 0, endTime, 1)
ptransform1.SetGraphBorderDiagonal(x1, y1, x2, y2)

I set the current value using the following code:

Dim tod As New ChartCalendar(CDate(ds.Tables("GSR").Rows(intRow).Item("gsr_time")))
Value1.SetCurrentValue(tod, ds.Tables("GSR").Rows(intRow).Item("gsr_value"))
intRow = intRow + 1

The problems I am experienceing are when I try to show data that is in the past not live data.

Go to Top of Page

bechbd

15 Posts

Posted - 03 Oct 2005 :  17:42:12  Show Profile  Reply with Quote
I should have added up above that the lineappears if the graph never scrolls. It is only if the graphs scrolls that the line never appears.
Go to Top of Page

quinncurtis

1164 Posts

Posted - 03 Oct 2005 :  18:48:19  Show Profile  Reply with Quote
If the value is not being display then most likely the ChartCalendar object you are using to specify the values time does not match the scale that your have setup. We can't tell what is wrong based on the code you have provided since we have no idea of the values int he dataset table you are using.

You should try and get things to work without the dataset table. Just create simimuated the data, as we do in all of examples, and get that to graph. Then analyze why the dataset table time/dates are different than the simulated ChartCalendar objects.

If you are able to create a SIMPLE program that fails the way you describe we will of course look at it. You must supply us with the complete source to an example program that we can compile and run in our offices. Send it to support@quinn-curtis.com along with an accompaning message.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07