LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET references with OOP

I have a large OOP app that uses various external instruments from multiple vendors, the instruments are controlled over .NET.

My colleague creates DLLs in VB that communicate with the same instruments, the DLLs are structured in such a way that we can create a GUI in LabVIEW or VB and call the same DLLs to perform the same functions. 

 

I'm trying to use a DLL that connects to multiple instruments, and I'm having trouble dealing with the constraint that LabVIEW does not like the .NET reference to be passed out of the Class.

 

In the diagram below, I am attempting to pass the .NET reference for the motion system to the DLL.  Elsewhere in the app, the motion system would obtain the reference and command a move from A to B, i.e. the motion VIs you see in the diagram below are normally sub-VIs of a motion VI that would command the motion.  This new DLL is design to command moves and therefore needs only the reference to the motion system.

 

How do I create a design pattern to accommodate what I'm trying to achieve?

 

LVdiagram001.jpg

0 Kudos
Message 1 of 3
(103 Views)

this looks like a type mismatch between 'get .net ref' and motion device. Of which type is 'motionDevice' and which type does 'get .net ref' output?

Actor Framework
0 Kudos
Message 2 of 3
(65 Views)

Try 'To More Specific', i've solved similar problems with that before. .NET seems bad at handling inheritance.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 3
(52 Views)