LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Ring Items and associated Front Panels

Solved!
Go to solution

I am new with LabVIEW.  I have Ring Control which has about three different items.  I want to code my application so that when the User select a particular item from the Ring drop down box, a particular Front Panel window opens up, and when the user selects the second Ring item, then a different kind of Front Panel opens up.

 

How do I code that on my Block Diagram?

Thanks for any suggestion.

0 Kudos
Message 1 of 10
(3,462 Views)
Solution
Accepted by topic author Igho

Hi lgho,

 

connect your ring control with a case structure selector input. Create a case for each ring item and call a subVI in the case…

 

Hint: use an enum instead of the ring and you will get better selection options in the case structure!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 10
(3,454 Views)

Thanks, GerdW.  I truly appreciate.  How do I mark your suggestion as the solution here?  You actually provided me the answer to my question.

0 Kudos
Message 3 of 10
(3,424 Views)
Solution
Accepted by topic author Igho

Hi lgho,

 

How do I mark your suggestion as the solution here? 

I think it is an option in the Options field in the right upper corner of the message…

 

You actually provided me the answer to my question.

To say "thanks for your message" you can click the stars icon next to the Kudos counter, left of the message…

 

Both things are explained in the "quick intro" thread, linked in the Announcement section on top of the main LV forum page!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 10
(3,418 Views)

Hi GerdW, I thought I understood your suggested solution but when I tried implement it by using a simple vi, I am not able to accomplish.  I don't know what am doing wrong.  Attached are my simple VIs.  All I am trying to accomplish is that when I select the Enum item and run the vi, it should run the subvi associated with it.

 

I will appreciate if you could let me know what am doing wrong here.

Thanks

Igho

Download All
0 Kudos
Message 5 of 10
(3,366 Views)

Hi lgho,

 

when you watch your Test.vi with highlight debugging switched on you will see your VI does what you want!

 

Nevertheless I would:

- activate the enum items. It makes no sense to deactivate them, atleast to me…

- Maybe you want to show the front panel of your subVIs. If that's the case you should do so by setting their VI properties in the VI property dialog…

- Maybe those subVIs should stay open for a longer period of time. To do so it would make sense to have a loop in the subVIs waiting for some user interaction…

 

Most of these comments is handled in the beginner courses for LabVIEW offered for FREE on NI's website. Did you take them all?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10
(3,351 Views)

Hi GerdW

 

Thanks for your reply.  I don't know how my enum turned disabled.  I didn't do that intentionally.

 

Yes, I want to show the Front Panel of my Subvis, when called.  The only thing I changed on their VI Propeties was "Run when Open".  Now that you told me, I would check other VI Properties.

 

I haven't taken all the Beginner Courses, but will do.

 

Regards.

0 Kudos
Message 7 of 10
(3,328 Views)

Hi GerdW:

 

It's me again.  I did all that was suggested by you.  I had to change certain things at the "Windows Appearance" and "Execution" categories of the Subvis that are being called by the Main vi.  I also put a While Loop in the Block Diagram of the Subvis.  Yes, the Front Panels of the called Subvis pops when called and stay opened until closed, and that is what I want.

 

However, just one thing though.  When each of the Subvi is called, and the Front Panel opens, my Main Vi's Front Panel is still opened, making it two Front Panels opened at the same time, and that is not what I want.  I want the Front Panel of the called Subvi opend only, and not both calling Main Vi's Front Panel, and the Front Panel of the called Subvi opened at same time.

 

I thought I could do that by setting the "Modal" command in the Windows Category of the Called Subvi, but that didn't help.

 

I don't know if you have suggestion.

 

Thanks for everything.

0 Kudos
Message 8 of 10
(3,317 Views)

Hi lgho,

 

you can open and close a fpront panel using a method of the VI. So when you call your subVI you need to close the FP of your main VI programmatically. When the subVI finishes you need to open the FP of your calling main VI again…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 10
(3,315 Views)

Thanks, GerdW

0 Kudos
Message 10 of 10
(3,297 Views)