1
00:00:05,000 --> 00:00:06,000
Hello, friends.

2
00:00:06,000 --> 00:00:16,000
Today I just tell you how to go with different waveform with the help of an M function.

3
00:00:16,000 --> 00:00:22,000
So right now just go to New VI, Ctrl t

4
00:00:25,000 --> 00:00:39,000
or here in the ring and you just find out an M control or here you just edit it, select it, edit items.

5
00:00:44,000 --> 00:00:47,000
As you see over here right now.

6
00:00:47,000 --> 00:00:48,000
I just put.

7
00:00:49,000 --> 00:00:51,000
Let us say sign.

8
00:00:58,000 --> 00:01:03,000
Then I have another wave that is square wave.

9
00:01:06,000 --> 00:01:09,000
Then another way is triangular.

10
00:01:14,000 --> 00:01:15,000
Okay.

11
00:01:15,000 --> 00:01:17,000
And it is up to you.

12
00:01:17,000 --> 00:01:19,000
You can move.

13
00:01:20,000 --> 00:01:21,000
It up.

14
00:01:23,000 --> 00:01:24,000
It is up to you.

15
00:01:24,000 --> 00:01:24,000
Okay.

16
00:01:24,000 --> 00:01:27,000
And another function is, let's say select.

17
00:01:29,000 --> 00:01:31,000
You need to select first.

18
00:01:31,000 --> 00:01:34,000
So it is on the top.

19
00:01:36,000 --> 00:01:37,000
Okay.

20
00:01:38,000 --> 00:01:43,000
So this is my select over here in the data operations.

21
00:01:43,000 --> 00:01:46,000
I make it current value default.

22
00:01:46,000 --> 00:01:50,000
So in this I have three waveforms.

23
00:01:50,000 --> 00:01:54,000
I just now go to the structure.

24
00:01:56,000 --> 00:01:57,000
As you see over here.

25
00:01:57,000 --> 00:01:59,000
I just go to the.

26
00:02:00,000 --> 00:02:01,000
Signal processing.

27
00:02:02,000 --> 00:02:03,000
Waveform generation.

28
00:02:04,000 --> 00:02:05,000
I just lock it.

29
00:02:05,000 --> 00:02:07,000
I just use three waveforms.

30
00:02:07,000 --> 00:02:10,000
So first I use sine wave.

31
00:02:12,000 --> 00:02:13,000
I just place over here.

32
00:02:14,000 --> 00:02:17,000
So when I just connect my structure over here.

33
00:02:18,000 --> 00:02:21,000
In this case, there are four cases.

34
00:02:21,000 --> 00:02:22,000
First one is select.

35
00:02:22,000 --> 00:02:23,000
Second one is sign.

36
00:02:24,000 --> 00:02:27,000
You need to add on add case after.

37
00:02:28,000 --> 00:02:32,000
Add case after you just got all the cases.

38
00:02:32,000 --> 00:02:36,000
So I have these four cases right now.

39
00:02:36,000 --> 00:02:44,000
So in the triangular I just put triangular waveform and in the square wave I just put square waveform

40
00:02:44,000 --> 00:02:45,000
over here.

41
00:02:46,000 --> 00:02:54,000
So now in this case, I just need to create control for frequency.

42
00:02:56,000 --> 00:02:59,000
So this is the control for the frequency.

43
00:03:03,000 --> 00:03:07,000
Then amplitude create control for amplitude.

44
00:03:09,000 --> 00:03:12,000
I just put outside the structure.

45
00:03:16,000 --> 00:03:21,000
Next phase create control for the phase also.

46
00:03:22,000 --> 00:03:23,000
It is up to me.

47
00:03:24,000 --> 00:03:31,000
And over here, if you want to reset the signal offset duty cycle, it is up to you.

48
00:03:31,000 --> 00:03:34,000
Right now I just use only these three control signals.

49
00:03:35,000 --> 00:03:37,000
Then I just go to the sine wave.

50
00:03:37,000 --> 00:03:41,000
So over here, this is my frequency connect frequency over here.

51
00:03:41,000 --> 00:03:42,000
This is my amplitude.

52
00:03:42,000 --> 00:03:45,000
And over here this is my phase.

53
00:03:46,000 --> 00:03:48,000
Then just go to the triangular function.

54
00:03:48,000 --> 00:03:50,000
So this is my frequency.

55
00:03:51,000 --> 00:03:54,000
Amplitude, and this is my phase.

56
00:03:54,000 --> 00:03:57,000
So over here I got the waveform.

57
00:03:57,000 --> 00:03:58,000
Just connect it.

58
00:04:01,000 --> 00:04:06,000
Connect this and Squarewave over here.

59
00:04:07,000 --> 00:04:11,000
So right now, just close this over here.

60
00:04:11,000 --> 00:04:12,000
I just take a graph.

61
00:04:15,000 --> 00:04:16,000
So this is my graph.

62
00:04:18,000 --> 00:04:19,000
Connect this graph.

63
00:04:20,000 --> 00:04:31,000
Now, in the case of select, you need to put any value or let's say, make it default value.

64
00:04:31,000 --> 00:04:34,000
So let's say in the case of.

65
00:04:35,000 --> 00:04:40,000
This I just create or I just put.

66
00:04:41,000 --> 00:04:44,000
Any value that is, let us say zero.

67
00:04:44,000 --> 00:04:45,000
I want to.

68
00:04:47,000 --> 00:04:48,000
Send.

69
00:04:53,000 --> 00:04:55,000
So you need to change.

70
00:04:57,000 --> 00:04:58,000
So create.

71
00:05:02,000 --> 00:05:03,000
Constant over here.

72
00:05:04,000 --> 00:05:06,000
So it will generate this value.

73
00:05:07,000 --> 00:05:07,000
Okay.

74
00:05:08,000 --> 00:05:12,000
So over here we have different.

75
00:05:13,000 --> 00:05:14,000
Controls.

76
00:05:14,000 --> 00:05:16,000
Just change this controls.

77
00:05:18,000 --> 00:05:25,000
I want to just replace these controls with these dials or knobs.

78
00:05:25,000 --> 00:05:29,000
So right now I just use this dial for the frequency.

79
00:05:31,000 --> 00:05:36,000
And this frequency component I just put over here.

80
00:05:36,000 --> 00:05:39,000
And the maximum frequency, let's say 100.

81
00:05:40,000 --> 00:05:41,000
Amplitude.

82
00:05:42,000 --> 00:05:48,000
Again, I just replace this with now, let's say.

83
00:05:49,000 --> 00:05:50,000
Over here.

84
00:05:51,000 --> 00:05:51,000
This is my.

85
00:05:51,000 --> 00:05:52,000
No.

86
00:05:53,000 --> 00:05:54,000
This is my amplitude.

87
00:05:55,000 --> 00:05:58,000
I just place it over here.

88
00:05:58,000 --> 00:06:04,000
And the amplitude, maximum amplitude, let's say 100 and over here, this is my face again.

89
00:06:04,000 --> 00:06:06,000
I just replace it.

90
00:06:08,000 --> 00:06:10,000
Width dial.

91
00:06:10,000 --> 00:06:13,000
And the phase is, let's say 360.

92
00:06:16,000 --> 00:06:19,000
So this is my phase.

93
00:06:20,000 --> 00:06:22,000
I just make it large.

94
00:06:24,000 --> 00:06:27,000
So over here I have the waveform.

95
00:06:29,000 --> 00:06:37,000
In this case, based on the function, I just select different waveforms.

96
00:06:38,000 --> 00:06:41,000
So initially it is in the select mode.

97
00:06:42,000 --> 00:06:43,000
Let's run it.

98
00:06:44,000 --> 00:06:47,000
So it is not showing any value.

99
00:06:47,000 --> 00:06:48,000
So you need to just.

100
00:06:49,000 --> 00:06:50,000
Change the value.

101
00:06:50,000 --> 00:06:52,000
Let's say in this case it is triangular.

102
00:06:53,000 --> 00:06:55,000
Let's check what happened.

103
00:06:56,000 --> 00:06:59,000
So phase is zero initially.

104
00:06:59,000 --> 00:07:03,000
So as you see over here, I got the triangular value.

105
00:07:04,000 --> 00:07:07,000
And if you want to continuously run this.

106
00:07:08,000 --> 00:07:15,000
You just check the amplitude over here and over here you just check the frequency also.

107
00:07:16,000 --> 00:07:17,000
I'm just changing.

108
00:07:18,000 --> 00:07:19,000
And if you.

109
00:07:20,000 --> 00:07:21,000
Over here.

110
00:07:21,000 --> 00:07:24,000
Let's say this is the frequency and this is the phase.

111
00:07:25,000 --> 00:07:26,000
Just change.

112
00:07:27,000 --> 00:07:30,000
You just check the phase of the way.

113
00:07:31,000 --> 00:07:32,000
Right now.

114
00:07:32,000 --> 00:07:33,000
It is changing.

115
00:07:35,000 --> 00:07:36,000
Zero two, as you see.

116
00:07:37,000 --> 00:07:40,000
Just see the right hand or left hand.

117
00:07:43,000 --> 00:07:44,000
Over here.

118
00:07:44,000 --> 00:07:46,000
The phase is changing.

119
00:07:47,000 --> 00:07:53,000
Okay, So if you just want to go with another wave, just go with another wave.

120
00:07:53,000 --> 00:07:56,000
Let's say over here, we just got the square wave.

121
00:07:57,000 --> 00:08:00,000
This is the amplitude and this is the.

122
00:08:00,000 --> 00:08:06,000
So if you want to just also make this waveform graph.

123
00:08:09,000 --> 00:08:11,000
Just change from it.

124
00:08:11,000 --> 00:08:12,000
Auto scale.

125
00:08:12,000 --> 00:08:13,000
Auto scale.

126
00:08:13,000 --> 00:08:22,000
So the maximum value is ten and the minimum value is again, let's say minus ten.

127
00:08:24,000 --> 00:08:30,000
Okay, so the amplitude is maximum minimum.

128
00:08:30,000 --> 00:08:35,000
And over here, this is the phase right now for the continuous run.

129
00:08:35,000 --> 00:08:39,000
I just make it inside a.

130
00:08:40,000 --> 00:08:41,000
While loop.

131
00:08:41,000 --> 00:08:43,000
Create a stop button over here.

132
00:08:44,000 --> 00:08:46,000
Just go to the loop.

133
00:08:49,000 --> 00:08:50,000
Go to the block diagram.

134
00:08:50,000 --> 00:08:51,000
Run it again.

135
00:08:52,000 --> 00:08:54,000
As you see, it is running.

136
00:08:54,000 --> 00:08:57,000
And if you want to change the frequency.

137
00:08:58,000 --> 00:08:59,000
As you see.

138
00:09:01,000 --> 00:09:04,000
If you want to change the amplitude, it is up to you.

139
00:09:05,000 --> 00:09:07,000
And if you want to change the face.

140
00:09:08,000 --> 00:09:09,000
Like this.

141
00:09:10,000 --> 00:09:12,000
So it is very fast.

142
00:09:12,000 --> 00:09:15,000
So you just put a delay inside it also.

143
00:09:17,000 --> 00:09:18,000
Create constant.

144
00:09:20,000 --> 00:09:26,000
Let us say 100 milliseconds delay is there.

145
00:09:27,000 --> 00:09:32,000
If you want to just change the delay, also make a control for it.

146
00:09:35,000 --> 00:09:36,000
Change to control.

147
00:09:38,000 --> 00:09:43,000
As you see over here, we just got the control for delay.

148
00:09:44,000 --> 00:09:46,000
Right now, let's say it is 300.

149
00:09:47,000 --> 00:09:48,000
Run it again.

150
00:09:51,000 --> 00:09:54,000
So you just check the frequency.

151
00:09:55,000 --> 00:09:58,000
Just check the amplitude.

152
00:09:59,000 --> 00:10:06,000
Right now, you check the phase and you just change the waves.

153
00:10:06,000 --> 00:10:08,000
Also, right now, it is sine wave.

154
00:10:09,000 --> 00:10:14,000
Then again, select sine wave, square wave, triangular wave.

155
00:10:14,000 --> 00:10:20,000
This is how you can use function for different create different waveforms.

156
00:10:20,000 --> 00:10:22,000
This is all about today's lecture.

157
00:10:22,000 --> 00:10:23,000
Thank you.

