Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Using MeasurementStudio WaveformGraph, how to map 512 into X-axis Range of 40MHz

Solved!
Go to solution

Using Measurement Studio .NET 2010, I have an array of 512 values that I want to map to a specific range of display points or X values. For example, my display range is 40 MHz and number of points is 512; therefore, I need to post data every 78,125 Hz. How can I accomplish this?

0 Kudos
Message 1 of 5
(3,458 Views)

Hi daviddel,

 

One option would be to use a For loop to assign a point every 78,125 HZ.  Here is some psuedo code:

 

myarray[512]

For i= 0 > 512

PlotXY (78125*i,myarray[i])

 

I hope this helps!

Regards,

Hassan Atassi
Senior Group Manager, Digital Support
0 Kudos
Message 2 of 5
(3,446 Views)

Thank you for your reply. What class library is PlotXY associated with? Currently, I'm using WaveformPlot.PlotY(dataArray), where dataArray contains my 512 data values. 

 

 

 

0 Kudos
Message 3 of 5
(3,441 Views)
Solution
Accepted by daviddel

Hi daviddel,

 

Sorry about my earlier post.  I overlooked the fact that you were using a waveform graph. What you would want to do is use the PlotY function as you mentioned.  Since PlotY has 7 different overloads it can take different paramaters. One of the overloads has the following prototype: PlotY(yData() As Double, start As Double, increment As Double)  For your case,the paramaters should be PlotY(dataArray,0, 78,125).  

Regards,

Hassan Atassi
Senior Group Manager, Digital Support
0 Kudos
Message 4 of 5
(3,436 Views)

Thank you for your help, the solution worked very well.

0 Kudos
Message 5 of 5
(3,422 Views)