10-04-2022 07:00 AM
HI everyone,
i have this script(ADU) that i would like to add the start button to it and exit button.
So that the script keep running and the user click the start button so it asks for measurements and if its the same measurement it wont ask. while he can click start agaiin and do another test
i have another script(CLTM) that have the idea, but i get quite some errors when i run it. I used a while loop and event cases to solve it
THanks for the help in advance
Solved! Go to Solution.
10-04-2022 09:54 AM
You have an Event Structure wired into a Sequence Structure (should almost never be used, especially when first learning LabVIEW!). Remember the rules of Data Flow -- the Event Structure will run (once!) when the Program starts, will register the value of START, and then will never run again, so that (fixed) initial value will be used in the rest of your code.
Is that what you want to do? [I doubt it].
Bob Schor
10-04-2022 11:27 AM
Hi, No thats not what i want, i just put everything in the sequence structure to share my idea.
Otherwise i only want to keep taking other reading(run the code, and while its running and a start button is clicked ask the user for the required with the prompt user and the gives the output then if start is clicked again another test is done).
and i am not that skilled in LabVIEW i did self-study it and thanks for your reply
10-05-2022 09:31 AM
I have helped someone with a start button. Save your code as previous version. I can't open your code because I have labview 2019. I believe you are using 2020 or up. If I can open it, I'll be able to help.
10-05-2022 10:08 AM
Hi Khaleed,
@KHALEDSAAD wrote:
i have this script(ADU) that i would like to add the start button to it and exit button.
So that the script keep running and the user click the start button so it asks for measurements and if its the same measurement it wont ask. while he can click start agaiin and do another test
i have another script(CLTM) that have the idea, but i get quite some errors when i run it. I used a while loop and event cases to solve it
When you write "script" I gues you are talking about LabVIEW VIs…
@KHALEDSAAD wrote:
So that the script keep running and …
When you want to keep something running then you should use a loop.
@KHALEDSAAD wrote:
i have another script(CLTM) that have the idea, but i get quite some errors when i run it. I used a while loop and event cases to solve it
When there are errors then you should provide information on those errors! Which errors do you get?
Both VIs are very large and unorganized. They lack a good structure style!
Mind to clean them up, create a nice project from these with several subVIs and all needed stuff in this project?
10-08-2022 06:21 AM
Hi here are the files in 2019 version
10-08-2022 06:23 AM
Thanks for your reply, its not my code i am trying to change some stuff in it, so i know its kind of missy.
will try to arrange it and come back with a neater vi
10-08-2022 10:46 PM - edited 10-08-2022 10:47 PM
khaled, try out the two codes I modified and let me know how they work. I didn't make the enum type def intentionally. Just let me know how they work.