LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to access a DLL copied to a cRIO-9081 tagret.

Solved!
Go to solution
Highlighted

Hi,

 

Problem: In a simple test, I cannot access a DLL copied to a cRIO-9081 tagret.

 

- I have created a LV project, in which the NI cRIO -9081 target has been added.

- I have created a VI on the target, in which I want to test working with NI 9205 (Analog Input) and NI 9264 (Analog Output) C Series modules.

- In the VI, I want to call simply the "add" fucntion in the "simplCalc.ddl" library using Call Library Function Node. (Using FTP the simpCalc.dll is copied to C:\ni-rt\system)

- BUT in "Call Library Function Node. Configure..." I cannot locate the DLL on the target harddrive.

 

Can you please help me in this case?

 

Attached you would find the LV project file.

 

Thanks

 

 

 

0 Kudos
Message 1 of 6
(1,388 Views)

you only uploaded the project file .. not the project (or at least your vi)

 

 

 

 

 

my way was to ceate a build specificaton

 

add your file to "always included" list in "Source Files"

 

set the "Support Directory" in "Destinations"

 

and finally in "Source File Settings" choose each file (you added to "always include") and check, that its Destination is the Support Directory

 

 

to reference the file explicitly in any of your RT VIs,

build the path with the App-PropertyNode's Application.DirectoryPath and a string containing your support-dir + filename

 

 

hope that points you in the right direction

 

<edit> note that i used this to start my asynchronous vis, don't know if theres anything different with .dll</edit>


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 2 of 6
(1,360 Views)
Solution
Accepted by topic author rezafirouzi

Is the cRIO running Windows or LabVIEW RT as the OS? I guess it's LabVIEW RT - is the DLL compiled/compatible with Phar Lap (the LabVIEW RT OS) or is it a Windows DLL?

 

The Call Library Function node configuration will *always* look on your PC (it's an explorer dialogue, after all), not the drive on the target. Normally you would configure the DLL to use a relative path (e.g. by just specifying the name of the DLL or by wiring the path (tick the box under the path) directly).

 

Here are some resources:

http://digital.ni.com/public.nsf/allkb/0BF52E6FAC0BF9C286256EDB00015230

http://digital.ni.com/public.nsf/allkb/2EA49B05E67DDECF86256F9A006FB315

0 Kudos
Message 3 of 6
(1,349 Views)

It worked.

 

Exactly it was the case.

I thought I can browse and find the DLL on the cRIO.

But I found that I should just write  the name of the library as (simpCalc.*) and it will be automatically detected.

 

So in this way, it would not be possible to see the list of exported functions/methods of the DLL? and we need to know their name alongside their prototypes?

Am I write?

 

Thanks

0 Kudos
Message 4 of 6
(1,316 Views)
That's pretty much true in any case - you normally need the DLL and the header file (and if you're lucky, some documentation) to be able to make sense of and use the DLL. The DLL Import Wizard in LabVIEW requires a header file.
0 Kudos
Message 5 of 6
(1,295 Views)

Hello,

I'm writing to you because i'm trying to do the same thing.

I have a 9081cRIO and the simpCalc.dll.

I'm able to run the dll under the cRIO target using the call library function node, but when i build a real-time application, it doesn't work anymore.

 

Did you try to build a real-time application calling the simpCalc.dll?

I would like to know how you manage to do it.

Thank you

0 Kudos
Message 6 of 6
(1,054 Views)