From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-28-2019 12:38 PM
Hi all,
I hope to use triangle wave and a step to make galvo mirrors do a x-y scanning, I usea a timer to inspect the scanning time for an image. The shown time is different from its theory time, e.g, if I use a 1 HZ triangle wave as x signal to do a 128x 10(row x column), the theory time should be 1x10=10s, while the shown time from the labview program is only 456 ms. Can any one explain this and help me correct the program?
The test vi is attached.
Thanks,
Mei
Solved! Go to Solution.
04-28-2019 10:05 PM
What do you mean by the "time shown by the LabVIEW program"? Do you mean the difference in time between the two timer functions? That only measures how long the middle frame of your code takes to run to create the waveforms and start the DAQ process. It has nothing to to with the duration of your waveforms.
But you do wind up stopping the acquisition right after you have started it. You should put in a wait until done DAQmx function then stop it after that.
04-29-2019 07:42 AM
Hi RavensFan,
Thanks. 'time shown by the LabVIEW program' means the measured time shown in the time indicator. The time difference means the measured time in Labview and the real time I expected (e.g 1s for one row, so 10s for 10 rows X 128 column). Yes, I want to measure the duration of the waveforms. What should I do? put a wait in?
Thanks,
Mei
04-29-2019 07:58 AM
Do what I said in my message.
See attached.
05-02-2019 03:30 PM
Hi RavensFan,
Thanks and sorry for the reply. I found the problem why I cannot get the same time from the program and the theory-- something wrong with the wave generating. I test the output wave with an oscilloscope, when I set the wave (for x signal) frequency 1HZ in the program, the frequency getting from the oscilloscope is 5HZ . And I cannot get signal from Y axis's output. Can you help me about this?
Thanks,
Mei
05-02-2019 04:28 PM
Your upper For Loop doesn't seem to take the sample rate into consideration.
Maybe it does and it is built into one of the constants, but maybe it doesn't.
05-08-2019 05:05 AM
Hi RavensFan,
Thanks, but I still do not solve the problem, so I open a new post for this question.
Thanks,
Mei