LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET WPF and Labview are boggling my brain

I'm about to give up on this subject as beyond my capabilities.  I'm good with Labview but basically ignorant of anything c# or c++.

I've read a lot of entries on this subject but it is not coming together for me.

 

In a nutshell:  I have a dll supplied to me for some motion controller equipment.  It comes with it's own setup and control interface.  If I understand correctly, it was written using WPF for the interface (the supplier of the dll told me about WPF, which is the first I had heard of it.)

 

They supplied both a .NET dll and a regular dll.  I've been focused on .NET because it seems like it supposed to be easier since I don't have the .h files I need to comprehend a c++ dll anyway.

 

Googled WPF and found posts that seem to indicate that WPF was not compatible with Labview.  Labview NXG however seems to have been written in WPF and may work for me. But my .NET dll (an 'assembly') did not even appear in the GAC-provided list.  I managed to use gacutil to put my dll in the GAC.  It then showed up when I was setting up a .NET interface.  But it did not provide ANY methods, just blank.  sigh.  Then I read they are discontinuing Labview NXG after 5.1!  So any investment in that direction is pointless.

 

So now I am back to trying to use 2020 SP1 (original attempts were in 2018) but it looks no more capable than 2018.  I've read about wrapping things in winform wrappers but that is all greek to me.  I have VS2020 on this pc but will only go there if somebody were to walk me through a solution.

 

I can throw out the hardware model numbers and other stuff if needed but I didn't think it useful to start this conversation with too much detail.

 

I'm on a PC running Windows 10 Enterprise on an industrial PC.

thanks

0 Kudos
Message 1 of 32
(1,831 Views)

Do you have an example?  You should ask manufacture for examples if not.

Then "translate" it G code.

 

George Zou
0 Kudos
Message 2 of 32
(1,759 Views)

Manufacturer never even heard of Labview and have no customer's that use it. All their examples are in C# or C++ and they do what I usually expect to do for something like this.  'Converting' to G-code is rather ambiguous and the problem I am encountering.

0 Kudos
Message 3 of 32
(1,756 Views)

if you don't know how to translate C# to LabVIEW, post it here.  We can help you.

 

George Zou
0 Kudos
Message 4 of 32
(1,750 Views)

thanks for your help!

Rather than paste code that may or may not be what I want, here is a link to the examples page from the manufacturer.  The Template.cs example might be a good place to start.

 https://rapidcode.roboticsys.com/io_cs.html 

0 Kudos
Message 5 of 32
(1,745 Views)

Please show your VI, so we can see how you did the translation.

 

George Zou
0 Kudos
Message 6 of 32
(1,740 Views)

I don't see how a device interface would benefit from WPF.

 

I think some examples might be written using WPF, but the example code I looked at seems to call the driver assembly just like any other assembly.

 

I'd start by dropping a .NET constructor node on my diagram, and browse to the assembly. Then, see what i get and try to match it to the documentation and\or examples. 

 

If it's available for downloading, some of us might actually try...

0 Kudos
Message 7 of 32
(1,716 Views)

Their setup app was written in WPF.  What I don't know is if the .dll itself is somehow tied to wpf, even though it may itself not create any UI.  WPF is the only excuse I could find that might explain why Labview won't reveal what I expected from the assembly.

 

"I'd start by dropping a .NET constructor node on my diagram, and browse to the assembly. Then, see what i get and try to match it to the documentation and\or examples. "

-This is exactly what I was trying to do.  I don't get ANYTHING from the assembly.

 

Attached is the .dll that I am trying to use.  The software requires a HW dongle so I'm not sure how much of that assembly will be available.  I should see everything that is documented in the API.  I am not confused by the API, it is consistent with other work Ive done on motion control.

0 Kudos
Message 8 of 32
(1,697 Views)

Please show us your VI.

 

> "I'd start by dropping a .NET constructor node on my diagram, and browse to the assembly. Then, see what i get

> and try to match it to the documentation and\or examples. "

> -This is exactly what I was trying to do.  I don't get ANYTHING from the assembly.

 

That might be your problem.

If you look at the .cs file, no constructor created for axis.

 

 

 

George Zou
0 Kudos
Message 9 of 32
(1,692 Views)

Does this mean I can't do what I want? I've yet to see an excuse for why that would be so.

Here is a specific command from the Template.cs example on the RSI link I sent:

 

MotionController controller = MotionController.CreateFromSoftware(/*@"C:\RSI\X.X.X\"*/);

 

How do I get to this from Labview?  MotionController is a class but I find nothing that will allow me to create an instance.  Nothing I attempt leads to this method.  If I have to go through a circuitous route of references I have yet to discover what that sequence is.

Where you able to poke around with the dll I provided?

thanks

0 Kudos
Message 10 of 32
(1,682 Views)