LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Imaq refnum c#

Hi,

I'm trying to send an image from C# to labview by using Interoperability.

I have a bitmap variable in c# and i want to pass it on labview. But i have to use Imaq and the only way i found is to save this one one hdd, but this solution is very very long...

How can i generate an Imaq from C# and pass it with interop ?


You'll find in attatchment my vi and interop dll.

 

Thanks a lot.

 

I'm using LV2012, VS2010 and C#

 

 

Download All
0 Kudos
Message 1 of 6
(3,384 Views)

Hi Seb,

 

If you're question is about how to use Interoperability with LabVIEW, you'll find several tutorials in the links below that teach you how to do so :

 

>> Building a .NET Interop Assembly (Windows)

>> How to Add a LabVIEW .NET Interop Assembly to the Global Assembly Cache

>> How Do I Use a LabVIEW DLL in Microsoft Visual Studio.NET?

>> Interoperability (C# Programming Guide)

 

Was it what you were looking for?

 

Have a nice day

Marc-Junior

0 Kudos
Message 2 of 6
(3,310 Views)

Hi Marc,

 

Kind of, yes.

I already know how use generic fonction with interoperability such as Dot product, Multiply, and other.

 

But my real problem is, how can i use Imaq from C# ? For other function i'm using only simple type like double or array.

In my case, i must save bmp on hdd and load it after, in my LV code... Not really efficient and little long.

 

 

0 Kudos
Message 3 of 6
(3,305 Views)

Ok it's a different question then. The best method for that would be to use the NI-IMAQ Function Reference Help that you'll find in a place that looks like that : C:\Program Files (x86)\National Instruments\NI-IMAQ\Docs

 

If the drivers are not yet installed on your computer you can download it from there : NI-IMAQ Function Reference Help

 

There also are some exemple that may help you and should be installed on your computer : C:\Users\Public\Documents\National Instruments\NI-IMAQ\Examples

 

I hope this helps,

Have a nice day,

Marc-Junior

 

0 Kudos
Message 4 of 6
(3,300 Views)

All of exemple in C:\Users\Public\Documents\National Instruments\NI-IMAQ\Examples are very interesting. (unfortunately, no much reference about it on the net)


But i can't find any refnum to use as parameter for an interop function.

Is it in the ImaqSession ?

 

Thanks a lot.

 

 

 

0 Kudos
Message 5 of 6
(3,297 Views)

Mistake 🙂

 

I'm trying to use Imaqdx; Then ImaqdxSession.

0 Kudos
Message 6 of 6
(3,295 Views)