CSLUG - Central South LabVIEW User Group (UK)

cancel
Showing results for 
Search instead for 
Did you mean: 

Asynchronously run vi from an executable

Hi All,

I am trying to run a vi asynchronously (at the press of a button) from a built executable. I am getting an error 7 and am not sure where I am going wrong. When I run the vi in the dev environment, it works.

I have set the vi to be always included in the build properties. and point to the builds\*.exe\data\ folder where the vi is included. (as suggested by the forums posts that I have read through)

I have attached the project that I am using, it's only a test so is a bit messy.

If anyone has any tips, I'd really appreciate it.

Thanks,

Greg

0 Kudos
Message 1 of 9
(8,458 Views)

Hi Greg

Can you save it as LV2013

Are you back?

S

Steve


Opportunity to learn from experienced developers / entrepeneurs (Fab,Joerg and Brian amongst them):
DSH Pragmatic Software Development Workshop


Random Ramblings Index
My Profile

0 Kudos
Message 2 of 9
(6,755 Views)

Greg,

One of the problems you might be having is that the path of the VI changes once it is built. Have you tried to use a property node and open the VI Reference by name. I normally use that way and it works fine to me.

0 Kudos
Message 3 of 9
(6,755 Views)

I have fixed your problem mate, but it seems that I cannot upload files. Can you send me a private with your personal email address and I send you the code fixed.

In the end what I changed is the way you create you define the build, instead of having the VI in the data folder I defined a new destination called about, then in the source file settings I defined that the folder about must be located in the destination about, finally when you create the paths depending in the application type I made no difference.

I suppose that if you try to point to the data folder LabVIEW cannot find all the dependecines of your VI

****No need of email addresses I found the way to upload data

0 Kudos
Message 4 of 9
(6,755 Views)

Thanks a lot Jarobit, really appreciate the help.

Had a look at the build properties and made the change to my version and worked perfectly.

Thanks,

Greg

0 Kudos
Message 5 of 9
(6,755 Views)

Hi Steve,

Got a working answer from Jarobit.

Yip got back on Friday morning, need to try get head back into work mode now.

Cheers,

Greg

Message 6 of 9
(6,755 Views)

Another thing I have been using, if the goal is to have it asynchronous and not necessarily dynamically loaded you can use a static VI reference which then includes the VI as a proper dependency.

If you use a property node from the reference and feed it in as the name to the open reference node it avoids all of the dynamic linking trickiness.

Obviously if the goal is to dynamically load then disregard this.

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 7 of 9
(6,755 Views)

You can also use a static link to something else that will be installed in the same directory (or a adjacent subdirectory), and then use that the get the base path for a search for the file to be dynamically loaded.   That’s how I find dynamically loadable plugin classes; search based on the path of the statically-linked parent class.

Message 8 of 9
(6,755 Views)

Thanks James and James,

The static reference works but I need to pass data into the vi so running it dynamically works better.

I like that idea of having a static link and then using that to find plugins. It's not nessessary for this case but definitely will keep it in mind for the future.

0 Kudos
Message 9 of 9
(6,755 Views)