Hello Guys,
I have created a UI which connects to a hardware. I have started writing code for the hardware connection in my UI source code which can be seen below. As soon as the code executes the DAQmx configure code: -DAQmxCreateTask("Dev0-R",&taskHandle[0]);, the UI hangs and does not work further. Can anyone tell me what exactly is the problem. I an not connected to any hardware currently but creating a task command should work in my case. I am confused how to go further. Please help.
// Code is shown below
TaskHandle taskHandle[4];
int main (int argc, char *argv[])
{
int error = 0;
/* initialize and load resources */
nullChk (InitCVIRTE (0, argv, 0));
errChk (panelHandle = LoadPanel (0, "PintschBamag.uir", PANEL));
errChk (AttributePanelHandle = LoadPanel (0, "PintschBamag.uir", ATTR_PANEL));
/* display the panel and run the user interface */
errChk (DisplayPanel (panelHandle));
/* Place for configuring the Hardware Channel connection*/
/*FOr the DAQMx*/
//char errBuff[2048]={'\0'};
/*********************************************/
// DAQmx Configure Code
/*********************************************/
DAQmxCreateTask("Dev0-R",&taskHandle[0]);
DAQmxCreateTask("Dev3-R",&taskHandle[1]);
DAQmxCreateTask("Dev4-R",&taskHandle[2]);
DAQmxCreateTask("Dev5-R",&taskHandle[3]);
//code ends here
Thanks,
Raunak