LV Front panel controls get locked

2004-04-20 Thread rk1960in
Hi! All,
I am developing a LabVIEW program password
verification. 
Front  Panel Controls do not respond and get locked
up. To regenerate the error do the following
1. Enter the password employee1
2. Press LOGIn button
3. Press CLOCK OUT button
After this the front panel controls gets locked and
does not take any value.

If you try to give the password as employee2 and
perform the above steps..the front
panel gets locked up.

The only case it keeps working is when password is
employee1 and everytime ClockIN 
button is selected.

The BD has an event case for the controls Clock In and Clock Out.
I have tried to debug and everything seems rightis there a way I
can attach the snap short or the VI itself? If not then in case anyone
wants to have a look at the VI can can send it to his/her email ID.
Any help is appreciated!!



LV Front panel controls get locked

2004-04-20 Thread rk1960in
Hi! All,
I am developing a LabVIEW program password
verification. 
Front  Panel Controls do not respond and get locked
up. To regenerate the error do the following
1. Enter the password employee1
2. Press LOGIn button
3. Press CLOCK OUT button
After this the front panel controls gets locked and
does not take any value.

If you try to give the password as employee2 and
perform the above steps..the front
panel gets locked up.

The only case it keeps working is when password is
employee1 and everytime ClockIN 
button is selected.

The BD has an event case for the controls Clock In and Clock Out.
I have tried to debug and everything seems rightis there a way I
can attach the snap short or the VI itself? If not then in case anyone
wants to have a look at the VI can can send it to his/her email ID.
Any help is appreciated!!



Re: LV Front panel controls get locked

2004-03-21 Thread Dennis Knutson
Assuming that you're using NI's Developer Exchange to post this
question, there was an attach button on the screen that you could have
used to include your VIs. You can still do this by responding to the
post and agian you should see the Attach Files button. If you've got
subVIs, don't forget to include them as well. The best way is to do a
Save with Options and select Development Distribution. This will
create a .llb file with everything.

Your problem could be several things. Maybe a subVI you call is in an
infinite loop or you've got something wrong in the event structure. Do
you have a single event structure or multiple?



Re: LV Front panel controls get locked

2004-03-21 Thread software enigineer
So if I understand it clearly then handling of multiple controls in
one event was the cause of the deadlock as it was waiting for Clock
Out value change event to occur and then again Clock In value
change to occur? I thought that if I change the value of one of the
controls it would exit the loop and move on to the next case as I was
using State Machine concept.

Thanks for all your help and your informative email also.



Re: LV Front panel controls get locked

2004-03-21 Thread KileenC
Hi software enigineer,

The reason your front panel is locking up is indeed because the event
structure was set to handle more than a single event.  In an event
structure, when one event fires, it will lock up the front panel until
that event handler is released.  Since the event structure was set to
handle both the Clock In and Clock Out events, the Clock Out
event was locking up the front panel until the Clock In event
occurred.  In general, it is a good idea to only place a single event
to be handled for each case of the event structure.

The modification to your program posted by Dennis Knutson above should
fix your issue.

There is a useful KnowledgeBase that discusses front panel lock-up
when using event structures:
a
href=http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/d979d150e9fc253c86256bc7006f3e22?OpenDocument;Why
Does My User Interface Lock-Up when Using Event Structures?/a

Additionally, here are two helpful links at the bottom of that KB for
more information about event-driven programming in Labvew that may
prove useful:
a
href=http://zone.ni.com/devzone/learningcenter.nsf/03f7c60f17aad210862567a90054a26c/27d99af6b2bf6db686256c4e0063233f?OpenDocument;Event-Driven
Programming Technical Presentation/a
a
href=http://zone.ni.com/devzone/conceptd.nsf/webmain/E5F8474BDA20C97786256B5A0066968B?opendocument;Event-Driven
Programming in LabView/a

For a brief tutorial on Event Programming with further information on
creating a UI state machine using the event structure, please refer
here:  br
a
href=http://zone.ni.com/devzone/conceptd.nsf/webmain/2A8AB43B28BBDE1086256B830059875C?opendocument#4;A
Powerful New Tool for UI Programming--User Interface Event
Programming/a.

Best of luck and happy programming!

Kileen Cheng
Applications Engineer
National Instruments