LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Freeze after run through

The attached .vi will be apart of a larger .vi, that will go to index arrays, controlling SSR's.

 

I cannot seem to figure out why it freezes after completing a cycle of any of the four test cases.

 

Just a heads up, I'm very new at LabVIEW and I'm forced to try and learn it at a fast pace.

 

I understand there is probably another way to do this, but I'm trying to accomplish it using simplicity.

 

Thanks in advance!

0 Kudos
Message 1 of 5
(1,187 Views)

Hi Noob,

 


@NoobGee wrote:

Just a heads up, I'm very new at LabVIEW and I'm forced to try and learn it at a fast pace.

 

I understand there is probably another way to do this, but I'm trying to accomplish it using simplicity.


The VI "freezes" because of:

  • using an event structure in the wrong place (there almost always a loop should be placed around the event structure!)
  • using too many local variables
  • using loops inside event cases (did you read the LabVIEW help on event structures!?)
  • using Rube-Goldbergs in your code
  • using duplicated (?) code in your VI
  • (partially) hidden labels of controls/indicators in the blockdiagram
  • overlapping controls/indicators in the frontpanel

Suggestion:

Start over from scratch!

Start with drawing an algorithm on a sheet of paper first…

 

 

Best regards,
GerdW


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

@NoobGee wrote:

I understand there is probably another way to do this, but I'm trying to accomplish it using simplicity.

 


Sorry you need to learn LabVIEW so quickly, but you are just digging yourself into a hole here. Your VI has nothing to do with "simplicity" but is completely constipated. All your events lock the front panel until the event completes, but due to interactive inner loops, the VI can never complete because the interaction is never seen. Stuck forever!

 

It is really not nice to attach a VI with a front panel as follows. Is that what you are planning to present to the user?

 

altenbach_0-1652196960611.png

 

 

  • A state machine needs to be anchored on the outermost loop.
  • Events are for user interaction on controls, so having a "value change" event on indicators is completely meaningless.
  • A inner while loops with a true constant wired to the stop terminal is just a glorified (and unnecessary) sequence frame.
  • A select with a TRUE and a FALSE wired to the inputs is either just a wire or a NOT.
  • You have basically four instances of near identical code. Maybe all you need is a state array with four elements, and arrays of instruments, each with its own state.
  • None of your local variables are needed. Maybe latch action would be better for some of your controls.
  • Never resize labels on the diagram so we cannot see the full name.
  • ....

 

 

0 Kudos
Message 3 of 5
(1,130 Views)

Unfortunately my only option is Rude Goldberg at the moment. 

 

I've had bare minimal experience with LabVIEW and no one else at the facility has any 🤣. All of my experience is NI forums, google and playing around. I have not been able to take any formal classes. My company plans to hire an instructor in the near future.

 

I agree with it being constipated! Trying to have it fit to one screen.

 

How do I see what interactions are not being completed? 

 

The attached .vi is my endgame... When it works correctly. The calibration can be deleted to see funcion.

 

The While loops for each match up with the front panel.

 

I am going to look into your suggestions and see what I come up with

0 Kudos
Message 4 of 5
(1,120 Views)

@NoobGee wrote:

The attached .vi is my endgame... When it works correctly. The calibration can be deleted to see funcion.

 


That obviously will not work. Your upper loop cannot go to the next iteration until all inner while loops have completed.

0 Kudos
Message 5 of 5
(1,116 Views)