LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

not able to execute while loop

Hi kashif,

 

So what's the alternate way to send the file.

Place your files into a ZIP file. A real ZIP file. Not a RAR file. Just a ZIP file!

 

I didn't have anything to say on this but to find the solution.

Set the executable to (default) "run when opened".

Have a button on the frontpanel. Have the exe wait for a value change of that button.

Best regards,
GerdW


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

Dear GerdW,

 

Please find the files in the zip folder.

 

You are suggesting the way I am doing to run the VI is wrong and it's not possible to control the loop by this method.

 

Reards

kashif

 

0 Kudos
Message 12 of 18
(1,003 Views)

Hi kashif,

 

You are suggesting the way I am doing to run the VI is wrong and it's not possible to control the loop by this method.

It might be possible. When it is possible it might not be wrong.

 

BUT:

It is against all conventions on the behaviour of executables. Nobody is expecting to (really) start the execution of an executable by a button on the frontpanel! (Do you need to click a button in Word or Excel to actually start Word or Excel???)

 

The usual way is to run the exe when opened and have it wait for user actions - like the value change of a button. In the mean time you can already do some initialisation stuff and many other things in background…

 

Nice: now you finally learned how to create a ZIP file…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 18
(998 Views)

Dear GerdW,

Nice: now you finally learned how to create a ZIP file…

:-),  Thanks for that

It is against all conventions on the behaviour of executables. Nobody is expecting to (really) start the execution of an executable by a button on the frontpanel! (Do you need to click a button in Word or Excel to actually start Word or Excel???)

Ok, I will try to give the same explanation to my supervisor, hope he too understand. Thanks for your help.

 

But just for curiosity, if you find the solution for the problem that I was facing, please share the solution with me.

 

Regards

kashif

0 Kudos
Message 14 of 18
(987 Views)

I don't understand either. Set the VI properties to "run when opened" or compile it into an executable, or what am i missing?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 15 of 18
(964 Views)

That is a Rube if I ever saw one.

 

The only purpose I can imagine is if we want to run a VI that is broken.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 16 of 18
(943 Views)

@kashifsherwani wrote:

Alternately: please find the youtube link, I followed these steps to create the RUN

https://www.youtube.com/watch?v=oMSFBQV67XE&list=WL&index=10&t=0s

 

My aim is not to use the run button of the front panel at the top left corner (alternate method) but instead use some boolean to run the VI.


That's the dumbest video I have seen in a long time and it basically took my old idea (that I said is silly!) and ran with it!

 

There is no need for edit mode (or not running) in a finalized VI. If you require your users to run and stop the VI during use, you are doing something completely wrong. A finished program needs to be running form the start, wait for user input, react to user input, and go back to wait for user input (i.e. a state machine!), then close itself when done. If starting and running is part of the required operating procedure, your architecture is completely wrong and if you still think this is the way to go, you should not even be programming. I am serious!

 

I also strongly recommend not to bother with x-controls at all. They are ancient, error-prone, and fragile technology and are e.g. not even part of LabVIEW NXG. Consider them obsolete!

 

So don't waste your time with silly videos but study some tutorials about good code architectures. You will become a master programmer quickly.

 

(Imagine Microsoft would suddenly require you to press a run button after opening word, excel, or the edge browser to actually use the program. Makes no sense!)

0 Kudos
Message 17 of 18
(929 Views)

@altenbach wrote:

@kashifsherwani wrote:

Alternately: please find the youtube link, I followed these steps to create the RUN

https://www.youtube.com/watch?v=oMSFBQV67XE&list=WL&index=10&t=0s

 

My aim is not to use the run button of the front panel at the top left corner (alternate method) but instead use some boolean to run the VI.


That's the dumbest video I have seen in a long time and it basically took my old idea (that I said is silly!) and ran with it!

...


Now I am going to have to watch that!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 18 of 18
(919 Views)