06-15-2022 03:34 PM
I have this case structure and I want to execute it every 30 seconds. I try to used time elapsed but I didn't know how to make it work. I'm new in LabVIEW so I'll really appreciate if you can help me 🙂
06-15-2022 03:48 PM - edited 06-15-2022 03:48 PM
Sequence structures execute steps in order and then are done. You would probably benefit from placing the case structure in a timed while loop that you can set to run every 30000mSec.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
06-15-2022 04:01 PM - edited 06-15-2022 04:04 PM
06-15-2022 04:39 PM
I want each case inside the sequence to run every 30 seconds, I don't all the cases running one after the other. Is there another way to do it without the loop?
06-15-2022 04:44 PM
I cannot upload the vi because of company policies. The only thing that changes in the cases are the type of error and the type of brakes. The vi has an start and stop button, so what I want to do is when pressing start the first error executes, then wait 30 seconds till the second one is executed, until the fourth one is done. But if the user press the stop button before all the errors were executed, the program should stop and get out of the sequence without complete it
06-15-2022 07:13 PM
@mc0303 wrote:
I cannot upload the vi because of company policies. The only thing that changes in the cases are the type of error and the type of brakes. The vi has an start and stop button, so what I want to do is when pressing start the first error executes, then wait 30 seconds till the second one is executed, until the fourth one is done. But if the user press the stop button before all the errors were executed, the program should stop and get out of the sequence without complete it
If you want to be able to interrupt the "sequence" at any time, you cannot use a sequence structure. Period!
If you work for a company, they need to send you to some basic training courses before giving you tasks like that. It is not in their best interest to throw you into the deep end without giving you swimming lessons first. As I said, you really need to eliminate all local variables and all sequence structure. Learn the basics of dataflow and graphical programming. Go over all training resources listed at the top of the forum.
A very simple program that changes state based in timing can be found here. Maybe you can re-use some ideas for your project. study it and don't continue until you fully understand every detail of it!