LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing my Code with AE Returning Same Time Value

Solved!
Go to solution

So I am running a VI that is communicating with a VISA device that we built for taking measurements. We are trying to get timing measurements for how long it takes the device to run its program and communicate back. I created a CheckTime.vi Action Engine in order to do this but for some reason am getting the same results back with measurements. Some times the unit will sample 1 time, sometimes the unit will sample 5 times based upon what we tell it to do. I'd like to return a measurements for each measurement whether it's 1 sample or 5. 

 

Below is where the pattern is checked to determine whether to take another measurement, this is where the timer is initialized. 

 

Check_Pattern_Init.png

 

Once the data is being read back from the VISA device we're checking the time as many times as the number of samples taken. For each sample a new data set is read and a new time should be pulled, but the resulting data is showing the same measurement multiple times. 

 

Check_Time_VI.png

 

Here are the results with 5 samples. I would think that I should get a different measurement for each iteration of the for loop. 

 

data_check_time.png

 

Maybe my AE isn't correct? Or a weird conversion is being made somewhere?

 

 

Download All
0 Kudos
Message 1 of 3
(2,951 Views)
Solution
Accepted by topic author rkmadse

I would guess you For loop is iterating so fast the windows time does not have to time to up. Try using the high resolution timer instead of the time in seconds.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(2,946 Views)

You rock Ben!

 

Thanks!

0 Kudos
Message 3 of 3
(2,934 Views)