High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

Phase measurement on single channel using PCI 5112

Hi Forumer..

I have a question about phase measurement using digitizer PCI 5112. I've tried using Tone Measurement.vi and Extract single tone measurement.vi to measure phase from function generator PCI 5411, but I couldn't get the desired phase although no problem with the amplitude and frequency.

In other words.. I generate 50kHz, 200mVp-p and 20 degrees by using FGEN front panel.. and what I get on the measurement using digitizer was the same 50kHz, 200mVp-p but not the 20 degrees of phase.. What I got for phase is not a consistent value... and I never get 20 degrees of phase by using either tone measurement and extract single tone measurement.

Does it possible to read phase value correctly from hardware?.. because when I read from "simulate signal.vi".. I didn't found any problem. It works very well...

Thanks..

0 Kudos
Message 1 of 7
(7,593 Views)
There are several things that could be going on here.  Are you synchronizing the 5411 and 5112?  If the 5112 is not using the same timebase as the 5411 and being triggered by the 5411, the phase will not be what you think it is.  If you are not using the same timebase, the trigger point for the 5112 will randomly occur at some point between the acquisition points, resulting in jitter in the phase equal to about plus/minus one half acquisition period.  If you are not triggering the 5112 with the 5411, the trigger point is solely determined by the 5112 trigger parameters and the phase could be anything.  You will need to connect the RTSI connectors on the boards to accomplish this.
0 Kudos
Message 2 of 7
(7,574 Views)
Mr. DFGray...
 
   I'm not doing hardware triggering between hardware.. I'm using both device together is just to test wether phase detection works to read waveform phase..
but actually my real application is to read voltage from two signal via two different channel on PCI 5112. From it I'll find phase difference between them. Both voltage are from external source, not generated from function generator..
  In the same time... I tried to read phase from external function generator via channel 1, unfortunately it returns various value, not just one value.. just like what happen to unsynchronized function generator..
  Will phase measurement value return a reliable value for phase difference? To reduce range of value (because the phase keep changing), I tried using a subVI to 'extract portion.vi' to reduce number of sample... and its succesfully reduce the range, yet phase reading was still not same...
  I tried using 'simulate signal.vi' with 'extract portion.vi' that I set minimum sample number approximately down to 66 samples, below that value, tone measurement unable to return the right value anymore.
  anyone... Is there any method to acquire correct phase measurement?

FYI... I'm using LabView 7.1.
 
Thanks 🙂

Message Edited by Jamaloogy on 04-10-2006 11:45 AM

0 Kudos
Message 3 of 7
(7,562 Views)
The NI-SCOPE API includes a phase measurement function that will accurately give you the phase difference between two channels.  I have attached a VI (LV7.0) that shows the basic idea.  It is not tested, since I don't have a device on my machine at the moment.  Note that there is a default 5 second timeout on the fetch.  The key to making this working is setting the Other Channel parameter (found in Waveform Measurement subpalette).  You can also fetch Time Delay, if you would prefer a time increment instead of a phase increment.

If you want to do averages and get statistics, you can do that as well.  See the NI-SCOPE examples for details.

Let us know if you run into problems.
0 Kudos
Message 4 of 7
(7,539 Views)
Hi Mr. DFGray..

Thanks for your subVI.. but when I try to measure from two channel, the same thing occur. Phase delay value keep changing in one measurement. But I think this is because;

1) I use function generator (NI PCI 5411) that I assign to channel 0 and conventional func. gen to channel 1. I set both to generate 50kHz signal. 
    but the conventional func. gen does not exactly reach 50kHz level. It keeps floating between +/- 1 Hz.. I think maybe this is the main cause of
    unstable (keep changing) phase delay measurement although I did not change any setting on both func gen.

I hope my real application will not encounter this problem, actually I do this procedure to simulate the bioimpedance measurement. The intended measurement is to read current (which I change to voltage in my friend circuit) on channel 0 and read resulting voltage from body on channel 1.


here I attach my subVI..
0 Kudos
Message 5 of 7
(7,521 Views)
one question about niScope multi fetch measurement.vi.
for phase delay function of course it will find degrees between both function.. but is phase delay is derived from channel 0 - channel 1 or
channel 1  -  channel 0?

thanks..
0 Kudos
Message 6 of 7
(7,518 Views)
There are several things in your VI which may be causing you issues.
  1. The order in which the Fetch and Read VIs execute is not determined.  You need to string them together in a line connected with error terminals with the niScope Multi Read WDT.vi first.  This ensures that the data acquisition occurs first and you will be reading the measurements from the same waveform you are viewing on the chart.  In your current implementation, it is somewhat undetermined whether or not the measurement fetches occur prior to the waveform being read or not (they would fetch from the previously acquired waveform)
  2. Your system actually works due to another performance issue.  The initialize, autosetup, and close  VIs should be outside the main loop.  You only need to do these once.  However, because they are inside the loop, your indeterminate timing becomes determined.  Fix this item and item 1 or you will have issues.
  3. Your top loop does not execute until the bottom loop finishes.  This makes is almost useless.  You can eliminate it and put the FGEN VIs before and after the main loop, connected by error wires (a shift register through the loop is probably better than a tunnel).
  4. You may want to put a condition to exit if you have an error condition in the main loop.
  5. I believe you only have to fetch delay on channel 0, not 0 and 1.  You set the Other Channel using the technique I showed you in the above VI.
Your assessment of your phase problem is probably correct.  An easier way to produce a fixed delay is to split your signal and use different length cables to go to the individual channels.  Tune the length difference to the delay you want.  This may not be practical for long delays.  Unfortunately, I cannot remember the delay/meter on standard cable.

I believe the delay is positive from channel 0 to channel 1, assuming your Other Channel is set to channel 1 and you fetch the delay on channel 0.  It has been awhile since I did this sort of thing, so I may be wrong.
0 Kudos
Message 7 of 7
(7,514 Views)