LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Downloading DLL to RT Target from CVI

Is downloading the DLL from the CVI environment to the target (PXI-8196RT) the only way to execute my RT application?  Is there a way to download the dll outside CVI from the host PC and execute it? Also, does one need to download that dll everytime one wants to execute the program on the target? I am confused. Thanks.
0 Kudos
Message 1 of 5
(4,722 Views)
Absolutely.  You can use the RT file copy utility ([CVI Dir]\bin\RTFileCopyUtility.exe) provided with CVI to copy your DLL to the system and set it as a "startup DLL".  The system can have any number of startup DLLs, all of which are loaded and executed when the system is booted.  The RT file copy utility can also be accessed from within CVI; select the Run>>Switch Execution Target>>Select Target With Options... menu item, then after you select your target from the ring, press the "Copy Support Files..." button.

There is also a command line interface to the utility, which can be helpful for targeting multiple machines.  Details can be found in the online help that is linked to the utility's Help button.

One thing to note: if you statically link against any DLLs, you must be sure to explicitly copy those to the target as well.  This is something that the CVI environment does for you automatically when you download your application DLL, but the RT file copy utility does not.

Hope this helps.

Mert A.
National Instruments
Message 2 of 5
(4,709 Views)
Hi Mert,

Thanks. One thing I'd like to point out is that the CopyFile utility won't work if you have password-locked the target. 

How can one restart a DLL already copied to the target from a host pc without rebooting the target?
0 Kudos
Message 3 of 5
(4,687 Views)
I'm afraid I can't offer much help as far as restarting a DLL in the event of a program crash or unexpected error.  In general, you should design your RT app not to exit until the machine shuts down.  Maybe someone else has more experience with this.

Locking the machine is meant to prevent anyone from altering its configuration, which of course includes installing any DLLs via the file copy utility.

Mert A.
National Instruments
0 Kudos
Message 4 of 5
(4,681 Views)
Hello,
 
I agree with Mert here. Any Real-Time application (in this case a CVI DLL) should be designed such that it does not complete execution until you tell it to do so explicitly or you reboot the RT target. This could be as simple as putting a loop in your code or a more sophisticated state-machine architecture. Check out some of the shipping examples with CVI RT if you need some "inspiration" 🙂
 
Hope this helps, 
Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
0 Kudos
Message 5 of 5
(4,668 Views)