LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

front panel locks up

Solved!
Go to solution

a few questions.

 

1) what does the Open G function after fp.open do?

 

2) is the vi wired to fp.open set to run when opened?  is it Modal?

 

3) probe the queue reference- is it destroyed? (hey you might want to add a error handler in the loop to make sure the fp-close method executes.)

 

4) fp.open property is not recommened why not use the fp.open method (which ignores "run when opened" and a few other vi properties)?


"Should be" isn't "Is" -Jay
0 Kudos
Message 11 of 22
(1,460 Views)

@Mads wrote:

The OpenG wait function is reentrant, if it had not been I would call it a bug.




That was not the experience I had recently. I had multiple OpenG waits which should have run in parallel however they did not. One of the calls waited for the other to complete before running. I didn't investigate it much further and I was not able to look at the BD to see what was going on. I didn't spend much time investigating it though and probably should in case it is a bug.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 12 of 22
(1,455 Views)

One thing might happen:

 

You toggle the boolean during the 100 ms wait, in a parellel loop you change the control to 'false'  in the next run the boolean is false again.

 

It's either something like that or a serious bug in LabVIEW, but without the actual VI I can't tell.

 

Have you tried removing the while loop and rebuild the loop from scratch, or a force recompile? (make a back up of the old VI, NI will be interested.)

The OpenG VI resizes the diagram to the largest decoration. (see here)

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 13 of 22
(1,447 Views)

What is stopping the two Event Loops?

0 Kudos
Message 14 of 22
(1,440 Views)

What I have so far that is still not working.

The vi is set to open default mode. I tried Modal no effect.
The queue is present inside the loop.
Changed the open fp to method. No effect.
The stop button is set to latch when released.
I rebuilt the loop from scrathc. No effect.
The 2nd event loop is stopped by the "stop" local just outside this loop.

 

overview lockup_3.png

 

 

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 15 of 22
(1,426 Views)

Still one thing I can't wrap my brain around.  I believe you said that the second event loop has a timeout of -1, what event fires to allow the stop local to be read and stop the loop?

0 Kudos
Message 16 of 22
(1,422 Views)
Smiley Surprised
@Darin.K wrote:

Still one thing I can't wrap my brain around.  I believe you said that the second event loop has a timeout of -1, what event fires to allow the stop local to be read and stop the loop?


Now that you mention it I can't wrap my head around it either. Smiley Surprised I had it set to 1000 ms. I set it to -1 recently just to try anything. But in fact that loop will never stop if it's set to -1 and supposed to be stopped by the local "stop". No matter. The vi closes and the ref gets deleted at the end of the vi.

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 17 of 22
(1,414 Views)

Just an FYI on this problem. I fixed it. It was a timing/race condition. There was a shared variable from the PLC triggering an event structure via Value(Sgnl) property. It was waiting for an input at this portion of the code while it was trying to service the event at the same time. Really hard to find since at all locks up at once. Thanks everyone anyways for your help.

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 18 of 22
(1,361 Views)

Wow, a sporadic, difficult to spot bug that apparently took over a month to track down turns out to be a race condition.  First time for everything....  Smiley Very Happy

 

 

0 Kudos
Message 19 of 22
(1,351 Views)

Indeed it was a real bear to find. And the PLC behavior isn't very consistent. There was plenty of work getting done, however while I was tracking this down since it was so intermittent. Smiley Happy

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 20 of 22
(1,343 Views)