From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Software structure - state machines

Hello,

 

I have programmed a machine vision system for a scientific test (simple blob detection), using one GigE Camera and a DAQ system (USB6001). Working great! But now I want to pimp the project. My target is to use 3 Cameras in parallel, which perform the same analysis for three experiments. I programmed the basic-one-camera-code by using a state-machine, a single loop for the DAQ and using two queues for communication between both loops.   

Now my question: Is it wise to extend the code with 2 extra parallel state-machines for the new cameras? Should I integrate all three cameras in one state-machine? (It is not necessary that the analysis for all three cams is done simultaneously! Step by step is okay! )

 

Paul

 

0 Kudos
Message 1 of 4
(2,323 Views)

I would prefer going by a single state machine to handle all the three cameras (Or even more incase if it comes). If you have additional 3 more cameras do you go for additional 3 loops? No. You may add different states for handling different cameras. If you increase the number of loops you are increasing the code and the complexity.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 4
(2,308 Views)

If you are able to enclose the whole functonality in one VI then I would just add a higher level VI that launch it 3 times in parallel (show front panel when opened). Of course you will have to provide the configuration as an input but it is then easy to scale it. Another solution would be dynamically loading a number of your VIs.

0 Kudos
Message 3 of 4
(2,297 Views)

Hello,

 

I want to thank you both for your tips! In the end I choose to call multiple Sub-Application connected by shared variables. Theoretically I can use now multiple computers. Works fine!

 

Bets regards,

 

Paul

 

 

 

 

0 Kudos
Message 4 of 4
(2,093 Views)