1
00:00:10,000 --> 00:00:11,000
Hello, friends.

2
00:00:11,000 --> 00:00:18,000
Today we discuss how to use mathematical function exponential.

3
00:00:20,000 --> 00:00:30,000
In Python and how cool that python code in left for that purpose I just go to my.

4
00:00:32,000 --> 00:00:35,000
Holder that is already created.

5
00:00:36,000 --> 00:00:44,000
So over here in the python integration by code, I already create an exponential.

6
00:00:45,000 --> 00:00:45,000
God.

7
00:00:45,000 --> 00:00:49,000
So I just call this code in my python.

8
00:00:51,000 --> 00:00:53,000
3.9.0.

9
00:00:53,000 --> 00:00:55,000
So I just open.

10
00:00:57,000 --> 00:00:57,000
As you see.

11
00:00:58,000 --> 00:00:59,000
Or here.

12
00:01:01,000 --> 00:01:02,000
This is my pie code.

13
00:01:04,000 --> 00:01:13,000
So this is my code and this I just import and it function math from the python.

14
00:01:14,000 --> 00:01:17,000
So I just use import math right now.

15
00:01:17,000 --> 00:01:20,000
Initially, let's say a result is zero.

16
00:01:20,000 --> 00:01:28,000
I define a function exponent exponent and the variable name is x.

17
00:01:29,000 --> 00:01:34,000
Intended function, the end result is equal to met exp.

18
00:01:34,000 --> 00:01:42,000
This EXP function is available in Python library that is in mathematics.

19
00:01:42,000 --> 00:01:46,000
This method will call this function x.

20
00:01:46,000 --> 00:01:53,000
Then I want to just print result to check the result, then return the result and I want to check the

21
00:01:53,000 --> 00:01:55,000
result for exponent one.

22
00:01:55,000 --> 00:01:59,000
So I just run it and just check it.

23
00:02:00,000 --> 00:02:05,000
As you see, the value is 2.71828182845.

24
00:02:06,000 --> 00:02:09,000
So let's say I want to check the value for.

25
00:02:11,000 --> 00:02:12,000
Exponential value.

26
00:02:12,000 --> 00:02:16,000
So in that case, I just turn it so it asks me to save.

27
00:02:17,000 --> 00:02:19,000
As you see, the value is 148.

28
00:02:20,000 --> 00:02:21,000
Okay.

29
00:02:21,000 --> 00:02:27,000
So this is how you can find out the exponential function of a variable.

30
00:02:27,000 --> 00:02:30,000
So you call this and like view.

31
00:02:30,000 --> 00:02:33,000
I just make few steps.

32
00:02:34,000 --> 00:02:41,000
So first I just remove this because I do not require this at the time.

33
00:02:42,000 --> 00:02:43,000
Just delete this.

34
00:02:45,000 --> 00:02:49,000
So this is my function of Python.

35
00:02:50,000 --> 00:02:51,000
Four.

36
00:02:52,000 --> 00:02:53,000
Exponential.

37
00:02:53,000 --> 00:02:56,000
So I just save it, control it.

38
00:02:56,000 --> 00:02:57,000
Close this.

39
00:02:58,000 --> 00:03:05,000
I just go to my folder and over here this is my exponent vi.

40
00:03:05,000 --> 00:03:09,000
So I just use this as a sub vi in lab view.

41
00:03:11,000 --> 00:03:15,000
To direct the buck.

42
00:03:15,000 --> 00:03:17,000
So it will take some time.

43
00:03:19,000 --> 00:03:20,000
As you see.

44
00:03:26,000 --> 00:03:28,000
Right now it is loading.

45
00:03:33,000 --> 00:03:37,000
So as you see over here, Control D.

46
00:03:39,000 --> 00:03:39,000
So that.

47
00:03:41,000 --> 00:03:43,000
Front panel and block diagram.

48
00:03:44,000 --> 00:03:45,000
It comes together.

49
00:03:48,000 --> 00:03:50,000
It takes some time.

50
00:03:51,000 --> 00:03:58,000
So as you see over here, this is my code to call the python code.

51
00:03:58,000 --> 00:04:00,000
That is exponent dot pi.

52
00:04:00,000 --> 00:04:04,000
So I just want to change this subtraction to exponent.

53
00:04:05,000 --> 00:04:10,000
So I just copy copy it.

54
00:04:10,000 --> 00:04:14,000
And I just place this over here.

55
00:04:15,000 --> 00:04:30,000
It will call that exponent file and I want to change this subtraction to x p so that it will call exponent

56
00:04:30,000 --> 00:04:31,000
function.

57
00:04:31,000 --> 00:04:33,000
So let's check.

58
00:04:35,000 --> 00:04:44,000
So right now C user sounds on the comment python by code exponent so it will provide python.

59
00:04:44,000 --> 00:04:47,000
But to my VA.

60
00:04:47,000 --> 00:04:49,000
So I just save it.

61
00:04:50,000 --> 00:04:51,000
Close it.

62
00:04:52,000 --> 00:04:53,000
I just.

63
00:04:54,000 --> 00:04:56,000
Create a new VA.

64
00:04:56,000 --> 00:05:01,000
So I just go to my folder, go back and over here.

65
00:05:01,000 --> 00:05:05,000
Let's see, I'm just copy this VA.

66
00:05:07,000 --> 00:05:10,000
And this is my XP.

67
00:05:12,000 --> 00:05:14,000
Exponent via OC.

68
00:05:14,000 --> 00:05:16,000
I just open it.

69
00:05:18,000 --> 00:05:20,000
Ignore so or here.

70
00:05:20,000 --> 00:05:23,000
Control right now.

71
00:05:23,000 --> 00:05:26,000
The already created via.

72
00:05:26,000 --> 00:05:29,000
So I have to just change this.

73
00:05:30,000 --> 00:05:36,000
So VA control B and I want to just call the exponent function over here.

74
00:05:37,000 --> 00:05:43,000
So in this case I have only one variable, so I just delete this control.

75
00:05:43,000 --> 00:05:45,000
B minimize this.

76
00:05:46,000 --> 00:05:48,000
So this is my.

77
00:05:51,000 --> 00:05:55,000
Just clean up the wires.

78
00:05:58,000 --> 00:05:59,000
As you see over here.

79
00:05:59,000 --> 00:06:01,000
So in my case.

80
00:06:03,000 --> 00:06:05,000
The service.

81
00:06:06,000 --> 00:06:07,000
Or here.

82
00:06:09,000 --> 00:06:11,000
End up by code.

83
00:06:12,000 --> 00:06:16,000
So I have to just drag and drop.

84
00:06:19,000 --> 00:06:21,000
Just open this.

85
00:06:22,000 --> 00:06:23,000
Go to this.

86
00:06:23,000 --> 00:06:26,000
Drag and drop this file.

87
00:06:27,000 --> 00:06:27,000
Do.

88
00:06:29,000 --> 00:06:34,000
Or here, because this is my guy, as you see, he is there.

89
00:06:35,000 --> 00:06:44,000
So just connect to the module part and just go to the file and just type the function name.

90
00:06:45,000 --> 00:06:50,000
Just copy it because this function name is available in py code.

91
00:06:51,000 --> 00:06:54,000
So I just copy over here.

92
00:06:55,000 --> 00:06:58,000
As you see control, you minimize it.

93
00:06:58,000 --> 00:07:01,000
So in this case, my variable is floating type.

94
00:07:01,000 --> 00:07:07,000
So let's say I want to check the exponent of 2.11.5.

95
00:07:07,000 --> 00:07:09,000
You can check out.

96
00:07:09,000 --> 00:07:19,000
So over here e x p of x, i will get so control as control dx.

97
00:07:19,000 --> 00:07:24,000
So let's say I want to check the result for different values.

98
00:07:24,000 --> 00:07:27,000
So first I want to check for one.

99
00:07:27,000 --> 00:07:28,000
So when I hit on run button.

100
00:07:31,000 --> 00:07:35,000
As you see, 2.71828.

101
00:07:35,000 --> 00:07:42,000
If you want more values or you want to increase the range in that case, just stop it.

102
00:07:43,000 --> 00:07:45,000
Just go to properties.

103
00:07:47,000 --> 00:07:51,000
And over here you can set a display format.

104
00:07:51,000 --> 00:07:54,000
So right now, only six digits are there.

105
00:07:54,000 --> 00:07:57,000
If you want more digits, you just put.

106
00:07:57,000 --> 00:08:02,000
Okay, as you see or here I got the 15 values.

107
00:08:02,000 --> 00:08:05,000
So let's again run it.

108
00:08:05,000 --> 00:08:15,000
I want to check for two, three, four, five, six, seven, eight, 910 exponent oh ten is this.

109
00:08:15,000 --> 00:08:22,000
So this is how you can work with exponential function in lab view using python code.

110
00:08:23,000 --> 00:08:24,000
Thank you.

