05-06-2013 05:58 AM
Hello,
I'm trying to do create a VI, where in a tab control(find the attached vi) should be visible. Tab control is arranged as to work like a two button dialogue box.
working principle : loop should be continues. when I press left navigation key button names 'Yes" should be focused, when I press right navigation key button named "No" should be focused. This is working fine. But when I press Enter key focused button should be on for a moment and tab control should go invisible and the while loop should be stopped. This I couldn't achieve.
I'm hereby attaching my vi, please go through it and suggest the changes to meet the requirement.
Thanking you,
sushmith
05-06-2013 06:38 AM
try connecting the loop termination point to a true in the "return" case.
this will solve the problem you discribe.
05-06-2013 07:31 AM
You are making this VI way more difficult than it needs to be.
05-06-2013 07:48 AM
Hi,
this thread seems to be a continuation from that one...
Sushmith: why did you create the next thread?
05-06-2013 07:54 AM
@GerdW wrote:
Hi,
this thread seems to be a continuation from that one...
Sushmith: why did you create the next thread?
Oh yes. With information found in that thread I should add that you have your main VI call this VI. SubVIs are a great way to reuse code, breaks up code segments, and makes programming so much easier.
05-06-2013 11:46 PM
Hello GerdW,
In the previous thread I came to know that I have to create a sub Vi which acts as 2 button dialog box. So I paused the perticular task there itself and started focusing on creating a sub vi.
As I was creating 2 button dialog box vi I faced while loop handling problem and hence I had to ask the people who are having more knowledge in labview. Since the problem was different here i thought of creating a new thread.
As you said creating a SubVI is a basic step in labview, but unfortunately i'm not aware of it and very fresher to labview. Hence I need your support in creating the same.
Thanking you,
sushmith
05-06-2013 11:59 PM - edited 05-07-2013 12:00 AM
Hello crossrulz,
Thanks for the vi. Now I would like to use it in my main VI. I got an option to create it as sub vi by going to edit--> create SubVI. I gave an icon like the file attached.
Default 2 button dialog box will have only 4 ports, i.e I have to connect the string constant to display the dialog required , and two more string constant for the names of 2 buttons. One more will be a output which gives us true or false depending on the button pressed. I want to use this SubVI like the default 2 button dialog. But the icon i just got after creating SubVI needs me to connect external buttons,reference etc. please help.
Thanking you,
sushmith
05-07-2013 12:49 AM
You can just insert crossrulz VI as a subVI. You only have to insert it in your VI. ( right mouse button on block diagram, select a VI..., browse to location of crossrulz VI and select it. )
I think you need to add the in and outputs to the connector pane.
to quote GerdW from the last topic.
@GerdW wrote:
Hi sushmith,
it seems you really should take the online courses offered by NI: here or here. There are even more resources available, LabVIEW comes with a huge example base...
Creating a subVI is a basic step, you really should know how to do that!
I hope this helps you.
05-07-2013 01:22 AM
Hello,
Hello I did it.. But how can I control the visibility of the dialog box?? when my condition is met, say I have a button, when the button is pressed then only dialog box should open and once the yes or no button is pressed it should close.. how can I achieve it?
Thanking you,
sushmith
05-07-2013 01:40 AM
On the front panel of the message box right click on the icon and select VI properties.
select in the combobox window aperence and then select dialog.
Then it will open when you call it and close if the VI is done.