Jump to content

BackButton


Sally

Recommended Posts

I am learning a lot from LAVA , I have seen a way how to connect Multi VI'S through one main . I was sooo happy to do that :) , but I want to complete my happieness and add back button to be back to the main VI , how? I have explored all topics here no thing related , give me plz idea :)

Yours,

Sally

Link to comment

QUOTE(Sally @ Apr 21 2007, 10:12 AM)

I am learning a lot from LAVA , I have seen a way how to connect Multi VI'S through one main . I was sooo happy to do that :) , but I want to complete my happieness and add back button to be back to the main VI , how? I have explored all topics here no thing related , give me plz idea :)

I am not sure, if I understand your question right, but *in my world* you don't need a back button, because, this functionality is availiable allmost automatically:

If you have set the SubVI behaviour in your main VI with "open when called", just check the "Close, if originally closed" checkbox, too and you'll get back to the Main VI, after your SubVI has finished. If you have set the VI appearance in the VI Properties Dialog to "Dialog", the called VI closes, after it has finished.

If you are using VI Server and call your *SubVIs* dynamically, want them to stay open, but bring the MainVI Window to front, you could use the "frontmost" property ...

Link to comment

thnx sir , but I guess u missunderstood me , my Main Vi has four buttons , the first called (Data 1) which is different Vi to extract data from DAQ , the second buttoon called (Data2) to calculate some thing in my DAQ , now if user want data 1 he will press on it but he can not return 2 main menu ! got it??

how can I back there 2 my main menu

Link to comment

QUOTE(Sally @ Apr 21 2007, 02:21 PM)

thnx sir , but I guess u missunderstood me , my Main Vi has four buttons , the first called (Data 1) which is different Vi to extract data from DAQ , the second buttoon called (Data2) to calculate some thing in my DAQ , now if user want data 1 he will press on it but he can not return 2 main menu ! got it??

how can I back there 2 my main menu

Sally, please post your code.

Tomi

Link to comment

Sally, i2dx's suggestion is right. In the Front Panel, you can place the 4 buttons in a cluster and you will control them by the cluster. Let's look at my VI. I have 4 buttons: Configure, Read, Write, Stop(to stop the VI).

4 buttons' Front panel

In the Block Diagram, you place the cluster into the Case Loop. Besides, you should place the Case loop inside a While loop with Shift Register in order to run the VI continuously back and forth. You make the case including cluster the Default Case so that the VI will hold on until you press any button. You can add 4 next cases 1,2,3,4 to make function of 4 buttons. The Cluster in the block diagram is wired to the function"Cluster to Array" and continued wiring to function "Search 1D Array" and in the end to the Shift Register of While loop like this:

4 buttons' Block Diagram- Case Default

The next cases could be like this:

4 buttons' Block Diagram - normal case

You should check the SubVI- here is "configure.vi"- 's property "Windows Appearance" to "Open when called" and check also the Originally check... so as to open the VI automatically. Your purpose is to return from SubVI(another VI) to the main VI. This is simple because you have to do only one thing: adding the stop or cancel button to the SubVI. Once you press that button, the SubVI automatically stop and return to the main VI.

The last VI should be the empty VI. That is the affection of Stop button in the main VI. It helps the main VI stop the while loop and end up the VI. Like this:

button Stop

It is easy. Plz do as I deal with this problem before.

Good luck!

PS: I uploaded this file by YOUSENDIT 'coz I dont know how to insert image. This uploading site will expire in 14 days. Sorry for the inconvenience.:(

Link to comment
  • 2 weeks later...

Join the conversation

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

Guest
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.