06-27-2011 09:29 AM
Hi
I have taken over a LabView project, which measures a signal we generate ourselves. The problem is however that our measured output has a constant value, which is wrong, since we are generating a square wave. This has led us to believe that the generated pulse is faster than what we are trying to measure. Is there someway to remedy this issue, without making changes to the generated wave?
I hope the question is clear. I have attached a copy of the project.
Best.
06-27-2011 09:37 AM
You're doing your acquisition before your generation.
There is a data dependency in your DAQmx timing node for the output. Shouldn't you know the #samples per channel before doing your acquisition?
06-27-2011 01:56 PM
Hi
Thanks for the quick response.
1) How can you see that the acquisition is done before the generation?
2) Is there somehow a way for me to see the # of samples/channel?
Best, and thanks again.
06-27-2011 03:43 PM
Follow the wires to see the flow of data in your program.
Run a Block Diagram Cleanup of your code and it should become apparent.
One of the inputs to the DAQmx Timing function for your analog output requires the array size from your Analog Input Loop. Because of dataflow, the analog output section will not proceed until your analog input loop has completed.
The # of samples per channel is one of the top input terminals of the DAQmx Timing block. 2nd from the right.
06-28-2011 02:45 AM - edited 06-28-2011 02:51 AM
After doing the wire cleanup, I see what you mean. Thanks for that. I tried moving the measurement-part to the right, and now I (rarely) get other values than min/max, but the data flow still seems to be wrong. I have to admit that I am unfortunately not that strong in LabView, so any further help will be greatly appreciated.
Also, the # samples/channel in that case is 100.
Best.
06-28-2011 07:27 AM
Left to right position doesn't matter. What matters is the data dependencies.
If you know the number of samples per channel is 100, just wire a constant of 100 to the DAQmx Timing node for your analog output.
What is the frequency you want to generate and what is the frequency that you're using to acquire?
Can you repost anything you've fixed in your current vi?