12-12-2018 11:41 AM
Hi,
I have 2 working Vi that are currently in 'sequence', like you can only execute the program once and it stops, that I want to change to State machine (or other mean) so you can execute them multiple times and close the Vi programmaticly when done.
I attached simplified versions of those Vi current architecture.
They both read and write frames from a camera to a file using producer-consumer. One with 1 camera and the other with 2.
Searching the forums, I'm thinking I can use a state machine with a parralel consumer loop for the 1 camera Vi, as seen in this thread, third post :
https://forums.ni.com/t5/LabVIEW/State-Machine-Data-Acquisition/td-p/3734333
But I don't know how to apply this to the Vi with 2 cameras. All the loops must run at their own speed in parralel while acquisition is in progress but the start and stop sequence affects both.
Thank you,
12-12-2018 12:53 PM
Create your VI that handles the camera. Then in your main code use the "Start Asynchronous Call" to spawn as many camera processes you need. Use queues, a notifier or a user event to send messages to the camera tasks