LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to programmatically set the real-time CVI startup DLL?

Dear NI Support Engineer:

 

I'm part of a team of software engineers working on a real-time aerospace app at Honeywell (Coon Rapids, MN campus).  We're using LabWindows/CVI 9.0 and three LabView 8.6 real-time modules.

 

Up until now, we've been using the CVI debugger to launch our real-time apps or just copying the app DLL to C:\ni-rt\cvi on the real-time box and setting it as the default startup DLL.

 

What we need to do now is create our own directory structure at the root of C: on the real-time box (which, by the way, is using the Reliant file system).

 

In fact, we have created directory ug7500 at the root of C: on the realtime box, and two subdirectories (one for data and one for results) directly under directory ug7500.  We'd like to place all of our app DLLs in the ug7500 directory and have the ability to change the default startup DLL programmatically.

 

We've been using your LabWindows/CVI Real-time File Copy Utility to set the startup DLL whenever we're not using the debugger.  That was just fine for the first stage of our development.

 

At this stage, however, we need be able to set the startup DLL programmatically.  We have not been able to find out how to do this from reading the real-time module documentation.

 

Can you either point us at some documentation on programmatically setting the default startup DLL, or e-mail us the instructions, or give us a phone call and explain what steps we must take.

 

Thank you very much.

 

Vic
763-957-4168

0 Kudos
Message 1 of 4
(3,467 Views)

victaylor04-

 

           Here is a KnowledgeBase explaining startup dlls using CVI. It's on how to make it not a startup but just do the same steps except for at the end toggle the dll to "startup dll". Also, I think you are a little confused on your applicaton. If you are using LabWindows than you are using the CVI Real Time Module and some Real-Time Target. The LabVIEW 8.6 Real-Time Module is for use in conjunction with LabVIEW. What hardware are you using (RT Targets)? Not getting onto you, just pointing out that in the future you will get better results if you post to the forum (CVI instead of LabVIEW in this case) that is your major software/hardware item. Let us know if this helps. 🙂

0 Kudos
Message 2 of 4
(3,448 Views)

victaylor04-

 

            It would have helped if I would have posted that KB. Well here it is. http://ae.natinst.com/operations/ae/public.nsf/web/searchinternal/6608929bcdfed570862574f20069d9a3?O...

Hope it helps. 🙂

0 Kudos
Message 3 of 4
(3,446 Views)

Hello All,

 

For the reference of anyone else trying to do this, you can modify the INI file to change the startup DLL. Using the INI instrument that ships with CVI (C:\Program Files\National Instruments\CVI90\toolslib\toolbox), you can find the StartupDLLs tag and replace the last value with your startup DLL, such as:

 

#include "inifile.h"
#include <cvirte.h>
static int status;
static IniText myINIFile;

int main (int argc, char *argv[])
{
 if (InitCVIRTE (0, argv, 0) == 0)
  return -1;    /* out of memory */
 
 myINIFile = Ini_New (0);
 
 status = Ini_ReadFromFile (myINIFile, "c:\\ni-rt.ini");
 
 status = Ini_PutRawString (myINIFile, "LVRT", "StartupDLLs", "c:\\NI-RT\\system\\cvi_lvrt.dll;c:\\ni-rt\\system\\nidevldp.dll;nisysapirpc.dll;niorbp.dll;c:\\ni-rt\\system\\mxsemb.dll;c:\\ni-rt\\system\\nipxism.dll;c:\\NI-RT\\cvi\\myStartup.dll;");
 
 status = Ini_WriteToFile (myINIFile, "c:\\ni-rt.ini");
 
 return 0;
}

 

Right now, there are some caveates with using CVI 9.0 to manipulate an INI file to be used on an RT target. The INI functions currently add line breaks automatically for large tag values and adds quotes around the values. For many INI files this is ok (such as TestStand INI files), but it will not work on an RT target. To remove these features, modify the following lines of the inifile.c file located in the same directory as the INI instrument:

 

1. On line 38, change the default value of INI_NUM_CHARS_PER_LINE from 80 to a large number such as 8000.

2. Comment out line 953 (newEntry->addMarkerQuotes = addMarkerQuotes;

 

Now you should be able to programmatically change the INI file of your target machine and, therefore, change the startup DLLs.

0 Kudos
Message 4 of 4
(3,288 Views)