LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Please check it is not a bug.

Solved!
Go to solution

Hello, Honoured Engineers!

I have a problem with this code in LabView 8.6.1 and 2009. I don't understand why an application hangs when I press a button.

All versions of LabView are registered and activated. And I know that in base versions there are problems with Event Structure so I've activated with Professional licenses.

(on the picture False case and Timeout case are empty)

 

Clipboard03.jpg

 

0 Kudos
Message 1 of 16
(4,017 Views)
If you wire 0 to a for loop it will run zero times. So the output is an empty array. Hence it will not contain the number 0, and the search 1D array will give -1 as output. You can track such errors by using probes. Debugging is an important art in programming. And should not be overlooked;)
Message Edited by Coq Rouge on 03-26-2010 09:05 AM


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 16
(4,010 Views)

Your button's mech action is 'switch until release'... change this and it won't hang.

 

Jevon

0 Kudos
Message 3 of 16
(4,006 Views)

Sorry I did not catch your problem. Shall never answer a posting before having a (large) cup of coffee first. And you are correct the control is locked up. I did a test with other types of mechanical action, and can see the same problem. So yes it is a bug 



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 4 of 16
(3,987 Views)

Yes, Coq Rouge, it seems a bug but where is it? :smileysad:

As You sad this code doesn't work too.

 

 Clipboard05.jpg

0 Kudos
Message 5 of 16
(3,978 Views)

Hello, Jevon!

It doesn't hang when I change for-cycle with a constant array or when delete Event handler for a button.

0 Kudos
Message 6 of 16
(3,971 Views)
It has something to do with the event structure. Good luck finding out why.


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 7 of 16
(3,968 Views)
Good Luck, Coq!
0 Kudos
Message 8 of 16
(3,956 Views)

You should avoid using the event structure the way you have it here in the case statement. The event structure is associated with the control and locks the front panel (when the button is pressed) until the event structure has handled the event. I recommended changing the architecture.

 

Jevon

0 Kudos
Message 9 of 16
(3,952 Views)

I've rewrote the code, Jevon, as You advise.

It doesn't work. :smileysad:

 

Clipboard06.jpg

 

0 Kudos
Message 10 of 16
(3,935 Views)