Hello, friends.
Today we will discuss for the subtraction code.
And by integration with for that purpose, I just go to my wife and I just open my python code.
So in the documents, python integration, python code, I already have this subtraction code.
I just open it already.
This is earlier.
It is created for addition.
Now I just make it subtraction.
As you see, the variables are X and Y.
And over here, the result is X minus Y.
Now I want to just check the result of this.
So print.
Result.
And now I want to just call the function that is subtraction.
Okay.
And I want to check for the values.
Let's say seven and the value of X is seven and the value of Y is two.
So I just save it and hit on down button.
As you see, seven minus two is equal to five.
So the code is working.
So I just remove this because for the lab view code, I didn't require this.
I didn't require this.
Also, I need only this.
So the result is zero.
And the function name is subtraction.
And the variable is X and Y and or.
Here result is.
X is equal to.
Credit is equal to X minus y, y and return result.
Okay, so I just save it.
Close it.
Then I just go to my subsection v, i basically it will provide the path.
So I didn't change anything.
I just over here, this is my current VI path.
This is my strip path.
This is my build path.
Append or here I want to change.
That is my location of this.
This is my subtraction.
Subtraction taught by the name of the mike, as you see over here.
This is my subtraction.
So I want to just put it in my own state over here.
And I also change the logo.
As you see in the name of addition, I just put subtraction over here.
Just.
Okay.
So let's run it.
So the path is C user known by time and lab integration by code subtraction taught by it is okay, so
close this, save this.
Then I go to my integration, python library integration.
I just copy this over here and just name it.
Rename subtraction subtraction underscore two.
Basically I want to go for two variables.
Name can be anything.
So I just open it.
Ignore.
I'm using the same visa.
There is no change.
I want to just change this right now.
I want to call the bio subtraction so I just minimize it.
So in the pi code or here there is my sub va so I want to just drag and drop over here.
This is my sub VI.
The program is same as one, so I just make it over here.
Connected module path.
Everything is same.
The input is x, y.
And X plus Y in the place of x plus y.
I want to put x minus y.
Alligator.
I just changed the name, not the operation.
And over here, I want to just put the function name as you be erased.
i0n it will call the subtraction function control you.
So I just go to my function and over here, just make the size.
Larger.
So it is visible to you all very clearly if you want to more size in that case put controls shift plus.
So as you see in the.
Over here.
This is increasing.
The size is increasing.
74, 79, 80.
Okay, so this is how you can change the size.
And over here, this is my x minus five.
Also, I want to change the size.
Okay.
So let's say the value is seven.
This is seven and this is two.
So let's check the result.
As you see, the programming is working perfectly.
So when I increase and when I increase the base one, I got the end minus eight is equal to two.
So this is how you can use subtraction program.
It is similar to my this code that is written in lab view for that purpose.
I just go for a loop for continuous reading, create a control for this.
And over here in the numeric value, this function applies my subtraction over here this is my x value.
It is my y variable.
And over here is my indicator.
So basically this program and this program are same.
So this is how you can call python code in lab view.
Thank you.