1
00:00:05,000 --> 00:00:07,000
Hello, friends today.

2
00:00:08,000 --> 00:00:19,000
I just go for a gamble game example in LabVIEW for that purpose you just need a.

3
00:00:20,000 --> 00:00:28,000
Dies first because on a dice we have a number from 1 to 6 mentioned.

4
00:00:28,000 --> 00:00:31,000
So I just go for random number.

5
00:00:31,000 --> 00:00:36,000
It will generate the numbers between 1 to 6.

6
00:00:36,000 --> 00:00:39,000
So for that purpose I just make upper bound.

7
00:00:40,000 --> 00:00:43,000
To six and lower bound.

8
00:00:43,000 --> 00:00:45,000
To one.

9
00:00:46,000 --> 00:00:52,000
So it will give me numbers between 1 to 6.

10
00:00:53,000 --> 00:00:54,000
Over here.

11
00:00:54,000 --> 00:00:55,000
We just got that number.

12
00:00:56,000 --> 00:00:58,000
So just create.

13
00:00:59,000 --> 00:01:00,000
Indicator over here.

14
00:01:01,000 --> 00:01:03,000
This will give you the current number.

15
00:01:06,000 --> 00:01:13,000
Current number and in this case, when there is a.

16
00:01:15,000 --> 00:01:18,000
We just compare our number with.

17
00:01:19,000 --> 00:01:25,000
The current number, so just use comparison this value.

18
00:01:26,000 --> 00:01:32,000
Current number value should be equal to the number that is placed by user.

19
00:01:32,000 --> 00:01:39,000
So create a control over here so it will give you the number.

20
00:01:40,000 --> 00:01:40,000
By user.

21
00:01:45,000 --> 00:01:51,000
Okay, so over here we have number by user and the current number when both are equal.

22
00:01:51,000 --> 00:01:56,000
In that case it will stop my loop.

23
00:01:56,000 --> 00:01:59,000
I'm just using while loop just connect it.

24
00:01:59,000 --> 00:02:09,000
And I also want to know that after how many loops I just got this.

25
00:02:10,000 --> 00:02:11,000
Comparison.

26
00:02:11,000 --> 00:02:18,000
Equal means minus the number by user equal to is equal to the current number.

27
00:02:18,000 --> 00:02:22,000
So let's create a indicator over here.

28
00:02:25,000 --> 00:02:29,000
In that case because the iteration will start from zero.

29
00:02:29,000 --> 00:02:31,000
I just go for a.

30
00:02:32,000 --> 00:02:33,000
Increment.

31
00:02:34,000 --> 00:02:35,000
By one function.

32
00:02:36,000 --> 00:02:42,000
So it will give me after how much value I got.

33
00:02:42,000 --> 00:02:48,000
The comparison equal means the number selected by the user.

34
00:02:48,000 --> 00:02:55,000
It is equal to the current number that is generated by the dice in how many after how many cases it

35
00:02:55,000 --> 00:02:55,000
will.

36
00:02:56,000 --> 00:02:59,000
Generate my given number.

37
00:02:59,000 --> 00:03:00,000
So over here.

38
00:03:01,000 --> 00:03:02,000
Match.

39
00:03:06,000 --> 00:03:11,000
So just go to your front panel.

40
00:03:13,000 --> 00:03:19,000
Or here we just put number by user and this is my current number.

41
00:03:19,000 --> 00:03:24,000
Let's convert this function to a more attractive way.

42
00:03:25,000 --> 00:03:27,000
So just go to.

43
00:03:28,000 --> 00:03:29,000
Numeric.

44
00:03:30,000 --> 00:03:37,000
And over here, I'm just using a meter in place of this and the maximum value is six and minimum value

45
00:03:37,000 --> 00:03:44,000
is one because these values are generated by my random number.

46
00:03:45,000 --> 00:03:47,000
Or you can say by the dice.

47
00:03:48,000 --> 00:03:48,000
Okay.

48
00:03:48,000 --> 00:03:50,000
And over here.

49
00:03:51,000 --> 00:03:51,000
Match.

50
00:03:52,000 --> 00:03:54,000
I'm just using again.

51
00:03:55,000 --> 00:03:56,000
Different function.

52
00:03:57,000 --> 00:04:01,000
So let's say I'm just using Gauge over here.

53
00:04:01,000 --> 00:04:08,000
It will show me after how many cases I just matched with the dice number.

54
00:04:08,000 --> 00:04:11,000
So again, this is my.

55
00:04:12,000 --> 00:04:14,000
Uh, cases may be anyone.

56
00:04:14,000 --> 00:04:16,000
Let's say it is up to 100.

57
00:04:19,000 --> 00:04:20,000
Or it may be more than 100.

58
00:04:20,000 --> 00:04:25,000
And over here, I just put my number.

59
00:04:25,000 --> 00:04:27,000
I just increase the size.

60
00:04:27,000 --> 00:04:29,000
Let's say I'm selecting five.

61
00:04:29,000 --> 00:04:32,000
Let's check after how.

62
00:04:33,000 --> 00:04:34,000
Many cases.

63
00:04:34,000 --> 00:04:43,000
I just got this number five through this dice, these 1 to 6 1.5.

64
00:04:43,000 --> 00:04:47,000
It is not possible in this case, so make it smaller.

65
00:04:48,000 --> 00:04:50,000
So when I just hit on run button.

66
00:04:52,000 --> 00:04:56,000
As you see or hear input number is five.

67
00:04:56,000 --> 00:04:58,000
It is equal to five.

68
00:04:58,000 --> 00:05:03,000
Let's check just make a digital display over here.

69
00:05:04,000 --> 00:05:10,000
After five cases, I just got the number five again when I hit on run button.

70
00:05:11,000 --> 00:05:12,000
After 24 cases.

71
00:05:12,000 --> 00:05:15,000
I just got the number five.

72
00:05:16,000 --> 00:05:20,000
Right now after three cases, I just got the number five.

73
00:05:21,000 --> 00:05:22,000
Again.

74
00:05:22,000 --> 00:05:26,000
In the first case, I got the number five from the dice.

75
00:05:28,000 --> 00:05:34,000
This is how you can create a gambling game through your labview.

76
00:05:34,000 --> 00:05:44,000
If you want to just go for more numbers or more cases, just this is for this is the case for a dice.

77
00:05:45,000 --> 00:05:46,000
Just save it.

78
00:05:49,000 --> 00:05:50,000
Dice game.

79
00:05:51,000 --> 00:05:56,000
Because in this case, we have only single dice.

80
00:05:57,000 --> 00:06:05,000
If you want to go for multiple dice, you just go for multiple dice.

81
00:06:05,000 --> 00:06:09,000
In that case, let's say on the one dice, I just got five.

82
00:06:09,000 --> 00:06:17,000
On the second dice, I just want or you just want a combination of two dice.

83
00:06:17,000 --> 00:06:25,000
In that case, you just create two dice and the combination of these two dice will generate a signal

84
00:06:25,000 --> 00:06:27,000
that will stop your loop.

85
00:06:27,000 --> 00:06:32,000
In the next video, we will just go for that case.

86
00:06:32,000 --> 00:06:33,000
So for today.

87
00:06:34,000 --> 00:06:35,000
This is all about.

88
00:06:36,000 --> 00:06:36,000
Thank you.

