12-19-2006 08:45 AM
12-21-2006 07:12 AM
As the third parameter of your function DAQmxWriteDigitalU16 is set to "true" (PrameterName: Auto Start?) the task starts automatically with this function, so you don´t have to call StartTask after that function.
Either switch the trid parameter to false, or remove the StartTask function. As the Datageneration is finite, you do not nedd to call StopTask either, because the task will stop automatically, when all data is generated. What you should do is, call ClearTask at the end of your application, so that all resources are cleared.