Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

How Can I Add Folders Of Startup DLLs for Real-Time Systems?

Primary Software: LabVIEW Modules>>Real-Time Module
Primary Software Version: 7.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

Problem:
I need to load multiple DLLs at startup, which will then be accessed (maybe as dependencies of other DLLs I have made) in my startup executable. How can I be sure that my entire user directory of DLLs is loaded into RAM automatically?

Solution:
In the ni-rt.ini file, edit the line that starts with PATH.

On an ETS machine, it resembles this:

PATH=c:\NI-RT\system\;c:\NI-RT\;

On a VxWorks-based controller, such as a cRIO 901x series, it resembles this:

PATH=/c/ni-rt/system/;/c/ni-rt/;/c/ni-rt/system/;/c/ni-rt/;

To add a user folder of your choosing, where DLLs you have created reside, simply modify this line of the ni-rt.ini file. Be sure to append a semicolon ( ; ) to your entry, to avoid overwriting it when updating drivers.

For example:

PATH=/c/ni-rt/system/;/c/ni-rt/;/c/ni-rt/system/;/c/ni-rt/;/c/myCode/DLLs/;

On reboot, the machine with this INI file would load any DLLs discovered within the myCode/DLLs directory. You are free to use any name for your user directory.

Note: Adding folders to this search list will affect search time, therefore lengthening the bootup process. How much it lengthens bootup depends on the size of your code, and the number of directories and subdirectories added to the path.
Removing the default entries from the PATH is not supported. This would prevent the NI LabVIEW Real-Time boot process from completing properly.

Note: DLLs do not work with VxWorks.  VxWorks uses .out files which are also Dynamically Linked Libraries, but do not have a .dll extension. 

Related Links:
KnoweldgeBase 43QD6TS9: Calling External Code on cRIO-9010 Series Controllers
KnowledgeBase 4AJCLGCY: Phar Lap ETS and VxWorks Compliance with Internet Protocols


Attachments:





Report Date: 03/29/2007
Last Updated: 12/04/2007
Document ID: 47SG4UXL

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit