LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

one dialog button

Ok, now i am quite sure that i was correct with my suspicion:
DO NOT use the RUN CONTINUOUS button!!!!!!


hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 11 of 20
(1,458 Views)

Sorry but I sent a wrong vi, a vi without the while loop that I use. And please note that I don't use the run contineously button.

Thanks

0 Kudos
Message 12 of 20
(1,453 Views)
Hi thorfano,
the dialog pops up, when the number is smaller than 0. So why do you connect -99999 to the output of the case in which the dialog is? -99999 is smaller than 0. To solve this problem you should connect 0 or a positive number to this output. Smiley Happy

Mike

Message Edited by MikeS81 on 05-13-2008 11:53 AM
0 Kudos
Message 13 of 20
(1,449 Views)

Hi Mike. I was asked to build this vi as a practice lesson, thus the -9999 was not my selection. However, I sent this vi just to show you the problem that I have to overcome using the one button dialog

 

Theodora

0 Kudos
Message 14 of 20
(1,444 Views)
Ah, now i see.....
you have an untimed while loop, so it executes as fast as possible. So after you acknowledge the dialog, the next iteration starts immediatly. Since you have no chance to change the value of "number", you will always "enter" a number smaller than 0, leading to a neverending loop.
So you have to insert a nice timing giving the user time to change the value.

hope this helps,
Norbert
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 15 of 20
(1,443 Views)
Hi Theodora,

yes you are right, this is not the problem. The point is, that the value of your control not change after the dialog pops up. You can use a property node or a local varibale to reset the control value.

 

Mike


Message Edited by MikeS81 on 05-13-2008 11:59 AM
0 Kudos
Message 16 of 20
(1,439 Views)

Thank you. One more question. When I add a delay to a vi is it possible to cause other problems in the vi execution? I am asking that because trying to add a delay in a similar vi caused a delay also in the stop button (please note that the stop button controls the operation of a number of instruments like pumps an valves etc.) and of course I don't want something like that.

Theodora

0 Kudos
Message 17 of 20
(1,431 Views)
Thank you Mike. I appreciate your help.
0 Kudos
Message 18 of 20
(1,430 Views)

Typically, adding a small delay should not affect the functionality.  Unless you have nested loops where the delay gets called many times before the program gets to handle the stop button request.

When dealing with operator events (ie pressing a button), it is wise to use an Event Structure.  The Event Structure would also handle changes in value of any control, thus allowing you to enter a non negative value by taking all the time you need to enter it. 😉

I have not looked at your code since I do not have LV installed on this PC.  However, to answer your question, adding a small delay should not impact your code. 

RayR

0 Kudos
Message 19 of 20
(1,418 Views)

Thanks a lot.

Thorfano

0 Kudos
Message 20 of 20
(1,414 Views)