LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Structures and Parallel Control

My system has motion stages and a vision system. Is it possible to use Event Structures to monitor user input and parallelly control the motors and vision system?
0 Kudos
Message 1 of 6
(3,070 Views)
Yes, BUT it depends on
- what you intend to accomplish
- correlation between user input and the rest of the system
- restrictions related to proper functionality of the equipment

therefore, some details will help us to have a better picture of your application.
0 Kudos
Message 2 of 6
(3,070 Views)
I need to control the motors and the vision system according to user input. For instance the user may press the "Go to Home" button. The motors need to move and the vision system is in a monitor mode. Next the user may press "Go to Location B" button. The motors need to go to location B then the vision system will make measurements. There are a large number of user input buttons and functions. Using a cluster of buttons and searching through them with the standard state machine technique is cumbersome. Especially when many of the buttons will call similar routines but with different parameter values.
0 Kudos
Message 3 of 6
(3,070 Views)
I assume that your motor/vision operations must be complete (after user interaction, waiting for your system to end the task and then consider other user command). Therefore start with some code to detect user command, either:
- event structure
- old state machine, but simplify it introducing a ring menu (or list) with commands (like "GO to location") and the parameters separated.
- avoiding the state machine, introducing an "OK" button to trigger the command
Have this part generating a code for each main operation, thus you can use it as an input for a case structure to manage motor/vision operation.
A mixed solution is to have everything inside an event structure. How good is this solution depends on the amount of code that you need to
duplicate and how data flow is affected.

Hope this helps

p.s.: If you want the user to be able to set commands while the system is "working", use a queue in order to store them for later (when motor/vision equipment is ready to execute)
0 Kudos
Message 4 of 6
(3,070 Views)
Thank you. I am digesting your answer. We'll see if I can make it work.
0 Kudos
Message 5 of 6
(3,070 Views)
I have done what you are trying to accomplish by using states machines that
are driven by user input that are then queued up. I also had to control a
vacuum chamber and multiple power supplies.

You are on the right path.

Hope this helps.

Randy
"Mark Lund" wrote in message
news:506500000005000000E6720000-1019262487000@exchange.ni.com...
> Thank you. I am digesting your answer. We'll see if I can make it
> work.
0 Kudos
Message 6 of 6
(3,070 Views)