LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with "Run Vi" Invoke Node

Hello,

I have been having some trouble with the Run VI node. A button on the front panel dynamically lauches a VI. Which VI I lauch is selectable. Some of the VIs lauch right away without problem. Others require me to hit the button several times before they are lauched. I have a chain of "Set Control Values" before my RUN VI. There are no errors along this chain at all (not even at the end). There are no difference (that I can see...execution, opening) between the VIs that work fine and the ones that require multiple attempts.
Has anyone experienced something like this before or am I special?

Thanks in Advance,
Glen
0 Kudos
Message 1 of 11
(3,800 Views)
Hi,

The only thing I can think of is this.

When VI 1 is launched, the main loses focus (if it has a front panel). So
when you press inside the main, the first click it used to activate the
main, and you'll have to press again to initiate a button press. (You can
check this by looking at the title bar color.)

If that's not it, we'll need to look at the code to say anything else about
this.

Regards,

Wiebe.


"AstroMed Glen" wrote in message
news:5065000000080000005EC60000-1079301409000@exchange.ni.com...
> Hello,
>
> I have been having some trouble with the Run VI node. A button
> on the front panel dynamically lauches a VI. Which VI I lauch is
> selectable. Some of the VIs lauch right away without problem. Others
> requi
re me to hit the button several times before they are lauched.
I
> have a chain of "Set Control Values" before my RUN VI. There are no
> errors along this chain at all (not even at the end). There are no
> difference (that I can see...execution, opening) between the VIs
that
> work fine and the ones that require multiple attempts.
> Has anyone experienced something like this before or am I special?
>
> Thanks in Advance,
> Glen
0 Kudos
Message 2 of 11
(3,800 Views)
humm..not sure if I understand your order of events. First the main vi is open and has the focus, then I click the button on it, then the sub vi is lauched. It should lauch on top and have the focus. Instead, on the instances when it it does not work, when I hit the button, the main VI flashes real quick (loses focus and then gets it right back) as if the sub vi had been lauched, finished executing and closed all in a split second. I check to see if maybe the subvi was just hiding behind the main VI but no such luck.
Interestingly, all of this does not occur when I have the RUN VI node set to wait till done. However, I prefer not to have it this way as the two VIs are suppose to react with each other and the user is suppose to be able to use both.
0 Kudos
Message 3 of 11
(3,800 Views)
Good cal Wiebe!

I was drawing a blank on this one.

dropThroughClicks


Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 11
(3,800 Views)
Ben,

Exactly what effect does dropThroughClicks have?

Regards,

Wiebe.


"Ben" wrote in message
news:5065000000050000001D6A0100-1079395200000@exchange.ni.com...
> Good cal Wiebe!
>
> I was drawing a blank on this one.
>
> dropThroughClicks
>
>
> Ben
0 Kudos
Message 5 of 11
(3,800 Views)
Instead of clciking once to make the FP active and then clicking the second time to actuate the switch, one click makes the FP active AND actautes the switch.

Add

DropThroughClicks=True

to the ini file.
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 11
(3,800 Views)
Post some code and we will take a look.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 11
(3,800 Views)
Hello Glen,
The attached VI is calling 4 sub VIs and they run independent of the main VI. So the main VI does not wait for them to finish executing before continuing.

Sub1.vi and sub2.vi are always reset each time they are called and will not remember any data that is an input on their front panels.

Sub3.vi and sub4.vi will remember information that is typed into their front panels. You can try this by calling one of them from Main2.vi and typing something into the string control, closing the VI (using the switch on the front panel) and then calling it again.

Please look at the attached VI and see if it works out for you. If it does not work out for you, please let me know and we can continue to work on it.

Good luck and have a
good day!
Koninika
National Instruments.
0 Kudos
Message 8 of 11
(3,800 Views)
Ben,

Thanks. I put it in the ini once, but couldn't find it's effect. It's
actually right what I need!

Regards,

Wiebe.

"Ben" wrote in message
news:5065000000050000007A6A0100-1079395200000@exchange.ni.com...
> Instead of clciking once to make the FP active and then clicking the
> second time to actuate the switch, one click makes the FP active AND
> actautes the switch.
>
> Add
>
> DropThroughClicks=True
>
> to the ini file.
> Ben
0 Kudos
Message 9 of 11
(3,587 Views)
Koninika,

I ran your example program. It ran fine and as expected. I noticed one thing. Your launching vi (open fp and run), opens the FP first and then runs. I do not what to do this in that order. Some of my sub VIs lack menu and task bars and its looks bad when they have to resize in a flash. I put the FP open inside the sub vi but thats when I started having my problem. Maybe I can try FP open in between the run property and the reference close. I will try that now and repost later.

Glen
0 Kudos
Message 10 of 11
(3,800 Views)