Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5357

Use NI VISA instead of DLL provided by vendor.

$
0
0

Dear all,

 

We own a C11165 Hamamatsu DCAM, connected by USB.

We have some .dll and the .lib to make it work. It works perfectly while using it on labwindows, if we use directly the function inside the .lib.

However, we would like to use NI-VISA library instead, but therefore, i have no idea what string I would send to the device. Is there a way to force VISA to use the .lib to make it work ? So I can still use the function provided, using NI VISA.

 

I made the driver with the driver interface of NI VISA, using the driver provided by Hamamatsu, so NI VISA Interactive Control recognize the device.

 

Here is an example of function we have:

 

//============================================================================
// DcamInitialize()
//	Initialize the library.
// ---------------------------------------------------------------------------
// [Argument]
//			None. 
// [Return values]
//			If the function succeeds the return value is TRUE (1). 
//			If the function fails the return value is FALSE (0).
//			To obtain detailed error information, use the DcamGetLastError function.
// [Note]
//			1.	This function must first be run before running other functions.
//			2.	An error is issued if the library has already been initialized.
//			3.	Only one process can use this library.
//============================================================================
_DCamUSBEXPORT  short _DCamUSBSTDCALL DcamInitialize(void);

//============================================================================
// DcamUninitialize()
//	Unload the library resources and close the device driver.
// ---------------------------------------------------------------------------
// [Argument]
//			None.
// [Return values]
//			If the function succeeds the return value is TRUE (1). 
//			If the function fails the return value is FALSE (0).
//			To obtain detailed error information, use the DcamGetLastError function.
// [Note]
//			Call this function when quitting the program or the DCamLIB library is not needed.
//============================================================================
_DCamUSBEXPORT  int _DCamUSBSTDCALL DcamUninitialize( void );

//============================================================================
// DcamOpen()
//	Open the device.
// ---------------------------------------------------------------------------
// [Argument]
//			None.
// [Return values]
//			If the function succeeds the return value is TRUE (1). 
//			If the function fails the return value is FALSE (0).
//			To obtain detailed error information, use the DcamGetLastError function.
// [Note]
//============================================================================
_DCamUSBEXPORT  int _DCamUSBSTDCALL DcamOpen( void );

//============================================================================
// DcamClose()
//	Close the device.
// ---------------------------------------------------------------------------
// [Argument]
//			None.
// [Return values]
//			If the function succeeds the return value is TRUE (1). 
//			If the function fails the return value is FALSE (0).
//			To obtain detailed error information, use the DcamGetLastError function.
// [Note]
//============================================================================
_DCamUSBEXPORT  int _DCamUSBSTDCALL DcamClose( void );

//============================================================================
// DcamGetDeviceState()
//	Obtain the type of device state.
// ---------------------------------------------------------------------------
// [Argument]
//			pState   	: /O: Specify the address of the variable where the type 
//							  of device state is to be stored. One of the 
//							  following values is obtained.
//								DCAM_DEVSTATE_NON   	: Non-connection, No device found
//								DCAM_DEVSTATE_DEVICE	: Non-connection, Device found
//								DCAM_DEVSTATE_NODEVICE	: Connection, No device found
//								DCAM_DEVSTATE_CONNECT	: Connection, Device found
//								DCAM_DEVSTATE_BOOT	: Connection, Device found(during the boot process)
// [Return values]
//			If the function succeeds the return value is TRUE (1). 
//			If the function fails the return value is FALSE (0).
//			To obtain detailed error information, use the DcamGetLastError function.
// [Note]
//============================================================================
_DCamUSBEXPORT  int _DCamUSBSTDCALL DcamGetDeviceState( int* pState );

//============================================================================
// DcamGetImageSize()
//	Obtain the width and height of image data to acquire from the USB Driver Board.
// ---------------------------------------------------------------------------
// [Argument]
//			pWidth		: /O: Specify the address of the variable where the image 
//							  width is to be stored. 
//			pHeight		: /O: Specify the address of the variable where the image 
//							   height is to be stored.
// [Return values]
//			If the function succeeds the return value is TRUE (1). 
//			If the function fails the return value is FALSE (0).
//			To obtain detailed error information, use the DcamGetLastError function.
// [Note]
//============================================================================

 


Viewing all articles
Browse latest Browse all 5357


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>