LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SubVI not loading front panel

Solved!
Go to solution

I've been messing with scripting and I've hit an issue where a dialog does not popup despite setting the sub vi to show the front panel when loaded. I call the prompt launcher from the main working VI, the prompt launcher vi configures the prompt with scripting, then I use the run vi invoke method from main working and the prompt front panel does not pop up.

Download All
0 Kudos
Message 1 of 6
(3,001 Views)

I intend to set up more complicated dialogs but for now it's simple.

0 Kudos
Message 2 of 6
(2,998 Views)
Solution
Accepted by topic author bghagar

This is from the Help for Run VI (I underlined the most relevant sentence).

Run VI Method

Short Name: Run VI

Requires: Base Development System

Class: VI Methods

To Use: Create a method.

Starts the VI execution, similar to the Run button. This method is different than calling a VI because it uses the current values of all front panel controls for execution rather than using data passed in through parameters. This method also ignores the Execution:Show Front Panel On Call property of a VI and the Execution:Close After Call property.

 

On the other side:

- open references only once

- you don't need to create local variables to use Font Name twice: just wire the control value to both property nodes (the same applies to the other text settings)

- I'm not sure it's needed in this case, but I prefer to close references after usage

- avoid using Expression Nodes unless you really want to clarify a very complex formula (but a commenting free label would be ok, in case)

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 3 of 6
(2,913 Views)

I was attempting to simplify the block diagram with the local variables and the expression nodes. I know race conditions with local variables can be avoided by writing once and using the LVs as reads, but I do remember something about expression nodes using more memory.

 

For opening and closing the references, I just haven't gotten that far. I know it needs to be cleaned up. I hadn't realized the run method didn't trigger the VI settings, I know RTFM. Thanks for the help!

 

I'm trying to make an AF script to generate a child message class with the do method and the parent message class (owned by the child actor) with read and write methods. The built in LV scripting only generates the child class. I also want it to modify the parent actor core to pass the child message class to the child actor for use in passing a message back up the tree.

0 Kudos
Message 4 of 6
(2,869 Views)

@bghagar wrote:

I was attempting to simplify the block diagram with the local variables and the expression nodes. I know race conditions with local variables can be avoided by writing once and using the LVs as reads, but I do remember something about expression nodes using more memory.

 

For opening and closing the references, I just haven't gotten that far. I know it needs to be cleaned up. I hadn't realized the run method didn't trigger the VI settings, I know RTFM. Thanks for the help!

 

I'm trying to make an AF script to generate a child message class with the do method and the parent message class (owned by the child actor) with read and write methods. The built in LV scripting only generates the child class. I also want it to modify the parent actor core to pass the child message class to the child actor for use in passing a message back up the tree.


Seems to me that you are confusing local variables, which are variables associated with objects on the front panel, with global variables, which are actual VIs that contain values that you want to use in different places.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 5 of 6
(2,853 Views)

I'll replace some with FGs eventually, I'm still learning scripting and kind of practicing with the whole dynamic custom prompt thing.

0 Kudos
Message 6 of 6
(2,833 Views)