LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview crashing

Hi,

 

i'm creating a vi for automatic generation of grinding machine codes which have almost 31 event cases and it is crashing when i click the run button, i don't know why it is happening is there a problem with 31 event cases or some thing else...

0 Kudos
Message 1 of 5
(2,761 Views)

Your attached VI is not executable.


However, there are some major issues with the code:

1. The BD is WAY TOO BIG.

2. The FP is not placed completely in a visible range of the monitor. Never move windows out of monitor resolutions!

3. Never use multiple event structures to handle the same event unless you are VERY familiar with events and know what exactly happens. At a side note: this usually applies only to user events. FP events are in 99.99% NOT shared in multiple event structures.

4. There are too many variables and property nodes. Learn about shift registers and proper UI update coding.

 

That being said, i was not looking into the code to such extend that i can say where a crash might be coming from. However, i think that chances are high to get rid of the crashes when you change the code to only use a single event structure.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(2,738 Views)

first i have tried only with one event structure that crashed that's why i have shifted to 3 event structures each have 10 cases in it

0 Kudos
Message 3 of 5
(2,733 Views)

After removing two of the three loops (cutting down number of buttons i guess) and removeing all code which is non-sense, the vi does not hang LV.

I assume that your vi got corrupted because of several items:

1. BD too big. Don't exceed one monitor resolution

2. BD position: The block diagram and front panel have coordinates. It is known that LV behaves odd when you leave "standard coordinates". Your BD starts at -2464 pixels which is way of the expected area of code

3. Unnecessary code: There is a lot of code which is useless (e.g. boolean case with wired constant!) and will not be executed or code which doesn't serve any purpose (array handling). Removing that code helps the compiler to do a good job.

4. You have duplicated event cases. This is marked with a red text:

DuplicatedEventCaseWarning.PNG

Get rid of these duplicated events!

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 5
(2,725 Views)

@Rizwan00 wrote:

first i have tried only with one event structure that crashed that's why i have shifted to 3 event structures each have 10 cases in it


This is like saying "my finger was bleeding so I sliced open my arm."  Why would you see a problem and decide the way to resolve this is to make things worse?  In doing so, you make it far more complicated to troubleshoot and debug.

 

When you say "crash," what exactly do you mean?  Do you get a window saying LV crashed and asking you to send in a report? Do you get a Windows dialogue telling you it crashed?  Does it just stop responding?

0 Kudos
Message 5 of 5
(2,704 Views)