LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

executables deployment depending on personalized context

Solved!
Go to solution

Hi

Fom Labview 2016, i'm using symbols and disabled conditions structures in order to have different contexts of execution. (like "RUN_TIME_ENGINE" but personalized) Then, I'm validating the corresponding deployed executable.

 

problem: when I'm creating my executables, there doesn't seem to be equivalent settings in the executable properties, for personalizing the executable.

 

consequently I have to manually set the variables for each one, and it's a pain in the ass.

 

Sans titre.png

 

do you have an idea to improve the deployment of .exe depending of variables?

Pierre FCentum TNS, Grenoble
Certified LabVIEW Associated Developer
0 Kudos
Message 1 of 10
(2,336 Views)

What exactly is your use case?

If you're building an executable, it's already bound to the OS and bitness you're using to create it.  (Windows LabVIEW will make Windows executables.  macOS LabVIEW will make macOS dmg files. 32-bit LabVIEW will make 32-bit executables)

That's two of your "personalization" variables.

Given that, my guess (without seeing anything you're actually doing or trying to do) is that you're overthinking things here.  Care to share some context to make it more clear why what you're doing is a path you want to travel?

0 Kudos
Message 2 of 10
(2,254 Views)

It looks like you've defined several "conditional disable symbols" (a.k.a. project-level environment variables) in your project.  This likely means there are several places in your code where you have conditional disable structures, containing code variations that will depend on your particular symbol values.

 

I've done this a little bit too, but not to the extent you have.  I suspect you'd like a way to have your build spec pre-define various symbols before doing the build -- at least, that's the kind of thing I know I'd like.  

 

With my lesser use of such symbols, I haven't made it a mission to pursue a nicer solution than just manually setting the values before doing the build.  My little bit of poking about didn't reveal any simple straightforward way to have this be *part of* the build spec.   I suspect it'd be possible if you were to make a special vi that used VI Server (and maybe scripting?) to set such variables within your project, make an interactive GUI for it, and then configure a pre-build action to call that vi.

 

That still seems messy though, if you want several different flavors of your executable based on several combinations of symbol values.  Your vi would need to change not just the symbol values themselves, but also a bunch of settings related to the target executable name & path, version, etc.

 

If anyone knows of a simpler method, I'd like to know too.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 3 of 10
(2,245 Views)

There is a "SetSymbols.vi" in <vi lib>/plugins/Utility/IfDef.llb that allows setting project Conditional Disable values with a 2D String array.

Here's an example usage (not that it really adds much, but you can at least drag the snippet perhaps)

PPL INI Parsing.lvlib_Implement Build Configuration_BD.png

The unimaginatively "iconned" VI is the one you want.


GCentral
Message 4 of 10
(2,230 Views)

sorry about the late answer

 

hi natasftw

 

In fact, I'm using conditional symbols + disabled condition to simulate different contexts for execution: different company production plants, any machine, test database or normal database, no peripherals etc. for exemple PRODUCTIONPLANT = PARIS, TEST = TRUE.

then, the disabled conditional structures in my code are behaving depending of those parameters

when the executable is deployed, it automatically takes into account thoses parameters and conditional structures. that's a great point.

 

however, everytime I deploy one of my 6~7 executables, I need to manualy change 4~5 parameters. It's very boring, and if I forget to change one of them before the deployment of one executable, I can loose a lot of time during validation before realizing this forgetting

Pierre FCentum TNS, Grenoble
Certified LabVIEW Associated Developer
0 Kudos
Message 5 of 10
(2,205 Views)

hi cbutcher

 

I think your solution can be the good one, but I don't find it in my labview 2016 library 😞

 

which version do you use?

 

is it possible from you to to save this vi in 2016 version and send me the file? 🙂

Pierre FCentum TNS, Grenoble
Certified LabVIEW Associated Developer
0 Kudos
Message 6 of 10
(2,201 Views)
Solution
Accepted by topic author Pierre_F

I believe it should be available in LabVIEW 2016 - this thread says it has been around since at least 8.6.

If you use the Add > File... (in Items View in the Project Explorer) or from a block diagram choose to "Select a VI..." you should be able to browse for it.

 

It will be in your installation directory (e.g. C:\Program Files (x86)\National Instruments\LabVIEW 2016) \resource\plugins\Utility\IfDef.llb\SetSymbols.vi (not vi.lib! Oops!)

 

 


GCentral
0 Kudos
Message 7 of 10
(2,180 Views)

Thanks for the pointer to "SetSymbols.vi"!

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 8 of 10
(2,171 Views)

hi cbutcher. thanks for the VI, it's working perfectly 🙂

 

The VI is processing only project variable and not project/current workspace variable. do you know if such VI has been developped? I can't find it in the library

 

thanks in advance

Pierre FCentum TNS, Grenoble
Certified LabVIEW Associated Developer
0 Kudos
Message 9 of 10
(2,146 Views)

@Pierre_F wrote:

hi cbutcher. thanks for the VI, it's working perfectly 🙂

 

The VI is processing only project variable and not project/current workspace variable. do you know if such VI has been developped? I can't find it in the library

 

thanks in advance


shb in the linked thread has the following image (his/her work, not mine - if you like it you should give kudos to the post on the second page here: linked post)

shb's workshb's work

You can see the way that the project reference is chosen between two different values and copy the appropriate choice in order to get the target of your definitions that you want.


GCentral
0 Kudos
Message 10 of 10
(2,139 Views)