09-23-2019 05:22 PM
Hello,
I am creating a program in which a power supply will apply a bias for X seconds, step up the voltage for X seconds and so on. While the bias is applied, I want to use a digital multimeter to measure the current every Y seconds (Y < X). I am just starting out the framework of my code, and I haven't written anything that controls the instruments yet.
I am really working on having "neat code", and have the main code fit onto one screen. I am trying to use subVIs as much as possible and make my code more modular. On Thursday, I am actually taking the Core 2 class!
In the meantime, I have a problem. I have two while loops running in a subVI. One is use to determine when to change the bias, and the other is use to determine if a measurement is required (eventually I will append the data to a file which is while you'll see an "append" label if the if statement. The problem occurs when I press stop from the Main VI, I still have to wait for that subVI to finish. If it was just a few seconds, I wouldn't care, but the bias could be applied for hours.
I've looked online and some articles have suggested using global variables which I don't have any experience with (yet). I wasn't able to get a notifier to work, but I am not sure if passing a notifier is even possible. The SubVI is called Elapsed Time.
I'd really appreciate some tips!
Thanks in advance!
Solved! Go to Solution.
09-23-2019 05:44 PM
When attaching more than one file, please put them all in a single zip file. Thanks.
(For example, my downloads folder already has a several files originally named main.vi, so yours would get renamed to "main(25).vi" causing endless confusion. A zip file can be extracted into a new folder, making cross-linking much less probably)
09-23-2019 05:49 PM
Certainly 🙂
09-23-2019 06:13 PM
Some quick comments:
09-24-2019 09:38 AM
Great suggestions!
Thanks, I got it working.