Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you start a realtime dll outside of CVI'd ide?

I use CVI and the CVI/Realtime module to develop realtime applications for the PXI-8196RT.  The CVI's IDE provides a great tool to download your DLL to the realtime target and run from there without rebooting the target.  I need this capability in my host application to download, depending on test configuration, a specific dll to the target without using the CVI ide. Is there a tool I can use to put in my host application to do the exact same thing? The FileCopy Utility provided by CVI can do this trick but I need to know how it flag a dll as startup. Any suggestion? Thanks.
0 Kudos
Message 1 of 7
(4,672 Views)

Hi AcqirisUser,

I'm a bit confused as to what you mean about running your DLL at start-up.  A DLL is a list of functions that can be called when included in a program.  If you download the DLL to the target, you can make calls to this DLL from any program that now runs on that target.  Are you trying to run an executable at start up that has been created in CVI, or do you just want to be able to access this DLL after downloading it?

Please clarify what you mean for me, and let me know if there is anything else I can do for you in regards to this issue.

Best of luck on your application, and have a great day!!

Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
0 Kudos
Message 2 of 7
(4,654 Views)
Hello CPhuong,

The target is a PXI-8196 controller (ETS) with the Pharlab Realtime (RT) operating system. To run a program on a RT target, user needs to compile and link the program as a DLL format, not the EXE format that we normally run under other OSes, and then download it, via FTP, to the controller (target) and give it a run-on-startup status. After rebooting the target, the dll will be excuted by the Pharlap OS.

 I wanted to build a host appliction that the user can select a DLL from a repository and download it to the target and excute it without using the CVI's IDE or its FileCopy utility. I can handle the downloading step, but I need to know where the dll is located in the target and how to tell the OS to execute this DLL.
0 Kudos
Message 3 of 7
(4,651 Views)

Hi AcqirisUser,

After researching this issue a bit more, there is no way to download and run a dll without using either the FileCopy utility or the CVI IDE.  With CVI Real-Time, the only way to download a dll to the target is to use either the FileCopy utility or the CVI IDE.

I hope this answers your question, but if there is anything else I can do for your regarding this issue, please let me know. 

Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
0 Kudos
Message 4 of 7
(4,631 Views)
Howdy AcqirisUser,
 
You also may want to look at your old post where one of our developers "Mert A." responded to you.  As you already know, the LabWindows/CVI IDE automatically downloads your application and any statically linked DLLs to the target machine. On that same note, you can use the File Copy Utility inside or outside of LabWindows/CVI (<CVI>\bin\RTFileCopyUtility.exe) to download your DLL. When using this utility, you can specify which DLLs should be run at system startup (any number you wish) by using the Toggle Startup DLL option.  See the section "File Copy Utility" inside of the LabWindows/CVI Real-Time: Bringing Mission-Critical Reliability and Determinism to ANSI C Programmer... tutorial.
 
Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 5 of 7
(4,627 Views)
Thanks for the responses, Jonathan and CPhuong.  I knew I posted this question before but I was hoping someone from this forum could have a solution.  The only reason we wanted to do from our own app is that we have to automate our test from just one central control computer (host computer) which, among other tasks it has to do, executes a script file with information about a particular dll version should be run on its designated controller for the test of the day.  The host computer then downloads this selected dll from a central repository to the targeted controller, reboots it and starts the test. That process could involve many controllers with many different version of DLLs.  Our fall back  plan is just to use the command-line function of the FileCopyUtility instead. Thanks again.
0 Kudos
Message 6 of 7
(4,615 Views)

Hi AcqirisUser,

Thanks for explaining a little more about your application.  It sounds like you might have some ideas on providing alternative ways of downloading DLLs to that RT target.  If so, I would suggest submitting a product suggestion as this goes directly to R&D.

As you noted, the File Copy Utility supports a command line interface which allows you to target multiple machines. In your application, you could import the script, strip out the DLL and target machine names, then build a command line string. Then programmatically call the File Copy executable with this string.  If you made this modular enough, it could be very flexible which would make your life much easier.  This interface support the ability to specify if the DLL is a startup DLL as well.   

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 7 of 7
(4,609 Views)