Hi
Im using LabWindows CVI v8 and Im having problems with calling a function which contains the following standard CVI functions:
DAQmxCfgChangeDetectionTiming
DAQmxRegisterSignalEvent
The problem is I have put these in my own function of type void functionname (); as shown below:
int CVICALLBACK starttestbutton_callback (int panel, int control, int event,
void *callbackData, int eventData1, int eventData2)
{
switch (event)
{ case EVENT_LEFT_CLICK:
function1();
function2();
etc
functioname()
function3();
function4();
break;
}
return 0;
}
When the function is called by my code, the function is executed but it doesn't work properly as the DAQmxRegisterSignalEvent callback function doesn't get called. However, if I call this function directly from a user interface command button as shown below, it executes fine.
int CVICALLBACK StartCallback(int panel, int control, int event, void *callbackData, int eventData1, int eventData2)
{
if (event==EVENT_LEFT_CLICK)
{ functionname();
}
return 0;
}
Are there some restrictions as to how these standard CVI functions are called?
Any help would be appreciated.
Thanks Andy
Message Edited by Andy_458233 on 03-29-2006 05:02 AM
Message Edited by Andy_458233 on 03-29-2006 05:05 AM
Message Edited by Andy_458233 on 03-29-2006 05:07 AM