LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Running dll file on RT target

hello, I called the .dll file in the LabviewRT system, the dll file compiled by vc++2010, mscvr100.dll was also installed in the terminal device, but the error code 7 was returned. This problem has been bothering me for a long time. I don't know whether there is a problem with the file path or other problems,Could you please share your VI? thank you

DaisyL

0 Kudos
Message 51 of 57
(625 Views)

@DaisyL wrote:

 

The path is loacled to the rt system.

 

 


That doesn't matter. The Call Library Node (and all LabVIEW file functions in general) simply will not handle FTP paths. This is not a browser but a file API. (And besides every modern browser will not work with FTP paths either!)

Rolf Kalbermatter
My Blog
0 Kudos
Message 52 of 57
(623 Views)

Now my logic is confused, can you share a working VI,please

0 Kudos
Message 53 of 57
(616 Views)

Basically get rid of that whole path constant on the diagram and instead configure the DLL name to be inside the Call Library Node. For Pharlap ETS, LabVIEW will actually deploy the DLL too to the target in that case (that won't work for other realtime targets since the Windows DLL has no meaning for them). You of course still need to make sure you installed the correct C Runtime version to the target yourself.

 

Or you can instead change that path on the diagram to be the DLL name only and make sure you copy the DLL yourself into C:\ni-rt\system on the target.

Rolf Kalbermatter
My Blog
0 Kudos
Message 54 of 57
(592 Views)

There are two operating systems installed on NI8840, namely win7 and RT. I opened the file directory of RT system through NI max, but did not find C disk. Should I  copy the .dll file to C: /ni-rt/system in win7 OS?

The following is my operation step. Is there any problem with my operation step?

0 Kudos
Message 55 of 57
(570 Views)

My understanding of your pictures is very limited as my Chinese (or Japanese or Korean) is less than non-existent.

 

Basically you mix and match different paradigmas here. If you connect through the remote file browser (be it Windows File Explorer or a Web Browser) you of course see the file hierarchy as it is mapped by the device to the FTP or WebDAV view of that browser. The actual file system on the controller is however FAT32 or usually more likely the Pharlap Reliance File System. But this presents a Windows compatible file system to the actual code running on that system. And when you execute LabVIEW code in a project that has a device target mapping to that system, this VI sees the local file system, not some FTP, WebDAV or whatever mapping of it.

 

This is also indicated by your diagram constant ftp:\something in one of your earlier pictures. If you pay attention, this is not an ftp path but a Windows path although an invalid one, since you obviously have no volume with the name FTP on that system.

 

So yes if you want to copy the DLL to your system through your File Explorer or similar, you have to put it into "ni-rt/system". When you use a path constant on your LabVIEW VI running on that system, this will be however "C:\ni-rt\system". But since you put the DLL into the system folder, you can simply specify the DLL name only without any directories in front. LabVIEW will request that DLL from the OS and the OS will simply find it by its name since it is located in the system directory that Pharlap ETS will automatically search for such requests.

Rolf Kalbermatter
My Blog
0 Kudos
Message 56 of 57
(537 Views)

Thank you very much,I get it!

(1) copy the DLL to the Resource directory of the Labview installation path(figure 1).

(2) copy the DLL to .../ni-rt/system;

(3) (figure 2);

(4) .dll compiled with vs2009 or vc2010;

Daisy L

0 Kudos
Message 57 of 57
(530 Views)