From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

while loop running sub vi

Hello all,
I have a bit of an issue. I have a while loop that i am using to pass control references to a subvi. It worked perfectly on my laptop, now that i put it on the end users computer i am having some issues. The control references are for buttons and indicators. Once i run the main program, it reads each one of the buttons and then jumps into the sub vi and never comes out. I thought if i used control references these would update in the sub vi. This is not what is happening. I will attach both vi's. any help is GGGGRRRRREEEEEAAAATTTTLLLLYYY Appreciated.
 
Thanks
Mike
0 Kudos
Message 1 of 8
(2,416 Views)
Here is the Subvi.
0 Kudos
Message 2 of 8
(2,411 Views)
We're still missing the global and a few custom controls so we cannot test run it. 😞
 
Overall, this VI is a nighmare to debug. None of the error clusters of your property nodes are connected, so you're flying completely blind. Can't you get rid of all these local varaibles, they serve no purpose. All these backwards wires are very confusing, especially if you put input connectors on the right side of the panel. Why are all your references coerced going to the subVI?
 
0 Kudos
Message 3 of 8
(2,400 Views)
I know it is a mess, this is my first full project and it just got away from me a little bit. In theory shouldnt it work?. Everything runs fine on my laptop, so I guess i dont understand why it wont work on the Desktop.
0 Kudos
Message 4 of 8
(2,394 Views)

The code you posted has a host of problems that could be causing the problem--only some of which were delineated in altenbach's post. However, I am willing to walk you through a design process that will result in something that is servicable. So let's start with the basics:

What is it that you want this program to do?

You seem to be controlling or testing something. What is the application?

Is this software going to be used in a production or R&D environment?

Who are your users?

With these questions answered we can take the next step and begin looking at program structures that get you to your goal.

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 5 of 8
(2,392 Views)

Thank you for the Quick replys

Thanks for the quick replys. I am in a huge time crunch, all i need it to do is send the button values to the Subvi, and display the Thermocouple and Compressor values coming back from the subvi. I have twenty four of those same vis that i need to run at the same time. The reason i am using references is that i heard that the subvi would read them while it was running. If anyone has a quick cleanup for this let me know. Thanks

0 Kudos
Message 6 of 8
(2,390 Views)

I hear that you are in a press so I'm going to be real blunt. If you are in a huge crunch you don't have time to muck around with bad code that has many fundamental flaws. There is no "quick fix" for that code except to take it as a lesson learned, and start over with a systematic design. I have been doing this work for a very long time, and I am telling you that this is the fastest way to get you to where you need to be.

Finally, this is a very good place to go through this process as you have access to people here with decades of experience with LV and building test systems that are probibly very much larger than yours. People who normally get impressive amounts of money for their services, and they are willing to help you for free...

Mike...

PS: One more question, what kind of compressors are you testing? I have worked for a couple compressor manuafcturers.


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 7 of 8
(2,383 Views)
Hey Mike,
 
Did you change your code before you transferred it from Laptop to Desktop. One more thing, did you wire false constant to the while loop conditional terminal on purpose. This will set the while loop inside the subVI to infinite loop. I still can't see the full code of yours as there are lot of subVI's and controls missing before I can run.
 
Also, Run the code in Highlight execution mode and use breakpoints to debug your code efficiently. You need to post your complete code for debugging.
 
Go to File >> Save with Options and make llb file and post it.
 
Have a great day
 
 
 
 
Kalyanramu Vemishetty
Automated Test Systems Engineer
National Instruments
0 Kudos
Message 8 of 8
(2,356 Views)