I'm trying to write a program that both reads a voltage and then displays this with openGL. However I have the problem that I can't get both to run at the same time.
Is it possible to set up a task using: DAQmxErrChk (DAQmxBaseCreateTask("",&taskHandle));
Which can then be read from anywhere else in the program (maybe in the openGL loop) with: DAQmxErrChk (DAQmxBaseReadAnalogF64(taskHandle,-1,timeout,DAQmx_Val_GroupByScanNumber,data,bufferSize,&pointsRead,NULL));
Or can the initialisation and reading only be performed in the same loop?