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: 

Running dll file on RT target

Your myRIO has however an ARM CPU and needs a completely different version of the GCC compiler toolchain to generate a working .so file that can run on it. In one of my earlier posts I included a link to an installer for the correct compiler. You can either run this from the command line?

 The earlier .so files are created using gcc in linux command line and the linux os is used is 32bit then also am not able to run the files in myrio?

Is this for linux platform right. but how to use this am not getting can you please provide me the link for how can use in command line to create .so file.

 

 

0 Kudos
Message 41 of 57
(895 Views)

Not normally! gcc is a huge software project. While it is modularized and does allow to compile support of various backends into it (each processor architecture and OS ABI is a different backend module) that is usually not done since most users who install gcc on their Linux box do that to compile software for their own box, not cross compiling for other computer architectures.

So your standard Ubuntu Linux or whatever installation on your PC can have a gcc installation (if you installed development support) but that gcc compiler can't just create binary files for any possible computer platform out there. Such a compiler installation would get HUUUUUGE and multi-architecture support in gcc is absolutely not trivial to use!

The most trivial solution is to install the development support on and for the box you want to create the code for and compile it on that box. This can be done with the NI Linux RT controllers since NI has added develop packages for the two NI Linux varieties to their opkg package feeds.

A somewhat more complex solution is to install a cross compiler toolchain on your Windows PC like this I already mentioned twice before or if you rather prefer a IDE you can install the Eclipse based IDE which comes with the two cross compiler toolchains for both NI Linux architectures.

Here is a link for you to read: http://www.ni.com/tutorial/52578/en/

This is the forum for the NI Linux platform. It has many documents and feeds about the topic and you should read through some of them for sure before repeating your pleads to make this work for you. 

As a summary: Your standard gcc installation on your Linux PC can NOT generate shared libraries for any of the NI Linux RT controllers. You need a special cross compiler version of gcc for that, either on your Linux or Windows host PC. Such a cross compiler must have been created specifically for the host you want to run it on (a Linux executable obviously won't run on Windows and vice versa) and with the desired architecture support enabled (ARM code generation for the myRIO).

Or you can install the develop package on the myRIO and then compile your shared library there.

Rolf Kalbermatter
My Blog
0 Kudos
Message 42 of 57
(872 Views)

May I ask if you have solved the problem? I have encountered the same error code 7 as you. My PXIe model is 8840, VS version 2022,thanks

0 Kudos
Message 43 of 57
(659 Views)

Your information is insufficient to give you an answer.

 

NI sells the 8840 with 4 different OSes.

 

Windows 7 (64-bit)

Windows 10 (64-bit)

NI Realtime (Pharlap 32-bit)

NI Realtime Linux (64-bit)

 

So depending how your DLL was compiled it may or may not work on your controller. If it is Window 7 and 10 this should be a fairly easy thing. Just compile your DLL as 64-bit DLL and in the case of Windows 7 make sure you have installed the Distributable Microsoft C Runtime Library for your Visual Studio version.

 

For Pharlap things get trickier but unless you use a LabVIEW version before 2021, this is not supported by LabVIEW anyhow.

 

For NI Realtime Linux, your DLL is just a useless binary file no matter how you change the project settings in your Visual Studio project.

Rolf Kalbermatter
My Blog
0 Kudos
Message 44 of 57
(654 Views)

I am appreciation it  for you reply .

Here is the software and hardware I use:

(1)the OS of the NI 8840 is Real-Time Phar Lap ETS 13.1;

(2)labview version  is 2019;

(3)vs2022 

  (4)   The computer operating system is win11.

The way I do it is;
(1) Using vs2022 to compile dll files, and it can run in labview on windows system.
(2) I uploaded the msvcr110.dll file to.../ni-rt/system through NI MAX. ;
(3) Create a new VI call library function node in labview rt environment;

my question:

(1) After I upload msvcr110.dll, can I compile the .dll file with vs2022? msvcr110.dll seems to be the runtime library of vs2022, but I am not sure.

(2)How to give the path of.dll file in VI, when I write the file path of.dll file above 8840, the drop-down option after the function name is forbidden to select, why?

I don't know whether the above two problems can help me solve the problem, so I attach my .dll file and VI at the end.If my VS version is too high, I also have vc++2010 installed to compile dll files。

Look forward to your reply. Thank you.

DaisyL

0 Kudos
Message 45 of 57
(641 Views)

VS 2022 is not supported for Pharlap deployment of DLLs. The latest version NI supports is VS 2010. Pharlap had sent out a notice to all users around that time that they are discontinuing the Pharlap ETS product as of around 2013. From that point on there was pretty much no sense in investing any more efforts into the Pharlap platform other than what was needed to keep it working. And with VS 2010 it was definitely enough to keep it working for NI.

 

There is absolutely no way to get DLLs compiled in later VS versions so that they can be used on Pharlap ETS.

 

VS2016 and later requires an msvcr14.dll. As you can not install the standard Microsoft version (it wants to hook into Windows 7 and newer APIs specifically that simply do not exist on Pharlap ETS) and there is no NI ported version for Pharlap ETS of that runtime, it simply can't work. 

Rolf Kalbermatter
My Blog
0 Kudos
Message 46 of 57
(622 Views)

Thanks for your reply. Now I compile the .dll file with vc++2010, but it still doesn't work.

The error code is still 7,why?

0 Kudos
Message 47 of 57
(615 Views)

Did you install the "Microsoft Visual Studio 2010 Runtime Support" from within NI-MAX to that target? Just copying some msvcr10.dll over manually is almost certainly not the right thing to do.

 

Also that Call Library Node really can't do anything with an FTP path. This path needs to be local to he system you want to run this VI and the VI needs to be in a LabVIEW project and under the target for that system.

Rolf Kalbermatter
My Blog
0 Kudos
Message 48 of 57
(600 Views)

yes ,i have installed the vs2010 Runtime Support,

The path is loacled to the rt system.

The vi is in the Labview project and  under the Terminal equipment。

 

0 Kudos
Message 49 of 57
(595 Views)

The .dll file was compiled with vc++2010;

0 Kudos
Message 50 of 57
(593 Views)