LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Start Button

Solved!
Go to solution

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

Download All
0 Kudos
Message 1 of 8
(1,446 Views)

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

0 Kudos
Message 2 of 8
(1,432 Views)

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

0 Kudos
Message 3 of 8
(1,408 Views)

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.

0 Kudos
Message 4 of 8
(1,352 Views)

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?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 8
(1,336 Views)

Hi here are the files in 2019 version

Download All
0 Kudos
Message 6 of 8
(1,280 Views)

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

0 Kudos
Message 7 of 8
(1,278 Views)
Solution
Accepted by topic author KHALEDSAAD

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.

Download All
0 Kudos
Message 8 of 8
(1,247 Views)