LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6259

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

0 Kudos
Message 1 of 2
(3,015 Views)

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

0 Kudos
Message 2 of 2
(2,964 Views)