Jump to content

Two calls of the same VI


Recommended Posts

Can someone help me?

I've been stuck for days with the same problem and I don't know what to do. In fact, my problem is that I have just started programming with Labview and sometimes it's difficult for me to find solution to my problems, so any help would be very appreciated.

PROBLEM: I have a VI. When I run it, in the first step of the program, I want to open the front panel of another VI to configure some things. When I close it, I want to continue with the execution of the main VI and later I will run the other VI.

I tried to make a property node to open the front panel (ex: Open Front panel try.vi) and it doen'st work beacause at the same time in another part of the main VI I have the try.vi included as a function to run it (beacuse I need some values given by the function to finalize my main program).

Can anyone help me?

Thank you very much. :headbang:

Link to comment

As I understand it, you want to call the same VI twice. In one case you want the front panel to open and in the other case you do NOT want the front panel to open. Well, there are two ways to do this.

One way is to setup the subvi node to behave differently for each call on the diagram. You right-click on the VI and select "sub-vi node setup". This will allow you to define how the VI will behave for that call and only that call of the VI. See images below:

post-2-1125949766.gif?width=400

post-2-1125949774.gif?width=400

The other way is to place a property node inside the sub-vi that controls the behavior. Then you can feed in a control wire that activates the proper behavior. The default behavior would be not to show the panel unless the boolean is set TRUE.

post-2-1125950347.gif?width=400

Link to comment
As I understand it, you want to call the same VI twice. In one case you want the front panel to open and in the other case you do NOT want the front panel to open. Well, there are two ways to do this.

One way is to setup the subvi node to behave differently for each call on the diagram. You right-click on the VI and select "sub-vi node setup". This will allow you to define how the VI will behave for that call and only that call of the VI. See images below:

post-2-1125949766.gif?width=400

post-2-1125949774.gif?width=400

The other way is to place a property node inside the sub-vi that controls the behavior. Then you can feed in a control wire that activates the proper behavior. The default behavior would be not to show the panel unless the boolean is set TRUE.

post-2-1125950347.gif?width=400

5997[/snapback]

Thank you very much for the information. I think I've managed to resolve my problem.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.