06-21-2010 07:09 AM - edited 06-21-2010 07:10 AM
Hello!
I hope this is the right board for it.
First:
I'm trying to send some stream data over the usb-6259 to a hearing device. For simulation I have a small construction with LEDs to see that something is happening.
I have two LEDs. One for the data and one for the clock.
Programming data by using the onboard clock works really well. The LED for sensing the data flashes.
BUT: I don't know on which line (pin) I can sense the onboard clock.
I'm using this code fragment in CVI to write data to the USB-6259
DAQmxCreateTask ("Task1", &handle); DAQmxCreateDOChan (handle, builtLineString, "name", DAQmx_Val_ChanForAllLines); DAQmxStartTask (handle); DAQmxWriteDigitalU32 (handle, size, 0, timeout, DAQmx_Val_GroupByScanNumber, stream, &written, 0); DAQmxStopTask(handle); DAQmxClearTask(handle);
The second thing is:
I want to increase programming speed and tried to use The following function:
DAQmxCfgSampClkTiming (handle, "/Dev2/20MHzTimebase", 100000, DAQmx_Val_Falling, DAQmx_Val_FiniteSamps, 1000000);
I put it AFTER
DAQmxCreateDOChan (handle, builtLineString, "name", DAQmx_Val_ChanForAllLines);
but I receive this error:
NON-FATAL RUN-TIME ERROR: "DeviceWriter.c", line 68, col 5, thread id 0x00001164: Function DAQmxStartTask: (return value == -200462 [0xfffcf0f2]). Measurements: Generation cannot be started, because the output buffer is empty. Before starting a buffered generation, write data. Unreserving a task empties the buffer. Changing the size of the buffer or setting the Regeneration Mode property will result in the buffer being unreserved and emptied. Task Name: Task1 Status Code: -200462
I don't know how to solve this error message.
I hope you can help me.
Thanks in advance.
Best regards,
Matthias
06-29-2010 09:00 AM
Hello,
please use the example “ContWriteDigPort-ExtClk” which is shipped with the NI Example Finder in CVI as template.
Find attached a screenshot.
There you can see, how to configure the parameters of the DAQmx-API.
Regards
Ulrich
AE NI-CER