Hello all,
I started a thread earlier asking a question about a QMH, but I had more questions, so I thought I'd make a new thread.
I have a project that scans a part and measures the thickness and width of the part. Currently, I have two linear slides, each with a laser rangefinder on it. The premise is I subtract the rangefinder measurements from the distance between the rangefinders themselves to get the thickness.
I'm using a NI USB-6218 DAQ to control/measure the laser rangefinders and watch the length encoder. The slides are controlled via serial commands. All of this has to be controlled by a computer that an operator can use to see the thickness of the part and run the scans (as well as see other various digital readouts from the fixture).
Right now, I'm using a sort of Queued State Machine (QSM) with all of the components (UI, slide commands, logging, and laser commands) all in one queue. The serial commands are run in parallel (separate While loop), but everything is run from one VI.
Here's where I'm having issues:
Right now, I'm having some issues with the UI locking up because of certain tasks waiting for a certain condition to be met (e.g. "Wait for material to be between sensors") I also have a "Start Scan" state that queues up a multitude of states to be run that execute the scanning procedure. This is probably where the UI freeze comes into play. Because of this major flaw, I started looking into multiple queues for the different components. Through my research, I came across a Queued Message Handler (QMH). This is what I'm currently trying to figure out.
Here's my question:
My question is, is the QMH the right way to go for this type of project? This project has to keep the UI clear of "freezing", constantly be pinging the slides for status updates (e.g. position, "In Position", velocity, etc.), logging to a data file when appropriate, and controlling the DAQmx tasks that check the length encoder and the two laser rangefinders. Can anyone point me in the right direction for a structure to use, or a project that someone has made that uses multiple queues that need to communicate with each other?
Thanks!
Joe