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: 

Re-using Dynamically called code from Real-Time Target on PC

Solved!
Go to solution

I have some code which is deployed a realtime target which I call dynamically. I also want to use the same code dynamically on a PC in the same project.

 

This all works fine when running the code in interpreted form. However, I cannot add the dynamically called VI for a build specification on my PC if the VI is under the RT target in the project. I can only include it in the build specification which is associated with the RT target's software.

 

How can I use this VI dynamically in both places and ad it to the build specifications without having two copies of it?

0 Kudos
Message 1 of 3
(2,066 Views)

Hi kgolden,

 

There is not going to be a way to run the vi on a PC if is on the RT target. You will need a copy of the vi on the RT target and the PC.

 

<Brian A | Applications Engineering | National Instruments> 

0 Kudos
Message 2 of 3
(2,054 Views)
Solution
Accepted by topic author kgolden

I actually found a way by using a static vi reference:

 

staticdynamiccall.png

 

So instead of supplying a path to the file to the "open vi reference," I just load the VI statically and then supply its name to open a re-entrant instance of it. This solution has the added advantage of treating the dynamically called VI as if it were dropped onto the block diagram - in that I don't have to explicitly include the vi file in the build specification.

0 Kudos
Message 3 of 3
(2,048 Views)