Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

time scale for wave graph form

hi,
 
I am doing a project in VS2005.net Basic and Measurement Studio 8, I would like to display one sampling data in wave graphics. I am using wavegraphform. But when I change sampling time, for example, 1 ms, 2ms or 5 ms. How can I display the corrected X Axis? Thank you very much!
0 Kudos
Message 1 of 5
(3,794 Views)
Howdy Yhong -

What method are you using to plot to the waveformGraph object?   Assuming that you are using the PlotY method to plot your graph, which overloaded method are you using? 

In general, there are a few things to consider with the XAxis.  First, you can access any XAxis object through the waveformGraph.XAxes collection.  From there you can set any XAxis property you would like in order to change the look of the graph to suite your needs.

This problem also could be as simple as using the proper method for PlotY.  For Example, Ploty( double[] yData, double start, double increment); gives you the ability to specify the increment you would like to use for the XAxis.

If you still need assistance, please let me know more on the specific method you are using, and what you would expect the XAxis to look like in the situation you describe in your post.

Thanks and have a great day!

Regards,
Andrew W. || Applications Engineer
National Instruments
Message 2 of 5
(3,779 Views)
Hi,
 
Thank you for your explaination. Now I use PlotYappend, it can use the method mentioned in your answer? Thank you very much!
 
 
0 Kudos
Message 3 of 5
(3,766 Views)

 

hi friends.

i have this problem too.

i use an analog to digital convertor and get data from com port .

by change input frequency couldn't show waveform carefully .

need to equivalent a time division of an oscope.

how i do it ?

 

can you place a sample vi ?

 

thanks a lot .

0 Kudos
Message 4 of 5
(3,012 Views)

Hi Andrew :

 

I use measurement studio 2008 and C# 2005 express for my project.

 

In my project, I have to monitor 4 channels datas that come from uart, and 5K sample rate for each channel.

 

Therefore, I set the range of xAis to 0~200000 and history capacity to 200K.

 

DateTime graphStart = DateTime.Now;
TimeSpan graphTimespan;
graphTimespan = new TimeSpan(0, 0, 40); // 40 seconds range for screen

graphIncrement = new TimeSpan(0, 0, 0, 0, 10); // I do not know this, I copy the sample from internet

 

I apply PlotYAppendMultiple(data,NationalInstruments.UI.DataOrientation.DataInRows, graphIncrement) method every 80ms to draw.

 

I do not know if I use correct method because I feel the spped of drawing is too fast.

 

Please give me your suggestion! 

 

Best regards,

 

Marcus

0 Kudos
Message 5 of 5
(2,900 Views)