Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I move over time to achieve waveform by waveformgraph in vs2003.net

How do I move over time to achieve waveform by waveformgraph in vs2003.net
like pic
0 Kudos
Message 1 of 6
(4,431 Views)
Hi slave2,

You didn't mention what version of Measurement Studio you were using or what .NET language so I will be using Visual Studio 2005, Measurement Studio 8.1.2 and C# to address your questions.  Okay, so lets get started....

In order to get the behavior you are wanting, you need to consider 3 things:
  1. The property configuration for the UI such that the axis labels display date/time information.
  2. The property configuration for the UI such that the graph scrolls.
  3. The conversion factor between date/time and numeric values.  However, since you are using the WaveformGraph, you can just use one of the PlotYAppend overloads that accepts a TimeSpan increment. 
You can configure the UI settings either at run-time or design-time. To get the scrolling behavior, you want to set the the XAxis.Mode property to AxisMode.StripChart. Then of course you would want to calling the WaveformGraph.PlotYAppend.

To set up the date/time information, you could do something like the following:  


// Configure the X axis to display date/time labels.
xAxis1.MajorDivisions.LabelFormat = new FormatString(FormatStringMode.DateTime, "h:mm");

Take a look at the Charting and PlotDateTime shipping examples for help.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 2 of 6
(4,423 Views)
thanks for Jonathan N.
National Instruments R&D
 
i am using 7.1studio for vs2003.net ,
as same as this method to solution my question?
0 Kudos
Message 3 of 6
(4,405 Views)
thanks for Jonathan N.
National Instruments R&D
 
i am using 7.1studio for vs2003.net ,
as same as this method to solution my question?
0 Kudos
Message 4 of 6
(4,403 Views)
Hi slave2,

I'm fairly confident those properties existed back in the 7.1 timeframe but I'm currently not near a computer with 7.1 on it to validate my thoughts. Those properties I mentioned are fairly common so I would suggest go ahead and try it out.  If you have problems, let me know.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 5 of 6
(4,401 Views)
Thanks for Jonathan N.
I try it.
another question is how i can show xAxis's Number   like the picture.
eg.
I set xAxis's range (3600, 7219) ,the first number show on the xAxis is 1:06:40 but not 1:00:00.
what should i do. it can show 1:00:00 first.
 

 
0 Kudos
Message 6 of 6
(4,393 Views)