I'm building a generic test application for a customer. We use a configuration (XML) file format that is basically a big cluster of all the things we need, such as an array of channel configuration clusters (name, physical channel, calibration, etc.), an array of filter settings, sample rates, log file names, etc. The RT PXI target VI starts and waits for a configuration. The main VI starts and prompts the user for the test configuration file. It's loaded in and sent to the target, which initializes all the devices and channels and starts logging and transmitting data to the front panel for display.
This is all fine a good, but right now the test criteria are hard-coded in the target VI and that ain't good. The customer wants to be able to specify arbitrary test criteria, which may vary from test to test. The test criteria could involve averaging, FFT, etc. so I had this crazy idea to use a separate VI to represent the specific test criteria. The config file would have the file name for the test criteria VI. The end user would develop the test criteria VI to suit the particular test needs. Then somehow, the VI would get to the RT PXI target and execute. I know how to reference the VI on the host and have developed a simple working prototype of the concept, as long as I'm only working on the host PC. But I don't know how to get the VI to the RT target programmatically at run time. I know I could FTP the file over but that wouldn't cover all the dependencies. Besides, surely there is already a way to get a VI and its dependencies to the target.
If this isn't possible, the only other approach I can think of is to use a string expression that represents all the test conditions. BTW, I tried this one using an eval formula node but that doesn't support boolean expressions. I would have to come up with my own expression parser (yuck!) and it would still be much more limited than the VI approach. So I really would like to find a way to get the VI method to work!