LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ni 5114 Scope card( Phase delay between two channels)

Hi

I am trying to do a phase delay measurement between the two channels of ni 5114 scope card. I am using one of the example in Labview 8.5, niScope EX Measurement Library.vi. I get right results if I have two sinusoids of comprable amplitude on the two channels. But in my real situation, on one channel I have sinusoid of ~10mv  peek to peek and on the other 1V peek to peek. (i.e.  100 orders of magntude difference). So program is giving me errors. I tried to play with array gain and digital gain on one channel but no luck. Is there any way to amplify one of the channel? or what else can I do? I would really appreciate your suggestions.

Thanks

Best Regards

Imran

0 Kudos
Message 1 of 4
(3,048 Views)

The internal measurement libraries assume that the signals you are comparing are essentially the same, and are probably setting the levels using your larger signal.  Some things you could try:

 

  1. Reverse which channel is which in your calculation.  If the levels are currently being set by the large signal, this would cause them to be set by the small and the zero crossing algorithms would then work better.
  2. Do the calculation yourself after fetching and normalizing both signals to the same level.  LabVIEW has a phase measurement VI which uses the same algorithm as the NI-SCOPE measurements.
  3. Boost your signal with an amplifier before the scope.  This could introduce another phase delay, so only use this as a last resort.

Good luck.

Message 2 of 4
(3,043 Views)

Thank you for your reply. Is it the Tone vi in signal express for the phase meaurement? Also my scope card is 8 bit. Do you think averaging of acquisitions will improve the qunatization error? or is there any other trick in Labview I can use to decrease the quantization error.?

Best Regards

Imran

0 Kudos
Message 3 of 4
(3,035 Views)

My apologies, it appears I was mistaken.  All the scope measurements but the phase are available as VIs.  To get the phase difference, you have a couple of choices:

 

  1. Use Extract Single Tone Information.vi on both waveforms, then subtract the two output phases to get the difference.  This will require about ten cycles to get decent accuracy and assumes periodic waveforms
  2. Implement a level crossing algorithm yourself to determine the relative phases.  You can build this up from pieces available in LabVIEW.  One way would be to use the Amplitude and Levels.vi to find the ranges of your waveform.  Use this output to set input levels to Basic Level Trigger Detection.vi, which will find a level crossing accurate to one sample.  You can then do a linear interpolation (or line fit) between data points to get subsample accuracy.  This is approximately the method used by the scope internal functions.

Averaging acquisitions will improve the quantization error.  However, be aware that there will be temporal jitter of about ±½ sample period, so your waveform will also be smeared a bit in time, causing features to be slightly flattened in the averaged result.  This may be insignificant to you.  If it is not, assuming your internal time to digital converter (TDC) is on, and it should be, your timestamps will have about 40ps resolution, so you can use this information to correct the smearing through resampling before averaging, should you choose.  It might be easier just to take data at a higher rate.

 

My apologies again for sending you down the wrong path.  Let me know if you have further questions.

0 Kudos
Message 4 of 4
(3,018 Views)