05-08-2013 09:06 AM
quick question:
I have a fairly significant labview project that i'm deploying to several compactRIOs. However, I have two possible configurations of that code. The difference between the two configurations is a single VI. That is, within my project, there's one VI that I replace with another (same connector pane) for the alternate configuration.
What I want to do is to make that VI into a polymorphic VI, then have the instance of that polymorphic VI be set at compile time. That is, I would have two build specifications. Each build specification would build a configuration of the project by having the selection of which instance of the polymorphic VI to use be included as a parameter of the build specification. If it is possible to do, I can't seem to find the option in the build specification preferences to do so.
Does this make sense? Any help is appreciated.
Cheers.
Solved! Go to Solution.
05-08-2013 09:23 AM
Why not load the VI you want to use dynamically?
Depending on what you want to do, open a reference to the other VI, and run it
05-08-2013 09:24 AM
Sounds like a Conditional Disable-structure to me. You should be able to set the flags from the Build-specification, though i haven't tried it much.
Basically like a ordinary Disable structure, place your two vi's in a frame each and then have the compiler enable a frame.
/Y
05-08-2013 09:27 AM - edited 05-08-2013 09:30 AM
ABCPrograms: that's fine, i don't have a problem with the dynamic run thing, but how would the program detect which build specification it's being run from?
05-08-2013 09:28 AM - edited 05-08-2013 09:29 AM
yamaeda, i'm unclear about what you're suggesting. are you suggesting that i use the VI scripting VIs to programmatically edit the VI to switch which state is enabled by using a VI that runs before building, but as part of the build process?
05-08-2013 09:32 AM
@Keith_W wrote:
yamaeda, i'm unclear about what you're suggesting. are you suggesting that i use the VI scripting VIs to programmatically edit the VI to switch which state is enabled by using a VI that runs before building, but as part of the build process?
The Conditional disable seems to work like a script at compile time. As you stated your problem it sounds like you wanted 2 builds anyway, and this would enable one of the conditional frames when building the exe.
/Y
05-08-2013 09:36 AM
I understand what you're saying now. This looks like just what I wanted. I'm off to go lookup how to set custom symbols. Thanks!
05-08-2013 10:21 AM
@Keith_W wrote:
I'm off to go lookup how to set custom symbols.
As far as I know, you can't do this in the UI. I believe there's an idea in the idea exchange to allow this, and you can probably also set the build to run a pre-build VI which will use VI server to set the symbol for the build. There are probably examples of this either here or in the LAVA forums.