Simple to use

Here we want to show you how simple it is to use our QUANCOM GPIB modules.

By using the QLIB you are able to communicate with our QUANCOM GPIB modules with just a few lines of code.

All needed functions to send and receive data are supplied by the QLIB.

The following QLIB functions are supported by QUANCOM GPIB modules:

 QAPIExtWriteString

QAPIExtWriteString sends a string to a listener on the bus.

 QAPIExtReadString

QAPIExtReadString receives a string from a talker on the bus.

 QAPIExtSpecial

QAPIExtSpecial combines a couple of job codes that supply card specific functions like activating or deactivating REN.

Further informations regarding these functions are available in the manual for the QLIB

Additionally there are several samples projects for many programming languages and IDEs located on our driver CD and inside the sample installation package.

Sample to send a String in C

ULONG listener = 3;
ULONG handle = QAPIExtOpenCard(PCIGPIB,0);
if ( handle == NULL )
{
 handle = QAPIExtOpenCard(USBGPIB,0);
 if ( handle == NULL )
 {
  handle = QAPIExtOpenCard(GPIB,0);
 }

}

// The handle is != NULL if there is a GPIB Controller installed

if ( handle == NULL )
{
  MessageBox(NULL, "No QUANCOM GPIB Controller found!", "Error", MB_OK);
  return FALSE;
}

char s1[] = "Dies ist ein String";

if ( QAPIExtWriteString(handle, listener, (char*)&s1, strlen(s1),0))
{
 printf("Writing to device was successful\n", listener);
}
else
{
 printf("Writing to device failed\n", listener);
}

QAPIExtCloseCard(handle);

return 0;