Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Code to convert LabVIEW data type to C# data type

I am calling a labview dll from my ASP.net code as follows.

 

 LVerr = VIServerLib.OpenReference(path, false, out RefVI);

 

and the DLL is as follows

//
// Returns:
// NationalInstruments.LabVIEW.Interop.ErrorCluster
public static ErrorCluster OpenReference(LVPath path, bool reentrant, out VI vIRef);

 

It seems that we can call LabVIEW unique data type directly (For example VIpath, True/False, Error Cluster and so on).

But I have no idea how to convert these LabVIEW data type to C# data type (For example, to strings, TRUE/FALSE, accessing to each element of cluster).

0 Kudos
Message 1 of 2
(2,383 Views)

I don't have experience doing this specifically and I see no references for doing this, but I would think this can generally be assigned safely to strings for the path which is commonly done in LabVIEW, and the elements of the error cluster into a struct.

 

In terms of how this would be declared I imagine it would similar to what is found on the following example.

 

http://www.ni.com/tutorial/8503/en/

 

 

0 Kudos
Message 2 of 2
(2,330 Views)