LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

scripting an interactive labview VI

I have a large top-level VI that controls and performs data collection for many different devices and over different interfaces. I currently do all of the control interactively through the front panel UI. I would like to have my VI be able to run off a script... not an external scripting language, but something like the Setpoint Profile VI's that come with the PID control toolset.

So obviously, implementing the Setpoint Profile VI's for my temperature controllers is pretty trivial. My problem is that I have many other devices which aren't necessarily controlled the same way. For example, for PID temperature control, you would just continually set the setpoint at a given interval, but for RS232-controlled pump, you would onl
y want to send a signal to stop or start it. I would like to have the scripting be a feature of the existing interactive VI (so I can toggle between automated and manual modes with a switch), and hopefully not have to have completely separate code.

So bascially I am wondering if anyone has a good strategies or examples for doing such a thing. Here are some issues I can think of:

- is it better to have one huge script that has the settings for all devices, or should I have separate scripts and synchronize them?

- I was considering scripting the UI itself, kind of like a "ghost user" using property nodes, but recent discussions on this board tell me this is not very efficient.

- are my expectations realistic?

thanks in advance for any advice.
0 Kudos
Message 1 of 2
(2,541 Views)
Hi,
I think that you should implement a similar idea to the SetPoint Profile VI. One of the inputs to this VI is an array of clusters where each cluster has the time-value pair (setpoint). One approach would be to change the cluster to contain time and values for each device you are trying to automate. For example, you would have time, value for the temperature control, value for the pump and so on. Since the value for the pump would be on and off, you would want to have three values: ON, OFF and IGNORE(do nothing to pump at this time). Having an array of cluster with each cluster containing time and values for all your devices will allow you to synchronize the flow of your application since the time value will be common for all the devices.

Good luck
with the application. I hope this helps.

Sincerely,
Feroz
National Instruments
Message 2 of 2
(2,541 Views)