07-06-2015 01:59 PM
I need to deploy an executable to a customer's computer and for the first time I have the need to use an asynchronous call in my program I am not sure how i am going to keep the file path to the "Open VI Reference" valid after I build and deploy the application. The Obvious manner would be to use a configuration file to allow me to set the path independently of the LabVIEW Application. However, when you include A VI in the "Always include" it is not An EXE thus not include as a file in the build folder, making it had to reference on the host computer.
Some educational tips on how to do this would be very help full for learning how to deploy this application
Attached is a code snippet of how i am currently stating an asynchronous call
Thanks
Mark R.
Solved! Go to Solution.
07-06-2015 02:07 PM - edited 07-06-2015 02:08 PM
This is how I always call a VI by reference. Having the static VI ref causes LabVIEW to load that VI in to memory and be able to find it by name when opened.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-06-2015 02:40 PM
Ok That's an interesting thought but I don't recognize the reference bucket with a star on it. Is that a particular function?
Mark R.
07-06-2015 02:46 PM - edited 07-06-2015 02:46 PM
The VI Ref with the star is just a Strict reference. You need to input a strict reference in to the Open node because it requires that in order to load the connector pane. The input even says "(for type only)" on that input to clarify. It's kinda weird looking because you have the same VI reference loaded twice, so you can also just make the first VI ref strict and wire it in to both.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-06-2015 02:51 PM - edited 07-06-2015 02:51 PM
Ah I see in LV 14 Its a circle with a line through it. 14 is the only version I have used this and it didn't occur to me until after my last reply that right clicking and choosing create a constant would be the easiest method of learning what type of reference I need to use.
Thank you for your quick help,
Mark R.
07-06-2015 03:00 PM
Actually, what you're referring to is a "type specifier VI Refnum", which is only used for type, but doesn't have any other information about the VI really. I've run in to bugs before where I changed the connector pane on a VI, but the type-only references I had in my code didn't update because there's no link to the VI, just the pane...
So really there are three different forms of a VI reference. Normal, Strict, and Type-only. Strict encapsulates both the normal reference and the type-only reference.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-06-2015 03:12 PM
hmmm Ok Just went looking with what you just told me and I see What you mean about the pane connection rather than a VI Connection. I didn't know that what is listed on the Application palette is a "Strict VI Reference" is not "Strictly Type Defined" until you tell it to be Thus putting the star on the Icon
Thank you for the insight.
Mark R.
10-23-2015 12:35 PM
@James.M wrote:
This is how I always call a VI by reference. Having the static VI ref causes LabVIEW to load that VI in to memory and be able to find it by name when opened.
I wish I could mark that post solved twice! Thanks James!
10-23-2015 12:48 PM - edited 10-23-2015 12:57 PM
@JÞB wrote:
Thanks James!
Digging up old posts for the fun of it?
I actually consolidated a little bit because I realized I didn't need two static VI refs when the strict one can do all the work.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
10-23-2015 01:17 PM
Most grateful! I was doing a little headscratching on calling a dependant vi (from vi.lib) via a ACBR call'n'collect and realized that in the deployed machine the path to vi.lib was going to be "Kablooie" That led me to think about going online and seeing how others did it (who would like to guess where I went first?)