LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

downloading DLL to RT target

Solved!
Go to solution

I am very new (as in a few days!) to working with a LabVIEW realtime system.  Apologies if the answer to my question seems obvious 🙂

 

I have a project and have added to the target a VI which uses the Call Library Function Node. 

 

This node accesses a DLL (which will read an ini file and then access another DLL).

 

I added the DLLs to the project, but I do not see that they are downloaded with the VI.

 

How do I download these DLLs?  I am not discussing final deployment now, but during development.

 

How do I download the ini file?


How do I determine where to put these files?  One DLL must be found by the Call Library function node.  The INI file in the same directory as that DLL, and the third DLL can be anywhere but its path must be put into the ini file.

 

Thank you.

Batya

0 Kudos
Message 1 of 17
(4,819 Views)

Hi Batya,

 

what kind of "realtime system" do you use?

 

If it's the "standard" cRIO you will be out of luck with standard Windows DLL files as they use a different OS...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 17
(4,818 Views)

Thanks!

I am using NI PXIe-8133 running LabVIEW Real-Time 11.0

 

The DLL was built properly in LabWindows/CVI to run on a realtime target -- we have customers who are already using it.

 

I just don't know well enough how to work with projects and realtime targets and DLLs all put together!  I searched in the help, and on the NI website, and looked in LabVIEW help, but the answer (which is probably pretty basic) still eludes me.

 

Thank you.

 

0 Kudos
Message 3 of 17
(4,814 Views)

Hi Batya,

 

usually you include files as "always included" in the app builder properties to store them on the target...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 17
(4,811 Views)

Hello GerdW and thank you for your quick responses!

 

I have no application built or being built here. 

I am in the early stages of development, and I probably won't build and deploy an application anyway.  We are providing and API to our hardware -- we have a DLL and our VIs are wrappers for the DLL calls.  The closest thing to an application we need is a demo VI which will use our library.

 

But right now I just want to get started.  I want to write a little demo VI that calls a few of our functions -- or even, as a first step, just open our Init VI and run it.  But it needs to access the DLL!

 

Thanks.

Batya

0 Kudos
Message 5 of 17
(4,805 Views)

Hi Batya,

 

I usually create an RTEXE and deploy that to the RT target. Due to deploying all needed files (as INI or DLL) is available on the target.

 

Then I can run a VI in the development environment on the target and it will find all files needed on the target.

 

So my advice is: create a (dummy) RTEXE with all additional files needed and deploy it to the target!

 

You may use FTP access or MAX to copy files to the target too, but I never used that before...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 17
(4,801 Views)

Thank you, I'll try that, when I can figure out what you mean Smiley Happy

OK, I'm exaggerating; I have a basic idea what you mean and just have to figure out what it means in practice.

BTW, I only have an eval version of the application builder (I have the full development system, not professional.  Hey, they just upgraded me from basic!). 
  Is that going to be a problem when my eval runs out? 

 

Now, how do I make sure that the dll will be in the right directory for the VI to find it when I run it in development?

 

(For anyone else out there, I'd love to know how do do this via MAX -- I looked in MAX but it seems to let you add/remove software packages and not your own files.)

 

Thank you very much.

Batya

0 Kudos
Message 7 of 17
(4,798 Views)
Solution
Accepted by topic author BPerlman

If you right-click the RT target in MAX you get an option "File transfer". This opens a basic FTP client.

I prefer to use a "real" FTP client instead, e.g. FileZilla.

Using FTP you can copy the dll to the RT target, but I don't know where you have to put it if you run the VI directly. If you deploy an exe the support files usually go into a subfolder 'data'.

Message 8 of 17
(4,784 Views)

Thank you dan_u.

 

I used the File transfer option in MAX -- it was good enough for me!  Very cool to be able to see the directory structure and files on my target.  This probably sounds very basic -- but I really am a beginner and this was not mentioned in the tutorial which I used to learn LabVIEW real-time basics.

 

Anyway, I copied my DLLs (and an INF file as I then discovered I needed as well) to the system directory on the target and voila! my VI sees the DLL and I can initialize access to my card!   Progress!  Joy!!

 

GerdW:  Thank you too for your assistance -- I hope to try your method at some point too.  Assuming it works (since you do it!) it will be a shame that I can not mark two different messages as the solution.

 

Thank you both.

Batya

0 Kudos
Message 9 of 17
(4,755 Views)

hi
thank you for your guide.
I use LabVIEW Datalogging and Supervisory Control (DSC) Module in my pc. I want to run this module in NI-PXIe 8135. when I run my program Vi, this error display:

 

Deploying NI_DSC.lvlib: Request System Event Notifications.viNI_DSC.lvlib:Request System Event Notifications.vi loaded with errors on the target and was closed.
LabVIEW: Failed to load shared library nialarms.dll:ni_lvdsc_alarm_subscribeToSystemViaEvent:C. Ensure that the library is present on the RT target. Use either MAX to install NI software or FTP to transfer custom libraries to the RT target.

 

 

Now I use FTP and copy the dll to the RT target as you said, and Run my Vi, but the above error display again. please guide me.

thanks


Capture.PNG

0 Kudos
Message 10 of 17
(3,510 Views)