LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timed Case Structure

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 🙂

mc0303_0-1655325093617.png

 

0 Kudos
Message 1 of 6
(1,598 Views)

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.

Creig Mills
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 2 of 6
(1,593 Views)
  • We cannot really judge pictures. (We cannot see any terminals, we cannot see what's in the other cases, you have several case structures, but don't even tell us which, we cannot run, etc.)
  • We can help once you attach your VI. ( Use "save for previous" if you are using LabVIEW 2021)
  • You don't need any local variables at all!!! The wire is the variable!
  • You don't really need any sequence structures
  • Learn about shift registers.
  • Try a simple state machine. Decide all the states the VI can be in (idle, waiting for next step, execute, etc.)
0 Kudos
Message 3 of 6
(1,582 Views)

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? 

0 Kudos
Message 4 of 6
(1,563 Views)

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

0 Kudos
Message 5 of 6
(1,559 Views)

@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!

 

 

0 Kudos
Message 6 of 6
(1,533 Views)