LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

System_Type

Hallo,

ich rufe ein .Net DLL  in CVI als Function Tree eingebunden. Eine Funktion benötigt einen Parameter vom Typ System_Type eines elementaren Datentyps

In VB.Net würde ich diesen Paramter mit z.B. GetType(Boolean) initialisieren.

Ich habe inzwischen die mscorlib2 Bibliothek mit eingebunden - jedoch werde ich dort nicht schlau.

 

Kann mir jemand sagen wie der equivalente Aufruf in CVI zu dem Beispiel von VB.Net aussehen muss. Und welche "initalisierungen" a la xxxx__Create() oder Initialize_xxx() notwendig sind.

 

Vielen Dank an Euch alle.

 

I have included a .Net DLL in CVI as a function tree. One of the functions need as paramter a type System_type, and in fact a basic data type (int, boolean...).

In VB.Net I would simply use GetType(Boolean) to get the parameter.

What to do in CVI? I have looked within the mscorlib but it is a mystery to me. Can anybody give me an example please. What type of initializations/includes are necessary like xxxx_Create() or Initilizae_xxx().

 

Thanks to all

 

0 Kudos
Message 1 of 3
(3,087 Views)

Michael69,

 

do you use the CVI Tool "create .NET Controller... "?

 

The "create .NET Controller..." actually creats a wrapper for you that provides c-function with parameters of c data types that are handle to the original .NET DLL.

 

What and how you are trying to include the .NET DLL, within your CVI code?

Kind regards
Tobias S.
0 Kudos
Message 2 of 3
(3,067 Views)

Hi,

 

yes, I use(d) the Create .Net Controller for "my" .Net class and created a wrapper through the CVI system. The .Net class is a communication class labelled "ADS" for Beckhoff equipments. As for now, my tests are just a proof of concept to exchange data between the CVI-system and the Beckhoff equipment.

 

By now, I can successfully compile and run my code, it just doesn't provide the correct results :-((

Instead of a C# version of "GetType(boolean)",  I included the mscorlib2 (provided as instrument) and figured out and used the adequate GetType function.

Just as I said: The result of my code isn't correct and it is very likely that the reason is within this call.

 

I am just now switching to the C++ dll instead where it looks much more positive.

Regards

Michael

0 Kudos
Message 3 of 3
(3,063 Views)