PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

General Questions about PXI

Solved!
Go to solution

Dear LabVIEW Users Community,

 

We developed a machine monitoring software in C# (WPF), but we just purchased PXIe-8880 RT. We don’t want to waste our past efforts in C#.

 

Can we `mix' LabVIEW GUI & WPF:

    • Can we call LabVIEW GUI function and use them from C#
    • Vice-versa
    • Can we mix C++ (or C) function with LabVIEW functions

Kind regards,

Germain

0 Kudos
Message 1 of 7
(2,396 Views)

Why did you purchase RT PXI controller? Do you want to run your code in deterministic loop?

Do you have any reason?

 

You can call .NET class developed with C# in LabVIEW, but cannot run in on RT.

We can develop RT application using LabVIEW only, not C#.

If you are going to develop new LabVIEW application running on RT, I believe you can use your C# code.

 

I assume following system settings.

 

Windows (C# application)

- user interface

- communication between Windows and Real-Time OS using TCP or other network method

 

Real Time (LabVIEW application)

- Deterministic task

- send or receive data/command from/to Windows

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
Message 2 of 7
(2,320 Views)

Thank you for your reply Emboar,

I will confirm the answer to your questions.

 

Meanwhile: I am also encountering a problem while trying to run C or C++ on the PXI:

I have tried the example `External Code (DLL) Execution' (see first picture) on the PXI, to see what would happen (my project looks as on the second enclosed picture.)

 

I get the following error:

 

Deploying WinINT.viWinINT.vi loaded with errors on the target and was closed.
LabVIEW: (Hex 0x436) Failed to load shared library CLF_Example**.*:WinINT:C. Ensure that the library is present on the RT target. Use either MAX to install NI software or FTP to transfer custom libraries to the RT target.
Deployment completed with errors

 

Is there a way to compile a library for the PXI that we can refer to ?

Is this what LabWindows/CVI is for ? 

 

Alternatively, I also looked at the C node.

Given the trailing comment on the page, I have a feeling this won't work on PXI, or at least not the same.  Beside, the limitations makes it unsuitable for our purpose.)

 

 

So, can we do C/C++ on LabVIEW RT on a PXI, or can we not ?

 

(I am working in a University Lab, and we are interested in reusing our existing library of algorithms already written in C to develop our application.)

 

 

Thank you very much!

 

Germain

 

Download All
0 Kudos
Message 3 of 7
(2,292 Views)

Hi, where did you place the DLL on RT?

Place your DLL to c:\ni-rt\system using WebDAV and try it again.

 

DLL should be placed there.

Deploying DLL Driver Files on Real Time Target

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
0 Kudos
Message 4 of 7
(2,273 Views)

So I got confirmation from this post that it is LabWindow/CVI we need for our C purposes.

 

Now, I am trying one of the examples, and am encountering problems.

 

The error message is that the target « isn’t connected or the remote debugger is not running . »

 

I did run the steps in the help relating to copying the 2 dlls and setting the debug as startup as well,

 

but still no luck

 

I suppose I can plug in the screen and look.

 

but I don’t know what it is suppose to read when it works.

0 Kudos
Message 5 of 7
(2,266 Views)

Hi again Emboar,

 

Not sure if this is still relevant but:


@Tepig wrote:

Why did you purchase RT PXI controller?


We are interested in such level of control to apply adaptive controls and other processes to a CNC-machining closed loop, so...


@Tepig wrote:

Do you want to run your code in deterministic loop?


...yes, naturally. Smiley Happy


I was pretty sure about this but wanted to confirm with my supervisor, as it goes a little over my head in all honesty.

 


@Tepig wrote:

Do you have any reason?

All I can tell you from my position as a Software Engineer in the project is that dealing with the limitations of a general purpose OS will make it more complicated in the long long run to develop what they are shooting for here.

That was before discovering what was involved in simply getting the device to run though Smiley Indifferent

Thank you very much for your pointer to WebDAV BTW.
I am sure it will come in handy when I get back to getting in the device the LabVIEW .vi way.

 

(edit: nm the last part of my post about not being able to connect to the device from LabVIEW: I was trying to use LabVIEW 64 bits instead of 32.)

 

 

 

0 Kudos
Message 6 of 7
(2,239 Views)
Solution
Accepted by topic author lechapelaing

Just for the sake of closure on this:

 


@lechapelaing wrote:

 

    • Can we call LabVIEW GUI function and use them from C#

Yes, with Measurement Studio

 


    • Vice-versa

Yes, using the `Library Function Call' Node, (but not on RT)

 


    • Can we mix C++ (or C) function with LabVIEW functions

Yes, using:

  • LabWindows/CVI (C)
  • Visual Studio (C, C++), albeit conforming to this.

Finally, but most importantly:

The root of all the dismay we have been experiencing was because we were trying to match the versions for each software on our host machines to the ones present on the PXI.

Whereas, the proper way (which we did not find documented nor got advise from support explicitly) is the other way around:

  1. Make a clean install of the entire NI software set on all host machines (having all at the same NI software version.)
  2. Wipe the PXI clean
  3. Re-install LabVIEW RT and required driver from the NI-MAX on the fresh install.

 

In hope this would prevent someone else to go through the same difficulties as us for too long.

 

 

Edited:

 . no C# on Real-Time

 . Link to the device setup (presented as reset) procedure.

0 Kudos
Message 7 of 7
(2,138 Views)