08-02-2019 09:45 AM
Hi All,
I'm looking for examples of similar projects to the one i'm working on. Basically I want LabVIEW to perform a simple stage move and then release a latch while measuring displacement from a displacement sensor. Specifically, i'd like to set the parameters of the stage move, and allow a user to command the latch release.
I have a Newport XPS-D8 motion controller (using .NET LabVIEW controls), a Keyence laser displacement sensor, and an NI cDAQ controlling latch opening with a 10 V signal. I have the VI's to run each piece of equipment on their own, but i need to put them all together. From my searching, it looks like a Queued Message Handler, or a State Machine example would work, but i'm having trouble finding an example that would be specific enough to help me.
08-02-2019 11:28 AM
Any tips or advice would be helpful also!
08-04-2019 12:53 PM
This is an excellent illustration of one of the (mostly-ignored) Golden Rules of Software Development -- "Write the Documentation First".
Don't worry about how you will control or sequence all of the devices that you have. Instead, concentrate on what you want to do. Here are some sections your Document should cover:
Once you have the general layout of "what" you want to do, you may see that it follows a natural (single) sequence -- Initialize/setup, Start, Run/Display, Shut Down. This suggests a single sequence, possibly best realized by having one VI do each of these four tasks, sequenced by using the Error Line and "parameter wires".
If you need to start, stop, and restart, a State-Machine-like implementation, such as the Queued Message Handler (from NI) or the JKI State Machine, might be more appropriate. Knowing in advance "what" you want each State to do will be very helpful in creating your code. Note that there are "examples" of the Queued Message Handler -- start LabVIEW, go to New Project, and choose Queued Message Handler to build one.
Bob Schor
08-05-2019 10:29 AM
Thanks, Bob,
I'm not sure if you were prompting me to send you this information or if you were simply suggesting that I do this as a helpful exercise for myself. I had already done that, but my lack of experience with LV is the thing currently holding me up. I'm pretty good at looking at examples and being able to customize them for my own use, but the examples that I've found for QMH and State Machines are too simple or designed for a completely different application. Is it uncommon for people to post projects/sample vis for others to see? It seems like the only examples I can find are textbook ones from NI.
Anyways, here's the writeup, that you maybe requested...
Devices:
Test sequence:
User Control Panel: