Hello, friends.
Now we want to create a compound box or let's check first, will you?
What is compound?
Or here there is a compound automatic box available.
So I want to work with addition and multiplication for multiple variables.
So for that purpose, I just go to my folder four.
And over here I just copy this addition.
So, vi and a python code over here.
And in this, I want to work with more than two variables.
So for that purpose, I just go to my python cell and I want to just open the python code over here.
Just comment by configuration.
By code.
And this is my function.
And over here, as you see, the result is zero.
I just copy this.
Place it over here again.
And second is result one.
In this case, the addition function is there.
And for the addition, I just make more variables.
Let's say Z, comma a, comma, B, comma, c, let's say in this case I have X, Y, Z, and ABC variables.
And over here I want to just place Z plus A, plus V plus C, and I have this function and I just do
it for the multiplication also.
So let's say put it over here.
And over here, I just you might be like I just put multiply over here.
And in this case, result one is there.
I want to return back.
The result one, my function is ready, so I just save it, close it.
Go to the folder.
And over here this is a rename it to the compound
arithmetic.
So just.
You can check the spelling or here, I guess to go to the camp or you or you.
Andy So just rename it, let's say
rename to MP or you.
And so right now that is changed and also in the sub v, I want to change it.
So over here.
See you and.
C or B or U and the compound.
VI, I want to call this and over here this is again, I want to change through MP,
C or MP.
Okay.
It will go for multiple variables.
More than two.
So just save it, close it or do the VI.
And over here I just copy this place this.
And over here again, I just rename it.
Q MP compound.
VI just open it as you see over here.
I have only two variables because it is written for the two variables.
So control P right now.
So just delete this in place of this and also delete this because I need a combo box over here because
I work with addition and multiplication over here.
So.
Edit So put
addition
multiply.
Okay.
Just in this extra case.
Okay.
Make something fixed over here.
Let's say it is my default value.
Then I want to call the sub.
So just go over here.
And in this case,
just call this via this compound, via
this function.
Connect this combo box.
Connect the combo box.
As you see right now.
The number of variables are six.
So just put the number of variables control D over here.
I just copy this.
And the name of this is Z.
And again, I just copy this over here and this is my a value.
This is my B value and this is my C value.
Okay.
So right now just connect these all the previous different values, let's say over here A, this is
my B and this is my C and this is my Z over here.
Control You put it inside.
Control U okay.
So right now it is for multiple values.
Let's say I put two over here again.
I say one, two, oh, oh, and one.
So right now I want to just add all these.
So it will become or the result should be ten in this case.
As you see, the result is ten.
If I want to go multiply, it will give me a check.
Or maybe the function name multiply is different.
So that's why maybe the result is different.
Okay.
So as you see, addition is working properly, but multiplication is not working properly for that purpose.
I just go to the my code.
So just open python cell code.
So over here in the python python code, just open compound as you see.
M u l d e l y
the y it is okay, but the code in the code I just put a region over here.
So that's why it is not working.
I just change the operator inside this.
If I change the operator inside this, it will work properly.
Okay, so control as the code is ready, allows it right now.
If I run it right now, as you see, multiplication is also working.
So this is how you can create compound from.
Ten in five.
As you see over here, this is my compound function.
It is for this program is for six number of variables.
As you see, X, Y, Z and ABC are my input variables.
So this is how you can work with Python integration with live view.
Thank you.