09-05-2019 11:17 AM
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:
Kind regards,
Germain
Solved! Go to Solution.
09-07-2019 10:02 PM
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
09-11-2019 04:46 PM
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
09-12-2019 11:19 PM - edited 09-12-2019 11:23 PM
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.
09-12-2019 11:39 PM
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.
09-16-2019 03:41 PM - edited 09-16-2019 04:17 PM
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.
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
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.)
10-22-2019 04:39 PM - edited 10-22-2019 04:45 PM
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:
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:
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.