LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to call Dasylab from other software(written with C#)

Hi,
Anyone can help me? I have to write a software(COMO-an c# user interface)that allow the user to call Dasylab out to run, collect data and send the data back to COMO for analysis.Below are my questions:

1)how dasylab can be called by other software (written in C# language) to work?
(As i know,there is only instruction on Dasylab manual that teach how to make Dasylab as DDE input(dynamic Data Exchange) with VB)

2)do i need to contact the dasylab vendor to get the API for communicating with Dasylab?

3)Any reference(example of the code/book/website) that you can recommend to me?

Really Thanks a lot!


Regards,
Alex.
Newbie that lost.
0 Kudos
Message 1 of 7
(3,479 Views)

Hi Alex

I am not sure you will get an answer in the LabVIEW forum. You might have better luck in the Dasylab forum here http://forums.ni.com/ni/board?board.id=50

David

0 Kudos
Message 2 of 7
(3,471 Views)
Thank you, David. I have posted the message to the Dasylab forum.

Beside dasylab, actually my software need to be able to call other software such as LabView as well. Do you know how to call labview from C#? Thanks a lot for your time!

Regards,
Alex
0 Kudos
Message 3 of 7
(3,458 Views)

I am out of my comfort zone so I couldn't provide the best advice. Take a look at this link http://zone.ni.com/devzone/cda/tut/p/id/3517 to get you started.

Good luck!

David

0 Kudos
Message 4 of 7
(3,449 Views)
Great link, David!

Alex, if all you need to do is make data acquisition calls in LabVIEW, you should be aware that you can use the DAQmx API in C to gain access to the same functions and capabilities that LabVIEW offers.  If you have LabVIEW code that will perform other tasks as well, then the LabVIEW-created DLL is your best bet.  If you have a pre-existing LabVIEW executable, then you can also just call that directly.
Cheers,

Matt Pollock
National Instruments
0 Kudos
Message 5 of 7
(3,432 Views)
Also, if you do decide to use the DAQmx APIs directly, don't use the C Interface - DAQmx does provide .NET APIs as well. You should take a look at the Measurement Studio product we offer, which bundles several .NET components for us.

Calling your LV-built DLL from .NET is pretty straight-forward. If you use C++/CLI, you can just call it - C++/CLI supports an interop layer called IJW (it just works). If you use C#, you'll need to use P/Invoke. Keep the DLL interface as simple as possible in that case - P/Invoke can be a bit tricky.

If you use P/Invoke, check out www.pinvoke.net. It has a lot of good examples to get you started.
0 Kudos
Message 6 of 7
(3,428 Views)
Thanks a lot to Matt and Brian for the solution provided, it really helps me.
 
Regards,
Alex
0 Kudos
Message 7 of 7
(3,381 Views)