LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a sub vi with control button as a whole

Hi, I am quite new to LabVIEW. So do bear with me.

 

I was trying to create a sub vi of a contril panel that i had create. mainly on toggle and button. I need to create this control panl into a sub vi so that it can be put into the main Vi which was not done by me. I was given a input to the main VI. When I try to create, the contrl button was not inside this Sub VI. Why? what had i done wrong and it is not possible to do it in this way.

 

Do refer to the attachment.

Download All
0 Kudos
Message 1 of 6
(2,867 Views)

I don't understand what your problem is.  Your subVI gets an input from the main VI.  The control value still needs to be passed from the main VI.

 

I also noticed that you have your Stop button being wired in.  I doubt you want that.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 6
(2,859 Views)

My sub vi is a control panel with many input by the user and not from main VI and I will have a set in command in the form of binary and then it will be made into sub vi and link to main VI . As the main VI control the microchip and hence send out my user request.  

 

The attachment show only part of my control panel. 

0 Kudos
Message 3 of 6
(2,852 Views)

Ah, I see now.

 

I think you are getting what you are going to get.  The control is tied to the front panel, so you can't just remove the front panel item when trying to make a subVI (I'm talking about the tool itself).  So you will need to delete the control from the main VI and disconnect the control from the connector pane on the subVI.  You are dealing with a corner case.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 6
(2,832 Views)

 

Hi, I do not really understand. Sorry for the lack of knowledge in LabVIEW. MAybe I brief you on my project , so that you can enlighten me further.

 

I have to come out with a control panel to control a locomotive. Control like speed,direction, stop and etc. It will be put into a set of binary say 1 byte as an output to send it to a booster circuit.

 

In order for me to send this binary out, it need to pass it to a main VI that is link to the booster circuit. From the main VI, I only have 1 input for me to connect, which I think a sub VI will slove this problem. However, If I will to disconnect the control from sub VI, how is it going to work? Or I shoud do another way round, make this SUB VI as a main VI now and the main VI run in the back end as Sub VI?

 

Correct me if I am wrong. 

0 Kudos
Message 5 of 6
(2,803 Views)

Have you gone through any of the tutorials that ship with LV? They might be helpful.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 6
(2,790 Views)