1
00:00:05,000 --> 00:00:05,000
Hello friends.

2
00:00:05,000 --> 00:00:13,000
Today I will explain you a function that is event structure that is available in LabVIEW.

3
00:00:13,000 --> 00:00:17,000
How to use this in your programming.

4
00:00:18,000 --> 00:00:23,000
So first, as you see over here, I just explain you.

5
00:00:24,000 --> 00:00:25,000
I just continuously run it.

6
00:00:26,000 --> 00:00:34,000
I just push it will increment by one every time when I push it and when I pop it, it will decrease

7
00:00:34,000 --> 00:00:35,000
every value.

8
00:00:35,000 --> 00:00:38,000
So let's do it.

9
00:00:38,000 --> 00:00:45,000
How we go For this particular function, you can create your own.

10
00:00:45,000 --> 00:00:53,000
Like in our microprocessor, we have push and pop instructions if you want to push in that case, in

11
00:00:53,000 --> 00:00:55,000
the case of eight five, you just.

12
00:00:57,000 --> 00:01:03,000
Decrease your location of stack pointer in the pop you will increase your.

13
00:01:05,000 --> 00:01:10,000
Stack position or addressing in the case of 8085 microprocessor.

14
00:01:10,000 --> 00:01:11,000
We can do that.

15
00:01:11,000 --> 00:01:12,000
Also.

16
00:01:12,000 --> 00:01:13,000
It is up to you.

17
00:01:13,000 --> 00:01:19,000
Right now I just use only one increment for push and one decrement for pop.

18
00:01:19,000 --> 00:01:24,000
Okay, so let's drop it and just go to the block diagram window.

19
00:01:24,000 --> 00:01:28,000
As you see over here, I just use a event structure.

20
00:01:28,000 --> 00:01:30,000
I just delete this.

21
00:01:32,000 --> 00:01:36,000
I just go to the structure or here.

22
00:01:36,000 --> 00:01:38,000
This is my event structure.

23
00:01:39,000 --> 00:01:40,000
Just drag and drop.

24
00:01:41,000 --> 00:01:47,000
In this case, you just need two buttons, like over here.

25
00:01:47,000 --> 00:01:49,000
This is my button.

26
00:01:50,000 --> 00:01:51,000
I make it push.

27
00:01:52,000 --> 00:01:53,000
I just make.

28
00:01:56,000 --> 00:02:04,000
Pushbutton in the case of microprocessor, we know that in the case of push instruction, we just decrease.

29
00:02:04,000 --> 00:02:08,000
We just decrease two locations of address.

30
00:02:08,000 --> 00:02:09,000
Okay.

31
00:02:09,000 --> 00:02:14,000
So we just do similar type of case in this case also.

32
00:02:14,000 --> 00:02:16,000
So over here, this is my pop.

33
00:02:19,000 --> 00:02:19,000
This is my pop.

34
00:02:20,000 --> 00:02:27,000
Now I have a meter also, which will show me the location.

35
00:02:28,000 --> 00:02:30,000
Is increased or decreased.

36
00:02:31,000 --> 00:02:35,000
Okay, so over here, let's see.

37
00:02:35,000 --> 00:02:38,000
It is up to 100 locations are there.

38
00:02:40,000 --> 00:02:47,000
So now I just put also a visible digital label over here.

39
00:02:48,000 --> 00:02:50,000
So you just.

40
00:02:55,000 --> 00:03:01,000
So over here I have my meter in the case of event structure.

41
00:03:01,000 --> 00:03:03,000
You just go to the edge.

42
00:03:05,000 --> 00:03:06,000
Right click.

43
00:03:07,000 --> 00:03:10,000
Edit event handled by this case.

44
00:03:10,000 --> 00:03:14,000
As you see over here, this is my first okay button.

45
00:03:14,000 --> 00:03:16,000
That is my push.

46
00:03:16,000 --> 00:03:19,000
I just go with value change.

47
00:03:19,000 --> 00:03:26,000
When the value change is there, you can do any like if you just.

48
00:03:27,000 --> 00:03:28,000
Key down, key up.

49
00:03:28,000 --> 00:03:30,000
You can go with any function.

50
00:03:30,000 --> 00:03:33,000
Right now I just use value change.

51
00:03:33,000 --> 00:03:34,000
Just press.

52
00:03:34,000 --> 00:03:35,000
Okay.

53
00:03:36,000 --> 00:03:38,000
So over here as you see.

54
00:03:38,000 --> 00:03:38,000
Okay.

55
00:03:38,000 --> 00:03:40,000
Button value change function created.

56
00:03:41,000 --> 00:03:43,000
Right now I just go to.

57
00:03:44,000 --> 00:03:45,000
Over here.

58
00:03:45,000 --> 00:03:46,000
This meter.

59
00:03:46,000 --> 00:03:49,000
I just use local variable in this case.

60
00:03:49,000 --> 00:03:52,000
So create a local variable for this.

61
00:03:53,000 --> 00:03:56,000
I want to just change the value.

62
00:03:56,000 --> 00:04:00,000
So in this case, just drag it to over here.

63
00:04:01,000 --> 00:04:02,000
Just copy it.

64
00:04:03,000 --> 00:04:11,000
In this case, as we know, in the case of push button, we decrease the stack by two.

65
00:04:11,000 --> 00:04:15,000
So just make it change to retype.

66
00:04:15,000 --> 00:04:20,000
And over here I just put a increment to increment in this case.

67
00:04:26,000 --> 00:04:28,000
So it will.

68
00:04:29,000 --> 00:04:32,000
In the case of push, we just decrease, not increase.

69
00:04:32,000 --> 00:04:36,000
So I just go with decrement function.

70
00:04:40,000 --> 00:04:47,000
In the case of Bush, he has decreased the address of stack by two.

71
00:04:47,000 --> 00:04:48,000
So this is my function.

72
00:04:49,000 --> 00:04:54,000
So next, in the case of pop, we just add another case.

73
00:04:55,000 --> 00:04:57,000
It is for okay button.

74
00:04:57,000 --> 00:04:57,000
That is.

75
00:04:57,000 --> 00:04:59,000
This is my push button.

76
00:05:00,000 --> 00:05:02,000
Okay, So just go to my button.

77
00:05:02,000 --> 00:05:06,000
I just copy this function in this case.

78
00:05:07,000 --> 00:05:16,000
In the case of pop, I just increment by two not in place of decrement, I just increment by two.

79
00:05:16,000 --> 00:05:18,000
You can use any function right now.

80
00:05:19,000 --> 00:05:20,000
Just let's say.

81
00:05:21,000 --> 00:05:22,000
Add function I'm using.

82
00:05:24,000 --> 00:05:24,000
Or here.

83
00:05:27,000 --> 00:05:28,000
It is increment by.

84
00:05:31,000 --> 00:05:33,000
So this is my case.

85
00:05:34,000 --> 00:05:37,000
It will change the value of this function.

86
00:05:37,000 --> 00:05:40,000
So my function is created over here.

87
00:05:40,000 --> 00:05:42,000
You can also put.

88
00:05:43,000 --> 00:05:43,000
Push.

89
00:05:45,000 --> 00:05:46,000
And this is my pop.

90
00:05:48,000 --> 00:05:49,000
Let's check what happened.

91
00:05:50,000 --> 00:05:53,000
So when I hit on continuous run.

92
00:05:54,000 --> 00:05:58,000
Push, as you see it is decremented by two.

93
00:05:58,000 --> 00:06:00,000
So let's first increment it.

94
00:06:01,000 --> 00:06:04,000
So pop, pop, pop.

95
00:06:04,000 --> 00:06:10,000
It will increase the stack address, as you see over here.

96
00:06:11,000 --> 00:06:15,000
Then I just push it will decrease the stack address.

97
00:06:16,000 --> 00:06:20,000
As many as time I am pushing it.

98
00:06:20,000 --> 00:06:23,000
So in this case also.

99
00:06:24,000 --> 00:06:25,000
You just.

100
00:06:26,000 --> 00:06:28,000
Right click over here.

101
00:06:28,000 --> 00:06:31,000
You can change the mechanical action over here.

102
00:06:31,000 --> 00:06:37,000
In the case of pushbuttons, we have six types of mechanical action like switch.

103
00:06:37,000 --> 00:06:42,000
When pressed in the default case, it is latch when released.

104
00:06:43,000 --> 00:06:46,000
So there are six mechanical actions which, when pressed.

105
00:06:47,000 --> 00:06:49,000
Switch when released.

106
00:06:49,000 --> 00:06:51,000
Switch until released.

107
00:06:52,000 --> 00:06:54,000
Latch when pressed.

108
00:06:54,000 --> 00:06:56,000
Latch when released.

109
00:06:56,000 --> 00:06:58,000
Latch until released.

110
00:06:58,000 --> 00:07:03,000
It is up to you which function you want in your application.

111
00:07:04,000 --> 00:07:08,000
According to your application, you can go with this function.

112
00:07:08,000 --> 00:07:11,000
As you see in this case, it is latched.

113
00:07:11,000 --> 00:07:14,000
When released, it is latched in this case.

114
00:07:15,000 --> 00:07:15,000
Okay.

115
00:07:15,000 --> 00:07:18,000
So I just make it normal.

116
00:07:18,000 --> 00:07:25,000
So this is how you can go with event structure using push and pop instruction.

117
00:07:25,000 --> 00:07:28,000
You can create any event in the event structure.

118
00:07:28,000 --> 00:07:32,000
It is waiting for the event to occur basically.

119
00:07:32,000 --> 00:07:37,000
So this is how you can use event structure.

120
00:07:37,000 --> 00:07:38,000
Thank you.

