Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring time elapsed for measurements

Hello,

 

I am controlling a signal generator and a VNA using labview. I have set the program to do the measurements for 700ms. but its not correct. how do I measure the real time (in ms) of my measurements?

 

I have attached my VI herewith.

 

Thank you in advance

 

0 Kudos
Message 1 of 4
(5,796 Views)

Hi shsil,

 

I took a look at your VI and it looked like you were only getting two data points, is this correct?

Do you need it to be exactly 700 ms and do you need exactly 14 points?

 

It's quite difficult to get exactly 700 ms with a USB device because of the way the communication works combined with how Windows handles task priority. If you only have two points per run, then I think you are not reading fast enough. You could try putting the VISA Open and VISA Close outside of the loop in order to speed up the process. You can also add a frame before and after your loop and put tick count (ms) in those frames and subtract them to get the time it takes to run your loop. Finally if you change your wait to "wait until next multiple, I think this will guarantee you get all your points.  

 

I've attached a picture to show the changes I made. Let me know how this works out.

 

-KP

Kurt P
Automated Test Software R&D
0 Kudos
Message 2 of 4
(5,765 Views)

I need to make it less than 700ms. number of points does not matter.

Thank you very much for your reply and suggestions.

0 Kudos
Message 3 of 4
(5,752 Views)

Hey shsil, 

 

Did you have a chance to impliment those changes? I'm curious to see how long it takes to run that section where you do the serial write and read. 

 

Thanks,

 

-KP

Kurt P
Automated Test Software R&D
0 Kudos
Message 4 of 4
(5,745 Views)