LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Start Stop and Run button.

hello,

 

I have one question, I want one button which can be run/start/stop button. I can't compile the program with "Run when open", because I need the user enter a string and a configuration, however after the user enter a configuration, I want that a START button, and when the user want press the same button to STOP all the program. All without pressing the "Run button (white arrow)". So the sequence it will be:

 

1- open the ".exe"

2- configure the variables such as: file name, file path, comments.....

3- press START button, and the system will start acquisition.

4- press STOP button and the program stopped and save all the data in a file.

 

It is that possible? Could anyone help me with it? Or send me and example?

 

Best regards,

Anna.  

0 Kudos
Message 1 of 5
(2,308 Views)

Try using the invoke node it will give you the solution.

0 Kudos
Message 2 of 5
(2,299 Views)

Hi,

 

You can do something like this.

Compile it with "Run when open".

 

Best regards

Matej

/* A smart device is only as smart (stupid) as its programmer. */
0 Kudos
Message 3 of 5
(2,291 Views)

One more thing, make sure you read your configuration variables inside the true case of the case structure.

 

Best regards,

Matej

/* A smart device is only as smart (stupid) as its programmer. */
0 Kudos
Message 4 of 5
(2,288 Views)

I would recommend you to go for a proper design pattern. You may be interested in Event driven Producer consumer pattern given in this example . Kudos to mbryner

-----

The best solution is the one you find it by yourself
0 Kudos
Message 5 of 5
(2,275 Views)