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