02-11-2008 08:30 AM
02-12-2008 03:31 PM
Hi,
We do have an example for HSDIO card in C#. One of them is C# niHSDIO - Static Acquisition.
If you take a look in the HSDIO driver readme; look under system requirement, you will see that we do not have c# .NET on the list, one of the workarounds we have is: Microsoft Visual C# and Visual Basic .NET Wrappers for National Instruments Modular Instruments Driv..., for many modular instruments products, .NET wrappers have been created and are attached below. The attached wrappers are based on the ANSI C API that is installed with the drivers of the respective instruments. So my suggestion would be to open the C example as a guide and use the wrapper to call the C functions.
I hope it helps
02-13-2008 01:21 PM
02-14-2008 11:54 AM
Hi,
So I guess you are already looking at the functions C functions, these are the functions responsible of initialization and closing of either the acquisition or generation sessions: niHSDIO_InitAcquisitionSession (deviceID, VI_FALSE, VI_FALSE, VI_NULL, &VI)); niHSDIO_close (VI);
If you take a look at the wrapper that is included with the only example I was able to point you to, the first two functions are: “InitAcquisitionSession” and “InitGenerationSession”. After chatting with one of my co-workers it seems that you have made your own wrapper from the HSDIO.dll. This library has a function call HSDIO_close in it and there should be one for initialization.
Remember you can always use our wrapper.
I hope it helps
02-14-2008 12:02 PM
Hello,
Thanks for getting back to me. I am looking at the "C" example to understand the names of the methods to call in C# with Visual Studio 2005. When I am writing the code in Visual Studio 2005, the only close function I can find is CloseExtCal, which closes a external cal session, which is different that closing a generation session.
Regards,
Kaspar
02-15-2008 12:13 PM
Hi,
One of my co-workers with a lot more experience in C# programming has answered the same question. “How do I close a generation session in C#”
I hope it helps