Hello,
well I hope you can help me with a little problem I have. I need to interrupt my program all few milliseconds to read in one analogue input and three digital inputs. Well this isn't a real interrupt indeed ... Much more a programcode that should be called every few milliseconds, if there is no other programcode called.
For example:
DAQmxCreateTask("DirectionVoltage",&taslHandle);
DAQmxCreateAIVoltageChan(taskHandle,....);
DAQmxErrChk (DAQmxCreateTask("InductiveSensor",&InductiveSensor));
DAQmxErrChk (DAQmxCreateDIChan(InductiveSensor,"Dev2/port0/line0","",DAQmx_Val_ChanPerLine));
These are my two inputs. Then there runs my DLL, where the user can change analogue outputs etc. pp. But about every 10 milliseconds there should be a short interrupt, where the actual state of my inputs should be written to shadow variables, who can be read out by the user of the DLL.
Short program explanation:
Initialization();
readin(); //this should do the interrupt
ChangeDirection(left); //user changes the direction of the engine - this should be finished first and not being interrupted by the "readin()"-routine!
readin();
readin();
readin();
CheckState(); //now the user wants to check the shadow variables
readin();
readin();
....
Maybe there's any programcode for ANSI C I didn't see in the help-file?
Sincerely
Andreas