LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring signal

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.

0 Kudos
Message 1 of 6
(2,246 Views)

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?

0 Kudos
Message 2 of 6
(2,240 Views)

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.

0 Kudos
Message 3 of 6
(2,222 Views)

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.

0 Kudos
Message 4 of 6
(2,207 Views)

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.

0 Kudos
Message 5 of 6
(2,191 Views)

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?

0 Kudos
Message 6 of 6
(2,159 Views)