02-01-2018 11:33 PM
Hello,
I have just gotten started with Labview. I watched a few videos and tutorials for the basics, but for the project I am working on, I need something similar to a timed case structure. I want to store multiple functions in different cases that time out after being executed, or after a given amount of time. Is there any functions or structures like that?
This is my first time posting a question so feel free to let me know if I am doing something incorrectly.
Solved! Go to Solution.
02-02-2018 12:55 AM
Hi Ramonk,
I want to store multiple functions in different cases that time out after being executed
Taking your words literally: Put a loop in each case set to run for a certain amount of time (using ElapsedTime).
Better approach: build a state machine…
02-02-2018 01:13 AM
All you need is a simple state machine consisting of an outer loop, a case structure with the various code version, one for each case, and a state variable (e.g. enum) in a shift register. Just switch states as a function of elapsed time.
(Don't trap yourself inside inner loops)
02-05-2018 07:04 AM
wrote:
I want to store multiple functions in different cases that time out after being executed, or after a given amount of time.
A MS Wait in each case would give each case a "timeout" (more like a duration). That's what a "timed case structure" would do (and why it doesn't exist). The function wouldn't time out, the case would.