User manual

DELIB API Referenz |Seite 60
DapiClearLastError();
return TRUE;
}
return FALSE;
}
//****************************************************************
//****************************************************************
//****************************************************************
//****************************************************************
//****************************************************************
void main(void)
{
unsigned long handle;
unsigned long value;
// ---------------------------------------------------------
// Open Module
handle = DapiOpenModule(USB_OPTOIN_8_RELAIS_8,0);
printf("Module handle = %x\n", handle);
// ---------------------------------------------------------
// Module not found!
if (handle==0)
{
printf("Could not open module!\n");
printf("Press any key to exit\n");
getch();
return;
}
// ---------------------------------------------------------
// Module found!
printf("Module has been opened\n");
// ---------------------------------------------------------
// Show config of module
value = DapiSpecialCommand(handle, DAPI_SPECIAL_CMD_GET_MODULE_CONFIG,
DAPI_SPECIAL_GET_MODULE_CONFIG_PAR_DO, 0, 0);
IsError();
printf("Configuration of the module: no. of digital outputs %d\n",
value);
printf("Press any key to continue\n");
getch();
// ---------------------------------------------------------
// Write output channels