02-08-2024 02:02 PM
Hi All,
I am looking into creating a LabVIEW program that will be able to program and set up 4 devices at once. I am trying to figure out the best way to do this so all devices can be programmed and set up at the same time (or at least as quickly as possible).
My initial thought is to have a state machine to control the process going through for each step needed. The state machine would be large as there are many different products so many possible different steps/programming routines. I will be controlling a power supply to be able to power cycle the devices as needed.
Would it make sense to run 4 state machines in parallel, or is that asking for trouble?
02-08-2024 03:55 PM - edited 02-08-2024 04:36 PM
Putting 4 state machines all in one VI is definitely a bad move.
However, you might consider making them into queued state machines, each with their own VI. And have them run asynchronously from the main VI. The main VI could enqueue commands, and the state machines can optionally self-enqueue to run multiple states in a row.
This is pretty much what the "actor framework" in LabVIEW is. There's a lot of premade code, examples, etc. out there that you could look at to get an idea what it's about.
02-20-2024 12:18 PM
Thanks for the suggestion!