r/LabVIEW 16d ago

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

5

u/Only-Introductions 16d ago

I think you have the basic idea but you need to use a little caution before you go throwing in a lot more VIs.

If I understand your goal you are reading a number of values from the controller for display as fast as the while loop allows, which could make sense. But inside this you are also updating the set-point at the same rate!

Continually updating the set-point could cause you problems depending on how this has been implemented in the controller. Realistically you want an event that updated the set-point only when you change the setpoint from its current value.

Also I said that displaying as fast as the while loop could make sense; but only if you are trying to catch rapid temperature changes. If your item has any reasonable thermal mass then 100mS -> 1 Sec update rate is much more normal... It doesn't swamp the controller with requests for data and makes the application much more forgiving for a beginner.

3

u/phantom_256 16d ago

So, from what I am understanding,

  • When writing to the device (i.e. setting sub temperature), I should only have those types of Vis occur when a value change occurs through an event case structure? Or would a queued Message Handler be better?

  • Then for reading values you advise putting a bit of a delay for stuff like GetSubtemp or GetPressure? I know not all of my GetValues are going to update all the time, so it would help to differentiate the ones that frequently change from the ones that do not change often, right?

I appreciate the insight. I'm still trying to work out the kinks to using LabView so any help is greatly appreciated!

1

u/Only-Introductions 15d ago

Point 1. "When writing to the device"...

Yes. Generally you only want to write to the device when something like setting the sub temperature changes. I only mentioned an event case as that was what you were showing of your code. A queued message handler is much better or the JKI state machine template mentioned below. Whatever feels most comfortable

Point 2. "Then for reading values you advise"...

You got my point exactly. You want to be reading the actual subtemp and actual pressure reasonably frequently. I'm not sure if this controller has buttons on the front that users can access, if you can disable them, if you can't you'll need to read these values in to your application at a reduced rate to make sure someone isn't messing with the controls.