LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I execute one event when the other event is still running?

Hi community,

 

I am developing a GUI which will be having the following Button event:

 

1. Read from config file - to read initial data from config file for Instrument

2. Write to config file - to write modified data to config file and to use it in application

3. Connect - To start the Instrument by giving initial data from config file.

4. Data Log - once the instrument starts, it will start logging the data (Output from Instrument)

5. Stop - Stops the whole application

 

I am using event structure for all 5 buttons.

 

The problem is once I click on "Data Log" button, it will start logging the data and saves it in text file and continues to log.

But once if I need to modify the config file data while the application is still running, I modify the config file using the front panel and click on "Write to config file" the data logging will be stopped. But I want the Data logging not to stop.

 

Please suggest me a way such that when one event is running, if other event triggers, the earlier event should not stop. Or suggest me the alternate way of getting this job done. 

 

Thanks.

0 Kudos
Message 1 of 3
(1,216 Views)

Hi chethanspring,

 

simple answer: read the caveats for events in the LabVIEW help!

 

An event case should be executed within milliseconds, so it does NOT block the event structure from handling other events!

 


@chethanspring wrote:

But once if I need to modify the config file data while the application is still running, I modify the config file using the front panel and click on "Write to config file" the data logging will be stopped. But I want the Data logging not to stop.


The app needs to be "still running" so it can handle any user actions at all…

When you want to run several tasks in parallel then your whole app needs to be designed to run those tasks in parallel!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(1,194 Views)

@chethanspring wrote:

I am developing a GUI which will be having the following Button event:.


We can only give specific advice once you actually attach a simple skeleton version of your code. Once you do, the tips will come!

 

You already mentioned that you are programming a GUI and events are great for that. As has been said, you should not "pollute" you UI code with extended processing. That needs to be handled in parallel loops. Have a look at some of the design templates that shop with LabVIEW.

0 Kudos
Message 3 of 3
(1,158 Views)