取消
显示结果 
搜索替代 
您的意思是: 

Opening dialog box through subpanel

已解决!
转到解答

Hello together,

I am currently teching myself LabView for my thesis. The short version is: I need to control a vacuum station with multiple valves. I already have a GUI with two switchable subVI's in a subpanel (Static ref because of the resulting .exe). The manual mode is going to be password protected, that's why I need two.

My main problem atm is, that I need a form of confirmation pop-up for the manual valve operation. This works perfectly fine in the main-manual.vi, but as soon as I try to use the Main.vi it stops working. I tried the two-button, three-button (because I thought it had to do with the root loop) and Prompt User Input functions.

 

It is very much possible that I am just missing a basic LV concept, any help on any problem or no-go's in my code is greatly appreciated!

 

Cheers

 

Philipp

0 项奖励
1 条消息(共 17 条)
1,458 次查看

Can't open your files because they're in LV 2025.

A lot of people on this board don't have the latest version of LabVIEW.

Backsave it to LV 2020 or earlier and a lot more people will be able to help you.

0 项奖励
2 条消息(共 17 条)
1,425 次查看

Ah thank you, did not know that. Here is everything in LV2018.

0 项奖励
3 条消息(共 17 条)
1,391 次查看
  1. The loop in "Main.vi" should have an event structure (and only load a VI into the subpanel as needed).  As it is, it's incessantly reloading a VI.
  2. You never start the VI that's loaded into the subpanel (that's why it doesn't work).
  3. The 'Stop' button in "main-manual.vi" won't work properly because there's no event case for it.  When you create an event case for it, be sure to move the terminal inside the case.

I think a simpler approach would be to use a tab control instead of a subpanel.

 

You might find the attached VI useful.  The control is a boolean called a Multi-Segment Pipe (it's not on the palette).  You can right-click on it to add/remove segments; and you can change size/shape/colors using standard methods.

4 条消息(共 17 条)
1,361 次查看

Thank you. I managed to get it somewhat working with a Event structure instead of the case structure and a "Call by reference" after my algin-sub.vi. I also fixed the other issues you mentioned.

Now I'm stuck again because I can only use each "mode" once. If I try to switch again the program freezes. I looked at the "Multiple VIs in a Subpanel.vi" example and it seems to be easily fixable if I adjust the example to be used in .exe's.

 

Thanks a lot (the MSP is indeed useful, cheers for that)!

 

Sadly I'll have to get back to my problem in a couple days. I've attached my half-solution again.

0 项奖励
5 条消息(共 17 条)
1,336 次查看

LabVIEW has the unusual property that code saved in the latest version cannot be opened by any older version.  [Think how frustrating it would be if you got an Excel Workbook/Spreadsheet made in the most recent version of Excel, and found you had to purchase a whole new Office Suite in order to read it!].

 

When new versions of LabVIEW are announced (such as LabVIEW 2025), most of the Early Adopters are students learning LabVIEW.  Experienced LabVIEW Developers, many of whom participate in these Forums to help others with their LabVIEW issues, are not running the latest versions (as it would make "today's code" incompatible with team members who hadn't upgraded yet).  In addition, this also means purchasing a new version of LabVIEW every year to get a few new features, a somewhat expensive proposition!

 

But do not despair, you can "help us to help you" by following these steps:

  1. Open your Project in (say) LabVIEW 2025.
  2. Select "My Computer" in the Project View (which essentially includes everything in the Project).
  3. Click on "File" (on the Toolbar" and choose "Save for Previous Version".  Select a version 3-5 years earlier (such as "LabVIEW 2021").

This will make a Folder that contains not only your code (saved for the chosen Previous Version) but also elements of the LabVIEW run-time, such as DAQmx, that you use.  This can be fairly large.  If you open the Folder containing your "Previous Version" code, you can navigate down the Folder list and find a folder containing only the code in your Project, without the run-time stuff.  This is probably sufficient to get us started in seeing what you are doing and being able to provide some help.

 

Before attaching a folder's-worth of files to the Forum, right-click the Folder and use "Send to:" and choose "Compressed (zipped) folder" which will make a .zip file that contains all the files in your folder, compressed.  We can all open .zip files.

 

Bob Schor

0 项奖励
6 条消息(共 17 条)
1,318 次查看

I cannot download that latest file.  The forum virus scan is having trouble with it.

Try reposting it.

0 项奖励
7 条消息(共 17 条)
1,310 次查看

Hope this works. No need to go in depth, I'll look into it myself if I find th time. Just wanted to post the progress for now.

0 项奖励
8 条消息(共 17 条)
1,291 次查看

I found a solution here. I don't know how I missed that during my previous searches.

 

Thanks again!

0 项奖励
9 条消息(共 17 条)
1,280 次查看
解答
接受人 PhlipPhlop

In Main VI:

  • The "Wait (ms)" function serves no purpose. The event structure will wait for an event.
  • You have an unused Timeout case in the event structure.

Furthermore, it's completely unnecessary to open them at all, as you already have static references.
You have created code that is convoluted, when simple code will suffice.

See attached.

10 条消息(共 17 条)
1,238 次查看