LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

subvi makes vi stop responding/ getting input form joystick?..

As the title says, I have a main VI that has a sub vi that handles a sort of menu, well every time the loop with the sub vi is given (True) to run, the whole vi stops responding...

 

I have the whole project here:https://www.dropbox.com/sh/4scza5u6zdzkdcq/AABd2ptsLu7LP-4mNB1z2IJDa   (It is hyperlinked, but If it bothers you, you may just copy and paste....)
But the main vi is JoystickExample - Copy.vi and the subvi is joytext

 

.I have attached a picture to show what I mean, I was messing around with the call by reference and stuff and none of those work. Any help would be appreciated.

Thanks

Brent Sancken

0 Kudos
Message 1 of 8
(2,689 Views)
There is a lot of code missing in your picture, but have you used execution highlighting to see where the code gets stuck?

Mike...

PS: You do realize that comparing a boolean value to "true" is the logical equivalent of a wire, right?

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 8
(2,660 Views)

That is why I included the project download so that it is possible to see the whole thing, altho I understand that since you dont have the joystick, you wont be able to see how it fully works but It is there.

0 Kudos
Message 3 of 8
(2,653 Views)
Plus right now I'm on my phone. Where at in the code - specifically - is the execution hanging?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 8
(2,649 Views)

It is something in the loop that stops it, If the loop is set not to run then it works..

0 Kudos
Message 5 of 8
(2,646 Views)
Do you, or do you not know how to use execution highlighting?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 8
(2,625 Views)

no, sorry. I am learning as I go with this program...

0 Kudos
Message 7 of 8
(2,609 Views)

OK Brent, not a problem. But you need to go through some of the online tutorials that NI offers.

To your current problem, when you have the block-diagram of your program open, you will see a button just below the menu bar that has a picture of a lightbulb on it. If you click on that it will "light up" to indicate that execution highlighting is on.

Now set the boolean constants that enables IO with the joystick set to true, and click the run buttoon. With execution highlighting on the code will run much slower, but you will be able to watch data bubble through the wires and tell when VIs that you call start and stop execution.

Before you try that, however, there is a call be reference node on the block diagram that you don't need -- and seem to be using incorrectly anyway. You can place the VI you are calling right on the block diagram and wire up its inputs and outputs.

Give that a try and then run your program with execution highlighting on. Make note of what VI starts running (has a big green arrow on its icon) but never stops. That is the VI we will want to look at next.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 8
(2,578 Views)