LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Analyzing input signal and periodic signal generation

Hi!
I need to do data acquisition of a voltage (sine wave) and at a
specific angle of the ideal sine wave after a fixed number of periods
have been acquired an analog signal has to be sent. Knowing the input
signal's frequency, phase information I can guess the time to wait
before the same point on the wave comes. I use 'get time.vi' and
wait until the predicted time comes' using a while loop that checks
if the real time is equal to the predicted time. Problem is program
misses the target point. I mean if my predicted time is 1.324 ms
although the program counts milliseconds it skips this point and never
sends the signal. Then I modified the while loop and instead of
checking if the predicted time came or not, I send the signal when the
difference of the (predicted - current) is less than 5 ms. This worked
the best among my programs and I could observe the generated signal
over a sine wave on the oscilloscope in a narrow region. I mean signal
was changing location, but it was a small interval (around 10-15 ms),
which still is not enough for me. When I calculate the difference of
these two times (predicted - current) and use the result in wait.vi, it
does not give accurate results.

I tried to use counter to calculate the elapsed time and use it in
wait.vi, but this did not give me a signal occurring at the same
location.
If anyone can suggest me something I will more than appreciate it.

Thanks...

ilter

0 Kudos
Message 1 of 4
(2,633 Views)
Hello,
 
First, I should note that if your questions are dependent on your NI hardware, you should post those at the DAQ forum for answers.  As far as the pure LabVIEW considerations are concerned, I think the inherent problem with the approach is that you are trying to software trigger your analog output at a very specific time based on your analog input.  The idea here is that, even the time you spend computing your guess for the "wait time" will be in addition to your wait function.  Perhaps you can implement a hardware trigger of some kind, such as waiting for a specific number of cycles, and then using a level trigger to trigger your AO operations after that.  Or perhaps you can use a wait on muliple tigger of some kind - but the details of those possibilities will have to be fielded in the DAQ forum.
 
I hope this helps!
 
Best Regards,
 
JLS
 
 
Best,
JLS
Sixclear
0 Kudos
Message 2 of 4
(2,622 Views)
Can you please give a link to DAQ forum?

Thanks...

0 Kudos
Message 3 of 4
(2,612 Views)

Hello,

Sure, here is a link to the DAQ Forum.

Best Regards,

JLS

Best,
JLS
Sixclear
0 Kudos
Message 4 of 4
(2,606 Views)