Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

timing of measurement

Hello all,

 

I am trying to measure an analog current input. I would like for the measurement to be ended according to the time that I want. I have made a vi that can be seen in the attachment. I simulate the device using virtual device PCI 6221. In reality NI 9203 will be used, what will happen if there is a lag between the device and my computer. What can be done to make my vi works better?

 

I made the vi using LabVIEW 8.5

 

Thank you.

 

0 Kudos
Message 1 of 5
(3,028 Views)
Well, your VI won't work at all as it is now. You've got the Elapsed Time function outside the loop.
0 Kudos
Message 2 of 5
(3,021 Views)

Hmm.. really?

I tested it and it works, maybe you can tell me why it wont work?

 

I used rate of 500 and number of sample of 1000

in my waveform graph, the x-axis is shown to be 2

Do you think it would be better if the elapsed time is inside the loop?

 

Thanks. 

0 Kudos
Message 3 of 5
(3,015 Views)
Basic dataflow. The while loop is dependent on the output of Elapsed time. If the output is false, that is what you pass to the while loop and you simply cannot pass anything else once the loop starts. Once the loop starts, then the only way to stop it iw with the stop button. Your calculation of the start time and target time seems a little strange but I don't have time to look at it now.
0 Kudos
Message 4 of 5
(3,013 Views)

Hi Dennis,

 

What I want is that the measurement time will be equal to the number of sample divided by the rate. 

That is why I use the division as the target time for the express vi (elapsed time).

As for the start time, I used the value at which the vi started. I thought that it can be provided by the tick count.

 

The thing is that my vi, stop at the time that I want. It is based on the x-axis of my waveform graph. Is it wrong to say that?

 

Let me know if you have time to look the vi in more details.

 

Thanks. 

0 Kudos
Message 5 of 5
(3,010 Views)