Hello, friends.
Today I will tell you how to check how much time a LabVIEW VI will take to execute a simple code.
For that purpose, I just create a new VI.
In this VI I just go for.
The case of matching pattern.
Let's say I just take a while loop over here.
Hence this loop.
Just take a random number.
This random number will generate values for from 0 to 100.
So upper bound is 100 and lower.
Bound is zero.
Now in this case.
I just set a number.
That is defined by me or by the user.
User.
Defined number is there.
I just change its representation to integer 32 unsigned number 32.
So when these two are equal, it will stop my loop.
So it will stop my youth.
And I just want to check after how many iterations I just got that value.
So just increment it because iteration starts from zero.
So over here.
This is my.
Current.
This is my iterations.
Okay.
And over here, this is my current number eight indicator for this.
Current.
Number is there.
Okay, So I want to just check how much time this code will require to execute for that purpose.
I just go to my flat sequence, put inside a flat sequence, add another frame.
So just go to the timing.
Over here.
Tick count.
Just connect it to the initial.
Then just go over here.
Just go to the again timings.
And.
Go to the numeric subtraction.
So over here, my time.
Subtract it from this time.
You got.
The time of your system.
Okay, So this is.
Now just run it.
Let's check what happened to it.
So right now.
Just put some value.
Let's say I want to check for 15 that is user defined and when.
Current number is 15, 15, 15, matching after number of iterations.
13.
So over here.
We got the temperature, not temperature.
It is the time, as you see when I run this right now, time is one because in this case, the range
is 0 to 100 random number.
And the matching function.
Liked
the match we will find easily if I just put 10,000 in this and when I again hit on run button, as you
see five seconds, it will take right now six seconds.
It will take five seconds, three seconds, 12 seconds.
Okay.
And right now, if I just make it more, then in this case, the time is 141 711 eight seconds.
So this is how you can work with time function or how you can check how much time it will take to execute.
Your code.
You just put your code inside this.
This tick count.
If you just put.
Control H.
It is in milliseconds.
Over here.
Uh, return the value in milliseconds.
The time or here it is not seconds.
It is in milliseconds.
Okay.
So it is one one eight milliseconds.
So this is how you can check.
So this is all about today.
Thank you.