Running a LV program from a second LV program?

Running a LV program from a second LV program?

Post by falkp » Fri, 09 Sep 2005 21:42:47


What is considered "quite large" 10, 100, 1000+ vis?
This can also help determine how to call the pump program.  Very large subvi hierarchies can be called dynamically to avoid loading the vi into memory until need, improving application performance and managing the resources better.
 
 
 

Running a LV program from a second LV program?

Post by falkp » Fri, 09 Sep 2005 21:42:47

Two options come to mind:
1. Treat the pump control program like a driver where you call the pump control vi as subvi's
2. Call the control program dynamically, you should be able to use any program as a dynamic vi
 
The only changes (depending on your architecture for the control program) might be that you will have to make the settable controls inputs to the vi so that calling program can pass values the the control program through a wire.
 
I am not sure how you approached this problem but I would first have written a driver where each vi represents a discrete function like set SetPumpSpeed, GetPumpPressure, OpenPumpConnection, ClosePumpConnection (how do you communicate with the pump).  The I would provide a "Soft panel" which is just a vi to allow the basic or even full control of the pump.  When I want to use the pump in a large scale application I would call the pump driver subvi's directly.

 
 
 

Running a LV program from a second LV program?

Post by Erik » Fri, 09 Sep 2005 22:12:39

I have been thinking about making it a subVI, but...
 
I think I made the desciption of the pump program a bit brief. The pump program controlls the pump speed with a PID controller continuously (a DAQPAD-6015 is connected to the pump and pressure sensor), so it can't just run when called as i subVI from the main program.
 
What I have in mind, but don't know how to implement, are to different programs running at the same time in parallell, passing data between them.
 
I'm not sure what you mean by "dynamic VI"? 
 
 
 

Running a LV program from a second LV program?

Post by jhoskin » Fri, 09 Sep 2005 22:12:40

If the pump vi has to be running all of the time then just put it in it's own seperate loop and use ques or variables or references to pass the data. Again it really depends on the structure of the pump VI.
 
 
 
<img src=" http://www.yqcomputer.com/ "> Message Edited by jhoskins on 09-08-2005 09:11 AM


loop.jpg:
http://www.yqcomputer.com/