From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error in calling template VI from exe

Hi All,

 

I have developed a LabVIEW project in which I am calling template VI. So when you starts running the program, the parogram will launch two threads of template vi. 

When I am working on source code it is working fine but I am trying to run the same program from executable I am getting error message.

Please suggest me the solution.

 

Please find attached screenshot for refernece:

Calling template.png

the sinnpets shows the method to call template VI in the program.

 

Untitled.png

 

 

attached above images shows the source file setting in executable properties.

 

 

Capture.PNG

 

Attached screen shows the running state of executable, on click of broken arrow from TelnetEngine.vit, getting error message on on the popup.

 

Please suggest some solutions.\

 

waiting for your reply..

 

Thanks

Pankaj

 

 

0 Kudos
Message 1 of 7
(3,522 Views)

Hello Pankaj,

 

Could you please show how you are giving/constructing the path of calling VIs. Are you using paths relative to calling VI?

 

Thanks,

Arev

 

Certified-LabVIEW-Embedded-Systems-Developer_rgb.jpgCertified-LabVIEW-Architect_rgb.jpg

0 Kudos
Message 2 of 7
(3,493 Views)

Hi Pankaj,

 

The first thing that I would recommend is that you convert your VI template into a normal VI.  VI templates are for creating code off of common infrastructure, but they don't have the hard links like in a VI.

 

You can also create two identical VI's with different names to make the VI separate rather than making two threads of the same VI.

 

Changing the VI Properties for your template might help with the threading.

 

It does look like you are having issues with the application builder not finding the sub VIs that should be compiled with TelnetEngine.VIT.

 

 

Good Luck on you project!

 

 

KenB2013

0 Kudos
Message 3 of 7
(3,478 Views)

Using VI templates for running/launching multiple instances of the same VI is no longer the recommended/preferred way of doing it - use the asynchronous call by reference node instead - there are examples in the example finder. By using a static VI reference to the ACBR node, it will automatically pull in all of the required dependencies into the build specification. 

 

Also - you seem to be launching the number of instances according to the selection of the engine type (it's an enum where first item = 0, second item = 1, third item = 2), unless this enum is 'number of engines', you probably don't want to run that number of instances?


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 7
(3,469 Views)

Hi arevhamb,

 

 

As requested, Attached screeshot for creating file path.

 

 

create file path.png

 

Thanks

Pankaj

0 Kudos
Message 5 of 7
(3,445 Views)
your problem is using current vi path you have to use
Application Directory VI
also using Conditional Disable Structure
will help you to use your code in both mood
vi and application
0 Kudos
Message 6 of 7
(3,418 Views)

Hi Pankajusic,

 

What is the version of LabVIEW you are using? As i see you are calling VIs dynamically in your executable, apparently this is not possible after LabVIEW 8.2 , as seen in the following link,

 

http://digital.ni.com/public.nsf/allkb/30E36993C05D96D286256BF0006F37F5

and

http://digital.ni.com/public.nsf/allkb/8545726A00272EB0862571DA005B896C?OpenDocument

 

a similar post as this forum would be 

http://forums.ni.com/t5/LabVIEW/Dynamic-calls-from-executable/td-p/2448586

 

Anyways you can still give a try of including the path by the second way listed in the following link, as you already have tried the first way:

http://digital.ni.com/public.nsf/allkb/FD7DE8BC8FFC256C862565F4006BE363

 

Cheers,

Rao

NI India AE

0 Kudos
Message 7 of 7
(3,362 Views)