07-20-2016 11:27 AM
Hello,
I am trying to do some pre-design for a continuous data collection application that has the main goal of being as "user-proof" as possible. I've been asked to have a popup window upon opening the *.exe fileasking for values for the project ID, sample ID, date (which I can just do automatically), and the file path to save the data into excel. After the data is entered, I want to have an enter button close the popup. The user would then be directed on which button starts and stops data acquisition with a one-button dialog box (simple enough) before being allowed to start using the actual data collection functionality. Can anyone advise me on which sample program structure would be best for this type of VI?I know LabVIEW does not use variables like most programming languages do, so any tips on how to store those values would be great, too.
Thank you!
Solved! Go to Solution.
07-20-2016 11:33 AM - edited 07-20-2016 11:34 AM
The only thing you need is an event structure.
Make sure your VI has error in and error out as well, so you can make the rest of your application wait until the Pop Up finishes execution. The event structure just needs to be triggered by your "OK" button and then output the cluster of data that the user input. In the VI settings you can set it to "open when called" and "close after if originally closed" which will give you the pop up you desire.
Edit: Also, I believe you want to set it to "modal" so that the user cannot click behind the popup.
07-20-2016 11:36 AM
Hi try guy,
I've been asked to have a popup window upon opening the *.exe file … After the data is entered, I want to have an enter button close the popup. The user would then be directed on which button starts and stops data acquisition with a one-button dialog box (simple enough) before being allowed to start using the actual data collection functionality.
So you have several steps, one after the other. No way for the user to change this way.
I would use some subVIs, connected with error cluster wires to enforce DATAFLOW and execution flow…
(One might argue for a state machine to be able to change the number of steps and their order later on quite easily…)
so any tips on how to store those values would be great, too.
THINK DATAFLOW!
You store data in wires and shift registers…
You probably have heard of those FREE online resources offered by NI on their website to help LabVIEW beginners starting to code in LabVIEW?
07-20-2016 11:40 AM
Thanks, I am a bit beyond those free courses you talk about, I just wanted to poll the experts for any caveats I might have missed before they happened. Also I couldn't decide between the state machine and producer/consumer designs.
Good point about the order of events staying the same, though. I will go with the latter.