LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting an accurate Phase reading from a DAQ Analog Input

Hello! So I'm currently trying to debug my group's Senior Project Labview program. I've included a screenshot of a very simple program which is basically a small part of the project. But anyways, my issue is that when I'm trying to obtain the phases from each signal it outputs the wrong phase first of all and the phase values it does give basically "drift" or slowly increment/decrement to where the initial value will be +-5 from the initial value in about 10 seconds of running the program. I've tried looking for solutions through Google and other forums but whatever I tried always ended up with the same result. If anybody could help I would really appreciate it. This is basically the last thing that I need to figure out to finish my Senior Project. Also the DAQ I'm using is the NI USB-6001.

Screenshot 2022-03-11 193311.png

Signal is the phase of Channel 1 and Signal 2 is the phase of Channel 2. 

0 Kudos
Message 1 of 3
(1,038 Views)

Using DAQ Assistant makes it difficult to tell whats going on. What are you doing? Where is the "wrong" phase? In your output signals (which you expect to stay "in phase")? Do you measure that via analog inputs? What clock are you using? Or do you think the Amp.-Freq-vi is not working as expected? In general you should consider that NI USB-6001 does multiplex channels.

0 Kudos
Message 2 of 3
(999 Views)

It's hard to tell exactly from your picture what is going on. Will make a guess about what is happening.

 

Phase is a referenced measurement, not an absolute measurement. The value of the phase depends on your reference.

 

Looking at the picture I cannot tell how you are measuring the phase. It looks like you are measuring 60 Hz signals, which have a ~16ms time period. I'll assume your phase measurement uses a 0 degree shifted sin wave as a reference. Depending on the number of sample points you are taking each interval, you may not have an integer multiple of acquired sine waves; thus on the next acquisition the phase is different than previously with respect to a 0 degree shifted sin wave as a reference. Make sure you are capturing an integer number of waves, for example make your acquisition time 50 or 100 ms.

 

Another possible guess is the DAQ assistant. Are you set to continuous acquisition, does the assistant reset in the loop? You are better off using normal DAQmx functions if you want good results.

 

 

0 Kudos
Message 3 of 3
(966 Views)