03-12-2018 04:29 PM
The simplest way I can think of is to use an event structure, so that when the value of "Folder Name" changes it will trigger an event to populate the file selection dropdown.
03-12-2018 08:43 PM
Thank you, I manage to do this using the event structure, the response of the toggle switch inside the while loop becomes very slow, any idea why?
03-13-2018 08:24 AM
Show us the code and not pictures and we'll tell you. You wouldn't take screenshots of notepad would you? For the same reason post the VIs, or Snippets which are executable code embedded in the image.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-13-2018 09:02 AM
I attached the code below, the two toggle switch is linked together, when the program is running, try to turn off the TO Static button, it should pop-up a message, but it takes looooong time. Thank you bro.
03-13-2018 09:18 AM
That is because you are waiting literally forever for an event in your event structure to be initiated. Data Flow 101: a loop cannot iterate until everything in it has completed. Your buttons should have their own event case and you should move all of the related code into that event case.
03-13-2018 09:21 AM
Hi Xiao,
your event structure is blocking the loop from iterating.
So the buttons will be checked very seldomly…
Some notes on your VI:
- THINK DATAFLOW!
- Reduce the local variable usage. (A lot!)
- There are race conditions…
- There is a lot of Rube-Goldberg in your code…
- Why do you need to calc "BoolValue OR NOT(BoolValue)"? Do you know the result of this operation???
03-14-2018 12:44 PM
I think the easiest way is to replace the path constant with path control, leave the rest of code as it is, it will solve the problem, and it works fine.