LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Graph stalls when front panel is adjusted

So I am trying to debug a code that someone previously wrote. I am a bit familiar with the code but as I mentioned did not write it myself. The deal is that when Im in running the front panel and the graph is graphing time vs any other parameter, if you press any button on the front panel or if a sub-vi gets called the graph will stall and one has to manually reset the graph. I am not too sure why this is going on. Attached are a few screen shots of where this section of the code lives. There is a stacked sequence with two subdiagrams and it is also being called in the event structure inside one of those subdiagrams. I could also upload the whole code if needed.

 

 

Thanks for the help guys

0 Kudos
Message 1 of 11
(3,123 Views)

Hi julian,

 

showing a picture of the front panel will be no help to discuss this problem. Embedding that picture in a proprietary document format is a no-go… Next time you should attach a picture (PNG preferred) instead!

 

To your problem:

- Using stacked sequences is bad program design.

- Using event structures in stacked sequences is even worse…

- Using "default if unwired" tunnels in the event structure can be a root cause of your problem…

- Using lots of local variables (or "Value" property nodes) will not help to solve your problems…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 11
(3,086 Views)

These pictures are useless to troubleshoot. we need to see actual code.

 

I am not familiar with the operation "manually reset the graph". What do you actually do there?

Are you sure only the graph front panel update is stalled? Could it be that the some other part of the code is stalling?

0 Kudos
Message 3 of 11
(3,073 Views)

here is the code, thanks for the help.

This is the path to the main VI

\FILE VSM_Controller Folder\Documents and Settings\2kA User\Desktop\Sondra VSM\File VSM_Controller.vi

0 Kudos
Message 4 of 11
(3,024 Views)

I get a "path too long" error when trying to unzip. Please limit yourself to your own VIs and leave the instr.lib stuff etc. out of it.

0 Kudos
Message 5 of 11
(3,015 Views)

sorry about that, lets see if this works

 

0 Kudos
Message 6 of 11
(3,004 Views)

OK, I was able to get to the code by selective unzipping.

 

As a first step, you should eliminate all these value property nodes and replace them with plain local variables instead. The code os causing excessive thread switching and spends way too much time in the UI thread.

 

Overall, there is way too much code. For example you have in the "graphed parameter" event the same property node in every single case of the inner case structures. These property nodes belong after the case structure, only once instance each needed!

 

(Sorry, I have to do some other things now. Will look at it a little more later.....)

0 Kudos
Message 7 of 11
(2,999 Views)

okay I appreciate the quick response, I will be looking forward to hearing from you later.

Thanks so much

0 Kudos
Message 8 of 11
(2,992 Views)

Hi Julian,

 

you will have a hard time to debug this monster.

 

Lots of local variables, lots of events fired by "value (sgnl)" property nodes, lots of stacked sequences, lots of subVIs containing their own GUI event handling.

I'm out…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 11
(2,990 Views)

Do you think there is an easy way for me to fix the time stamp? I want the time stamp to not stall when I touch the front pannel? everything else I will look at fixing it myself

0 Kudos
Message 10 of 11
(2,862 Views)