LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a CompactRIO compatible dll using Borland

Hello

I am trying to get a dll running on a CompactRIO 9004 using Labview8.5 developer's suite. The dll works fine when I run the VI on Windows, but when I copy the vi (called host.vi) to the CRIO target and try to run it I get the following message in the deployment status box:

Deploying host.lvproj 
Deploying Jag1

LabVIEW:  Failed to load shared library c:\ni-rt\startup\data\extractor.dll on RT target device.
 (successfully deployed target settings)
Deploying dllclone.vi  (3.20 K)
Deploying RT board LEDs.vi  (11.66 K)
Deploying RT LEDs.vi  (7.05 K)
Deploying host.vi
Failed to download host.vi
LabVIEW:  Failed to load shared library e.dll:getaddress:C on RT target device.

Having read some other posts on the forum, I am working from a folder called ni-rt\startup to mimic the CRIO's directory structure when configuring the call library function node and the dll is called e.dll to be certain of being filename compatible and the function being called is 'getaddress'. The dllclone.vi is a vi that performs exactly the same operation as the dll, to get an idea of speed difference. Jag1 is the name of the CRIO.

I have run 'DLL Checker 8.2.exe' and it gives two bad imports: one in kernel32.dll (GlobalMemoryStatus) and one in user32.dll (EnumThreadWindows). I am using Borland Builder 5 as the compiler and even running this from the command line pointing explicitly at the lib files in 'cintools' and making the dll 386 compatible gives this result. Would changing to MSVC++ make a difference?

I have been running the CompactRIO successfully up till now. Can anyone help with this?

Thanks,

Nathan
0 Kudos
Message 1 of 5
(3,209 Views)
Hi Nathan,

I'd just like to ask a few questions to try to narrow the issue down a bit:
  1. Have you tried upgrading/reinstalling the cRIO software through MAX?
  2. Do you have any other cRIO controllers that you can test with the VI/dll?
  3. Do you have any other dlls that you can test with the controller?
You can also upload your project and dll for me to try out with a controller here to see if I can replicate and fix the issue.

Regards,
Tom

Applications Engineering, NI UK
0 Kudos
Message 2 of 5
(3,153 Views)
Hello Tom, thanks for the reply.

I haven't tried re-installing - my other apps still work on it, so I don't think it's broken. We only have the one CRIO at the minute - I need to get this problem fixed before we go buying any  more! I haven't tried any other dlls yet. As you will see, the one I am using is almost as simple as a dll can get and the application I am running is to test the loading/calling time of the dll and to experiment with passing structures. I've attached the full directory of the project but there are not many files. The dll was originally called extractor, but after building this I've tried renaming it as e.dll as I saw the message in another post about long filenames, though I understand this is an old problem and not an issue any more.

I hope this all makes sense,

Nathan
0 Kudos
Message 3 of 5
(3,143 Views)
If only I had a pound for every time I've forgotton to attach the files...
0 Kudos
Message 4 of 5
(3,142 Views)
Hi Nathan,

I'm working on this issue at the moment, we have been able to replicate it with one of our cRIOs. I'll post back with my findings as soon as possible.

Regards,
Tom

Applications Engineering, NI UK
0 Kudos
Message 5 of 5
(3,097 Views)