LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

user controlled execution

Hey everyone.

I'm very new to LabVIEW and it's my first post. So please excuse that I'm not familar with the boardsearch and my question has already been answered.

I'm doing a vi with three sequences within a while-loop. The first one is used to collect data from sliders and buttons and sends them via TCP/IP to a server. The second one contains a Wait(ms) vi to wait a certain amount of time before polling on receiving socket starts in the third sequence. This one is used to receive and display the data send by the server.

I want to add a switch at the panel, so the user can switch either the simulation to run normally or the wait(ms) vi is replaced by a user action (Another button at the panel). I connected a "Wait For Front Panel Activity" inside a case-structure which I wired to a switch and left the false case empty. I expected it to hold the simulation until I press the button, but it starts running again when I start moving sliders which are not connected.
I want to preset the sliders and than do the simulation step by step.

Can anyone help me?
0 Kudos
Message 1 of 5
(3,034 Views)
Hi Skyfox78,
you can use an event structure, or you use a while loop in which you poll for your button status. If the value goes to true, you can stop the while loop and execute the other code.

Hope it helps.
Mike
0 Kudos
Message 2 of 5
(3,030 Views)
Hi!

Wait for front-panel activity waits for ANY front-panel-activity, not only one button...as far as I understand,  you want your program to hold until you press your button, right? The easiest way to accomplish this is to use a while-loop with a "Wait-for-frontpanel-activity"-Vi or a "Wait (ms)"-VI with a value of about 100ms inside. Wire your button to the loop-condition which you set to "stop if true". As you press your button, the while-loop exits and your program continues..

Hope this was your problem,
Good luck

Christian

Addendum: Mike is always a bit faster than me 🙂


Message Edited by cschneider on 07-22-2008 11:49 PM

THINK G!! 😉
------------------------------------------------------------------------------------------------
Using LabView 2010 and 2011 on Mac and Win
Programming in Microsoft Visual C++ (Win), XCode (Mac)
0 Kudos
Message 3 of 5
(3,028 Views)
Thank you. It helped a lot. Can someone tell me why "Wait-for-frontpanel-activity"-Vi has a boolean input if it listens to ANY front-panel-activity? Finally I added another sequence just containing a while loop and the "Step"-button.
0 Kudos
Message 4 of 5
(3,003 Views)
The boolean input is there so you can programmatically tell it not to wait by wiring a True value into that Boolean connector.  Use Ctrl-H for Context Help and hover over the icon.Smiley Wink
0 Kudos
Message 5 of 5
(2,992 Views)