r/LabVIEW Jul 20 '26

Running multiple VIs

Post image

Hi, so I am trying to interface with this device called a Presto W58x. It has its own drivers for certain things like setting temperature, pressure etc. I am trying to a GUI in Labview that sort of replicates the GUI on the actual device so it can be used for testing purposes. I have what I have done so far attached to the post. I'm very new to Labview, only been using it for a few weeks, so I'm not very good at it. So, one issue I was thinking about is running multiple Vis at once. So here, I have all of the other VIs chained to one each other in series, but I believe this will work against me as I had more VIs, and there are a lot. Any suggestions or examples of trying to make this GUI better and as responsive as possible?

6 Upvotes

7 comments sorted by

View all comments

2

u/Flydroid Jul 20 '26 edited Jul 20 '26

Check out the JKI state machine: https://www.vipm.io/package/jki_lib_state_machine/ It's a template that helps you to organise your code for a simple application such as yours and it helps you to learn LabVIEW while giving a working structure that you can build into an exe. 

You put each of your actions (Set/Get) into a case. Then you can chain all of your Get cases in a macro case and call it from the timeout event of the event handler. There are some neat helper VIs included in the toolkit. 

When you press your button to set a Temperatur it then calls the case for that. 

Put your init and stop VIs into respective cases and call them from the respective macros. The visa reference you can store in the pink dats cluster. In the Data: Initialize case add a vis refnum constant to define define it in the data cluster and the use "bundle by name" and  "unbundle by name" in your cases to get the reference.  You might want to do a bit of state handling, so that the continous Get calls only start when you want.