1
00:00:07,000 --> 00:00:20,000
Friends, today I just show you how to digitally generate a signal using any DAC devices.

2
00:00:20,000 --> 00:00:27,000
So over here, as you see, this is my National Instruments 6001 DAC card.

3
00:00:27,000 --> 00:00:33,000
As you see over here, these are my analog pin.

4
00:00:33,000 --> 00:00:37,000
A stands for analog Pin analog input.

5
00:00:37,000 --> 00:00:41,000
A0 stands for analog output as you see over here zero and one.

6
00:00:41,000 --> 00:00:44,000
Two analog output ports are there.

7
00:00:44,000 --> 00:00:50,000
Using the datasheet of this DAC card you can find out how many analog pins are there.

8
00:00:50,000 --> 00:00:53,000
How many analog output pins are there?

9
00:00:53,000 --> 00:00:55,000
How many analog input pins are there?

10
00:00:55,000 --> 00:01:04,000
So on the other side, as you see over here, there is a d I o digital input output pins.

11
00:01:04,000 --> 00:01:17,000
You can use these digital pins as an input or as a output means let's say in the port 0PO dot x port

12
00:01:17,000 --> 00:01:19,000
zero pin zero.

13
00:01:19,000 --> 00:01:24,000
You can configure it as a input or you can configure it as a output.

14
00:01:24,000 --> 00:01:25,000
Okay.

15
00:01:25,000 --> 00:01:36,000
So first I just generate a digital signal using Matlab Data Acquisition Toolbox with the help of this

16
00:01:36,000 --> 00:01:37,000
DAC card.

17
00:01:37,000 --> 00:01:43,000
So first I just need to connect this device with my PC.

18
00:01:43,000 --> 00:01:49,000
So first I just show you in the Measurement and Automation Explorer.

19
00:01:49,000 --> 00:01:57,000
As you see over here, there is a broken arrow on the device USB 6001 when I just connect this device.

20
00:02:00,000 --> 00:02:03,000
Over here it is now connected.

21
00:02:03,000 --> 00:02:05,000
So I just minimize this one.

22
00:02:05,000 --> 00:02:13,000
So you need to acquire or you need to program using Simulink.

23
00:02:13,000 --> 00:02:17,000
This is my Simulink window over here.

24
00:02:17,000 --> 00:02:20,000
I just need to generate a signal.

25
00:02:20,000 --> 00:02:32,000
So for that purpose I just drag I just show you how to generate a digital signal using National Instruments.

26
00:02:32,000 --> 00:02:33,000
Descartes.

27
00:02:33,000 --> 00:02:43,000
So over here, as you see, I just connect the pin number zero with the positive pin of the LED.

28
00:02:43,000 --> 00:02:48,000
And over here I have a ground that is black pin.

29
00:02:48,000 --> 00:02:51,000
I just connect it to the negative pin of the LED.

30
00:02:51,000 --> 00:03:00,000
I just use a breadboard as you see the long wire of the LED is my positive pin and shorter one is my

31
00:03:00,000 --> 00:03:02,000
negative pin.

32
00:03:02,000 --> 00:03:04,000
Okay, so over here.

33
00:03:04,000 --> 00:03:08,000
Otherwise you just check the substrate.

34
00:03:08,000 --> 00:03:15,000
The lesser part is my positive one and the higher one is my negative one.

35
00:03:15,000 --> 00:03:17,000
So I just connect.

36
00:03:18,000 --> 00:03:20,000
So this is the hardware connection.

37
00:03:21,000 --> 00:03:27,000
Now in the software part I just drag this little output pin.

38
00:03:28,000 --> 00:03:34,000
And inside this I just select port zero line zero as on the hardware.

39
00:03:35,000 --> 00:03:35,000
Okay.

40
00:03:35,000 --> 00:03:39,000
If you want to go with this one pin I just select this one.

41
00:03:39,000 --> 00:03:46,000
And on the hardware pin I just connect it to pin number 1 or 0.

42
00:03:46,000 --> 00:03:50,000
Right now, as you see, this one is pin number one.

43
00:03:50,000 --> 00:03:51,000
So let's.

44
00:03:54,000 --> 00:03:55,000
Apply it.

45
00:03:57,000 --> 00:04:02,000
Now I just need a signal generator.

46
00:04:02,000 --> 00:04:06,000
In the Matlab we just go with pulse generator.

47
00:04:08,000 --> 00:04:10,000
Pulse generator is there.

48
00:04:10,000 --> 00:04:17,000
I just drag it and connect it to the DAC block.

49
00:04:17,000 --> 00:04:21,000
Okay, so now I just need to run it.

50
00:04:22,000 --> 00:04:23,000
Let's check what happened.

51
00:04:23,000 --> 00:04:26,000
It generates some error, as you see.

52
00:04:26,000 --> 00:04:28,000
It will ask me.

53
00:04:28,000 --> 00:04:37,000
The output of this pulse generator is double means floating value, and that card require a boolean

54
00:04:37,000 --> 00:04:37,000
value.

55
00:04:37,000 --> 00:04:40,000
So we need a data converter over here.

56
00:04:41,000 --> 00:04:45,000
So data type conversion we require over here.

57
00:04:46,000 --> 00:04:49,000
So just click on it.

58
00:04:50,000 --> 00:04:55,000
You just need to change the output should be boolean.

59
00:04:55,000 --> 00:05:04,000
In this case, apply it okay, now delete this wire.

60
00:05:05,000 --> 00:05:09,000
Connect from here to here.

61
00:05:09,000 --> 00:05:14,000
Now it will convert the double data into boolean.

62
00:05:14,000 --> 00:05:24,000
Let's check what happened to it when I click over here as you see right now, it is running and it is

63
00:05:24,000 --> 00:05:28,000
blinking because this is a pulse on off, on, off.

64
00:05:28,000 --> 00:05:33,000
It will generate to the output side.

65
00:05:33,000 --> 00:05:33,000
Okay.

66
00:05:33,000 --> 00:05:35,000
So I just stop it.

67
00:05:35,000 --> 00:05:41,000
Let's check change some values inside this pulse.

68
00:05:41,000 --> 00:05:44,000
As you see there is a phase delay.

69
00:05:44,000 --> 00:05:45,000
There is a pulse width.

70
00:05:45,000 --> 00:05:49,000
Let's say I want to change it to 50%.

71
00:05:50,000 --> 00:06:00,000
Let's check what happened to it when it is 50% on off on off.

72
00:06:01,000 --> 00:06:05,000
Okay, let's check again.

73
00:06:05,000 --> 00:06:10,000
Change it to change the time.

74
00:06:12,000 --> 00:06:13,000
Time period.

75
00:06:13,000 --> 00:06:14,000
Let's say 100 seconds.

76
00:06:20,000 --> 00:06:21,000
Again.

77
00:06:21,000 --> 00:06:22,000
On.

78
00:06:22,000 --> 00:06:22,000
Off.

79
00:06:22,000 --> 00:06:23,000
On.

80
00:06:23,000 --> 00:06:24,000
Off.

81
00:06:24,000 --> 00:06:34,000
In that case, the frequency changed as you see in the output side.

82
00:06:34,000 --> 00:06:45,000
So this is how you can generate digital signal using that card and a USB 6001 with the help of Matlab.

83
00:06:46,000 --> 00:06:46,000
Thank you.

