From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

step to rename a DLL library

I am trying to use on LabVIEW-RT some examples which are calling a DLL library. But the library has a file name greater than 8 characters and for this reason I can't download it on the target system which supports only 8.3 filename.
First, I have renamed the DLL to use a 8.3 filename.
Second, I have open all the vi and sub-vi to define the new DLL path. But when I try to download the vi to the target, I still have a "load failed" error with the original name of the DLL.
What is missing ?
0 Kudos
Message 1 of 6
(3,872 Views)
Which examples are they? Do they ship with LabVIEW or LabVIEW Real-Time? Which DLL is it?

The DLL might be making calls that are not supported on the Real-Time operating system.

See this posting and Developer Zone: Programming for the LabVIEW Real-Time Module Using LabWindows/CVI.

Regards,

Chad H.
Applications Engineering
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 6
(3,872 Views)
In fact, it is examples to use a third-party controller. This controller has a VISA driver, a DLL to interface the VISA driver and some LabVIEW examples to use it on LabVIEW.
I have solved the name problem, but I have still the load error (now with the good DLL name) :
"Failed to load shared library pipx40.dll: pipx40_error_message:D on RT target device"
where pipx40.dll is the name of the library and pipx40_error_message is the function called by the VI that I am trying to download.
I don't know why this load fails :
- Does LabVIEW not find the library on my host system ?
- Should the library be already on the target system, and in this case where ?
- Other reasons ?

I have tried to use 2 LabVIEW examples using DLL : hostnames.vi and Pl
ay Sound.vi .
When I try to download these 2 examples on my target system, I have the same type of error, but with hostnames.vi, the letter after the function name is "C" instead of "D".
What does this letter mean ?

Regards
Hubert Robitaille
0 Kudos
Message 3 of 6
(3,872 Views)
Hubert,

The DLL was most likely written and tested under Windows, but never tested in LabVIEW Real-Time. The DLL most likely makes calls that are not supported.

Since the device is programmable through VISA, the way to communicate with it in LabVIEW Real-Time is through the LabVIEW VISA VIs. See Knowledge Base 2CCG05KN: Using VISA to Write Drivers Supported in LabVIEW Real-Time for Third Party .... Also see Knowledge Base 247CIO4U: Can I Use a Third-Party Device with LabVIEW Real-Time (RT)?
.


For using DLLs in LabVIEW Real-Time, see Programming for the LabVIEW Real-Time Module Using LabWindows/CVI.

Regards,

Chad H.
Applications Engineering
National Instruments
http://www.ni.com/ask
0 Kudos
Message 4 of 6
(3,872 Views)
I agrre that the DLL was never tested in LabVIEW Real-time. But, even I have already read all these pages that you have mentionned, I didn't find information on the downloading of the DLL and I don't explain why the download fails.
As I don't have a working experience with DLL, I don't know how it should work normally :
Is a DLL downloaded automaticaly on the target when we download a VI which uses this DLL or should the DLL be already on the target system in a specific directory ?

For me, I am thinking that the downloading has nothing to see with the possibility to execute the DLL on LabVIEW-RT. I understand that, if the DLL calls unsupported function, I will have errors at the execution time but I don't undertsand why the erro
r is at the downloading time.

Regards,
Hubert Robitaille
0 Kudos
Message 5 of 6
(3,872 Views)
Hubert,

If the DLL is not supported, then you will get the error when you try to download the VI that calls it. There is no way to know what is wrong with the DLL without building the DLL with CVI. When you build a DLL for LabVIEW Real-Time with CVI, if you are using unsupported functions, CVI will tell you which ones are unsupported. If you build the DLL using a different compiler than CVI, then the DLL may or may not work, depending on if you are making calls that are supported or not.

Regards,

Chad H
Applications Engineering
National Instruments
http://www.ni.com/ask
0 Kudos
Message 6 of 6
(3,872 Views)