LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Front pannel jumps a little bit with while loop. What is the problem?

Hello everyone,

I have created a LabVIEW Programm with a front pannel design. The most part of the code are included in a while loop. But whe the programm runs, the front panel jumps a little bit, when everytime it goes to a new cycle. In my expreiences before ,that has not happend. I have just used a milisecond timer. Has anybody idea, what could be the reason?

Wintersweet_0-1602514904816.png

ps: Could the decoration boxes the reason? (I did not use the decoration boxes before. This time I am using them.) 

 

Thank you very much.

0 Kudos
Message 1 of 9
(1,908 Views)

You're going to have to explain a little better what you mean, and including your code would be helpful.

0 Kudos
Message 2 of 9
(1,902 Views)

If you don't post your code, chances to help you will be very poor.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 3 of 9
(1,897 Views)

We need to see your code

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 9
(1,832 Views)

Hello,

pls find my code in the attachment. It is too big to make it as a picture(Screen not big enough). It is programmed with LabVEIW 2020.There are actually many subVIs which are called in this main vi. But I think you don't need them. 

Maybe I decribed the problem not so clearly? The front panel is flickering with the frequence of while loop.

I tried following three solutions, that I found in the forum, but it doesn't help:

-make sure the decoration boxes don't overlap with each other.

-use a transparant decoration box on front panel

-add the front panel property with defer panel updates in a flat sequence.

 

Do you have better ideas? Thank you very much.

 

0 Kudos
Message 5 of 9
(1,774 Views)

Unfortunately I have not yet upgraded to LabVIEW 2020 so I can't read your code. Could you save to previous version?

0 Kudos
Message 6 of 9
(1,761 Views)

Hi Sweet,

 


@Wintersweet wrote:

pls find my code in the attachment. It is too big to make it as a picture(Screen not big enough). It is programmed with LabVEIW 2020.There are actually many subVIs which are called in this main vi. But I think you don't need them. 

Do you have better ideas? Thank you very much.


(Better) ideas:

  • Cleanup that code!
  • Don't use so many property nodes!
  • Don't use so many "value" property nodes! (Don't replace them by local variables. Replace them by better data handling and only using the terminals as much as possible!)
  • Don't use sequence frames! Don't stack sequences inside of each other! Don't hide even more sequences inside a big loop inside a sequence frame! Ever heard of state machines? (Well you even use additional decorations in the blockdiagram to "organize" your code…)
  • Avoid right-to-left wiring (or from bottom-upwarts) like due to those sequence locals…
  • NEVER use the STOP or QUIT function in the middle of your VI!
  • When you call the same subVI 7 times in parallel ("Lesen SPS Daten") you should think of a FOR loop, which autoindexes an array of parameter strings! (This will be part of "Cleanup" procedure…)
  • Uh-oh: in the frame before that you call this subVI 17 times (!) in parallel…
  • In the "Relais counter" frame you don't need to stack 3 case structures inside of each other: one case structure can handle all those cases once you wire the blue counter value to its selector input:
  • Why do you use "LED" indicators as controls? Bad UX…
  • Why do you need to bundle those 7 "mode buttons" into a cluster just to unbundle them in the next frame? Why don't you put those buttons into a cluster on the frontpanel? Why does that missing subVI needs those 7 values as separate inputs instead of just taking the cluster as input? (You might also use a boolean array for those 7 booleans - or even better a radiobutton!)
  • When no mode is selected your VI will just heat up the CPU: you don't need to check/poll user input within nanoseconds…

This code is way to large and un-organized to be able to solve any problems in a graceful way…

 

(@John: you don't want to see this code… 😄)

 

Best regards,
GerdW


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

@GerdW wrote:

 

(@John: you don't want to see this code… 😄)

 


@GerdW, from your description of it I would agree. . .

0 Kudos
Message 8 of 9
(1,736 Views)

At some point, hacking together code without really understanding best practices is going to bite you in the behind... which is why I don't offer my services as a .NET programmer.  😉

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 9
(1,718 Views)