LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cluster Controls causes either one loop to hang or LabVIEW to hang

Solved!
Go to solution

 

 

I am working on a program that has three clusters.  Each cluster has LED controls inside them.  During the test the Board Image, Block Diagram, and Measurement Number controls will be changed accordingly.  When probing, the while loops that hang most often are the top one (board Image) and the bottom one (schematic).  Sometimes LabVIEW becomes unresponsive and I have to abort the program.  Any suggestions?

 

Loops.png

 

Modify Each Control.png

0 Kudos
Message 1 of 14
(3,437 Views)
Solution
Accepted by topic author Regulator

One red flag that I see so far is that just from the code I can see, there are three separate event structures in your code - what are in the other events? You should only have or need one.

 

Why do you have both a timeout event AND a 500 msec wait in each loop? The timeout event isn't doing anything.

 

Are there any errors being generated when LV becomes unresponsive? Oh yeah, that's right, none of the error clusters are hooked up so you don't know...

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
Message 2 of 14
(3,418 Views)

 Hi Regulator, in here the hang is not generated by the cluster itself but by the event structures. The best practice is only to have a single Event structure that handle UI events in a program, having more than one can hang the UI. There is a option in the event structure configuration that you can change which would reduce this issue, but still I would recommend to change the architecture of your application to only use a single event structure. 

 You can monitor multiple controls with a single event structure.

Best Regards

Benjamin C
Principal Systems Engineer // CLA // CLED
Message 3 of 14
(3,416 Views)

I appreciate you're help.  I've taken your suggestions and this is what I came up with.  I ran it a few times and the locking up went away.  If it acts up I'll repost.  The second image is the FP showing the LEDs inside the clusters.  The image is blurred to protect the proprietary information, but it still gets the point across. 

 

Repackaged Event Structure.png

 

FP.png

 

0 Kudos
Message 4 of 14
(3,375 Views)

Yes, much, much better. One more thing to look at is that you are duplicating functionality outside the event structure that is also inside the structure. Is this intended and/or necessary?

 

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 14
(3,367 Views)

My intention was to cause various LED controls to blink, but each has to end in a known state.  The shift register was to change the LED state each loop iteration, but it didn't end in a known state, so I added the event structure.  When the event fires, it takes the value the control used to be (OldVal) and turns that LED control off.  I bet there are much better ways to do this.  Do you have any suggestions?

0 Kudos
Message 6 of 14
(3,351 Views)

Hi and slam to all

I have a problem. i had made a labview program for controlling an electronic box. I had designed a GUI. GUI has to work 24/7. It worked best for a month or so. then my GUI started getting malfunctioning specially string control became disabled showing no data and some case statements stopped working. Is that true that Labview is no an industrial grade tool, its just for lab purpose...??? These bugs have threaten my reputation alot.


@Regulator wrote:

 

 

I am working on a program that has three clusters.  Each cluster has LED controls inside them.  During the test the Board Image, Block Diagram, and Measurement Number controls will be changed accordingly.  When probing, the while loops that hang most often are the top one (board Image) and the bottom one (schematic).  Sometimes LabVIEW becomes unresponsive and I have to abort the program.  Any suggestions?

 

Loops.png

 

Modify Each Control.png




0 Kudos
Message 7 of 14
(3,248 Views)

@usman.arif wrote:

Hi and slam to all

I have a problem. i had made a labview program for controlling an electronic box. I had designed a GUI. GUI has to work 24/7. It worked best for a month or so. then my GUI started getting malfunctioning specially string control became disabled showing no data and some case statements stopped working. Is that true that Labview is no an industrial grade tool, its just for lab purpose...??? These bugs have threaten my reputation alot.


This seems completely unrelated to the topic of this old thread that is already marked as solved. (and why did you quote that entire first message, incuding the images???)

 

Let's make sure your reputation as a forum poster is not getting tarnished by these strange habits. 😄

 

I recommend that you start a new thread.

 

LabVIEW is "industrial grade" and used everywhere for mission critical applications (CERN, SpaceX, etc. etc.)

 

Please post your code. It is possible that you have programmed your code inefficiently in a way that it uses more and more memory over time, until it finally runs out. How do you tell if a case statement stops working? String controls are to enter data, not to show data. What is an "electronic box"? can you be more specific?

 

 

0 Kudos
Message 8 of 14
(3,242 Views)

thats because i am new here and i dont have rights to post or start new discussion. can you help me with starting a new discusson..?

0 Kudos
Message 9 of 14
(3,225 Views)

@usman.arif wrote:

thats because i am new here and i dont have rights to post or start new discussion. can you help me with starting a new discusson..?



electronic box is just a signal conditioning electronic board that communicates with my PC through serial port, where my LabView based GUI takes the data and performs the operations. I had used five while loops, one loop does calculations and other 4 loops wait for the calculations


 and than they display that data...

Yeah may be thats because of my ineffecient coding. Plz tel me how can i check that i am running out of memory...??? is there any solution..?

0 Kudos
Message 10 of 14
(3,218 Views)