1
00:00:05,000 --> 00:00:06,000
Hello, friends.

2
00:00:06,000 --> 00:00:17,000
Today I will tell you how to check how much time a LabVIEW VI will take to execute a simple code.

3
00:00:18,000 --> 00:00:22,000
For that purpose, I just create a new VI.

4
00:00:23,000 --> 00:00:27,000
In this VI I just go for.

5
00:00:28,000 --> 00:00:31,000
The case of matching pattern.

6
00:00:32,000 --> 00:00:35,000
Let's say I just take a while loop over here.

7
00:00:36,000 --> 00:00:38,000
Hence this loop.

8
00:00:38,000 --> 00:00:41,000
Just take a random number.

9
00:00:42,000 --> 00:00:49,000
This random number will generate values for from 0 to 100.

10
00:00:49,000 --> 00:00:52,000
So upper bound is 100 and lower.

11
00:00:52,000 --> 00:00:54,000
Bound is zero.

12
00:00:54,000 --> 00:00:57,000
Now in this case.

13
00:00:58,000 --> 00:01:00,000
I just set a number.

14
00:01:01,000 --> 00:01:04,000
That is defined by me or by the user.

15
00:01:05,000 --> 00:01:06,000
User.

16
00:01:07,000 --> 00:01:10,000
Defined number is there.

17
00:01:12,000 --> 00:01:20,000
I just change its representation to integer 32 unsigned number 32.

18
00:01:20,000 --> 00:01:26,000
So when these two are equal, it will stop my loop.

19
00:01:29,000 --> 00:01:32,000
So it will stop my youth.

20
00:01:33,000 --> 00:01:40,000
And I just want to check after how many iterations I just got that value.

21
00:01:41,000 --> 00:01:46,000
So just increment it because iteration starts from zero.

22
00:01:47,000 --> 00:01:48,000
So over here.

23
00:01:49,000 --> 00:01:50,000
This is my.

24
00:01:51,000 --> 00:01:52,000
Current.

25
00:01:55,000 --> 00:01:57,000
This is my iterations.

26
00:02:02,000 --> 00:02:02,000
Okay.

27
00:02:03,000 --> 00:02:08,000
And over here, this is my current number eight indicator for this.

28
00:02:15,000 --> 00:02:15,000
Current.

29
00:02:17,000 --> 00:02:18,000
Number is there.

30
00:02:19,000 --> 00:02:28,000
Okay, So I want to just check how much time this code will require to execute for that purpose.

31
00:02:28,000 --> 00:02:37,000
I just go to my flat sequence, put inside a flat sequence, add another frame.

32
00:02:40,000 --> 00:02:43,000
So just go to the timing.

33
00:02:44,000 --> 00:02:45,000
Over here.

34
00:02:45,000 --> 00:02:47,000
Tick count.

35
00:02:49,000 --> 00:02:52,000
Just connect it to the initial.

36
00:02:53,000 --> 00:02:56,000
Then just go over here.

37
00:02:57,000 --> 00:02:59,000
Just go to the again timings.

38
00:03:01,000 --> 00:03:02,000
And.

39
00:03:04,000 --> 00:03:07,000
Go to the numeric subtraction.

40
00:03:07,000 --> 00:03:10,000
So over here, my time.

41
00:03:11,000 --> 00:03:13,000
Subtract it from this time.

42
00:03:14,000 --> 00:03:14,000
You got.

43
00:03:15,000 --> 00:03:19,000
The time of your system.

44
00:03:20,000 --> 00:03:21,000
Okay, So this is.

45
00:03:23,000 --> 00:03:26,000
Now just run it.

46
00:03:26,000 --> 00:03:29,000
Let's check what happened to it.

47
00:03:30,000 --> 00:03:32,000
So right now.

48
00:03:34,000 --> 00:03:35,000
Just put some value.

49
00:03:35,000 --> 00:03:41,000
Let's say I want to check for 15 that is user defined and when.

50
00:03:43,000 --> 00:03:47,000
Current number is 15, 15, 15, matching after number of iterations.

51
00:03:47,000 --> 00:03:48,000
13.

52
00:03:48,000 --> 00:03:49,000
So over here.

53
00:03:50,000 --> 00:03:53,000
We got the temperature, not temperature.

54
00:03:53,000 --> 00:04:03,000
It is the time, as you see when I run this right now, time is one because in this case, the range

55
00:04:04,000 --> 00:04:07,000
is 0 to 100 random number.

56
00:04:07,000 --> 00:04:09,000
And the matching function.

57
00:04:11,000 --> 00:04:11,000
Liked

58
00:04:14,000 --> 00:04:25,000
the match we will find easily if I just put 10,000 in this and when I again hit on run button, as you

59
00:04:25,000 --> 00:04:30,000
see five seconds, it will take right now six seconds.

60
00:04:30,000 --> 00:04:35,000
It will take five seconds, three seconds, 12 seconds.

61
00:04:35,000 --> 00:04:36,000
Okay.

62
00:04:36,000 --> 00:04:47,000
And right now, if I just make it more, then in this case, the time is 141 711 eight seconds.

63
00:04:47,000 --> 00:04:57,000
So this is how you can work with time function or how you can check how much time it will take to execute.

64
00:04:59,000 --> 00:05:00,000
Your code.

65
00:05:00,000 --> 00:05:02,000
You just put your code inside this.

66
00:05:02,000 --> 00:05:04,000
This tick count.

67
00:05:04,000 --> 00:05:06,000
If you just put.

68
00:05:06,000 --> 00:05:08,000
Control H.

69
00:05:08,000 --> 00:05:11,000
It is in milliseconds.

70
00:05:12,000 --> 00:05:13,000
Over here.

71
00:05:14,000 --> 00:05:17,000
Uh, return the value in milliseconds.

72
00:05:18,000 --> 00:05:21,000
The time or here it is not seconds.

73
00:05:21,000 --> 00:05:22,000
It is in milliseconds.

74
00:05:22,000 --> 00:05:23,000
Okay.

75
00:05:23,000 --> 00:05:25,000
So it is one one eight milliseconds.

76
00:05:25,000 --> 00:05:28,000
So this is how you can check.

77
00:05:29,000 --> 00:05:31,000
So this is all about today.

78
00:05:31,000 --> 00:05:32,000
Thank you.

