LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmxWriteDigitalLines Error

Hello everybody,

 

I have a questions to the command DAQmxWriteDigitalLines.

 

I have a programm that generates some signals. When I start the interface and start a signal, the program runs without errors. In addition it should be possible to start a program over the "Windows Command Processor". So when I start a signal with the command processor I get always the error in the following. I do not understand why the program over the interface works fine but over the command processor there is an error. The difference in both operations is a while loop that holds the command processor as long open as the signal gets generated. When the signal gots generated the task for the signal gets reseted (with DAQmxRegisterDoneEvent) and the while loop gets interrupted. In both modes the same buffers and parameters are used. I have no idea why this failure occurs.

 

I hope somebody has an idea.

 

Best regards

 

 

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

In the meantime I think I have an idea where the failure is. Could it possible that I have a wrong buffer configuration?

DAQmxCfgOutputBuffer(DigitalOutTaskHandle, 15xSAMPLESNB);

 

SAMPLESNB=9600;

 

My program generates 9600 samples each channel, I have 9 of them. Then the samples gets with DAQmxWriteDigitalLines transfered and written to the device analog output. Every time the samples got transfered I have a callback function with DAQmxRegisterEveryNSamplesEvent that generates the next 9600 samples for each channel. Could it possible that I have some wrong configurations for the buffer? The 15x9600 was choosen because I wanted to be save but I had no idea if this is important. Could it possible that I must allocate the output buffer vor the whole generation? As example: 9600 sample for one channel and that 6 times. So there would be 57600 sample that must be generated. So should the buffer also 57600 big?

 

Best regards

 

0 Kudos
Message 2 of 3
(2,630 Views)

Found the failure already.

0 Kudos
Message 3 of 3
(2,608 Views)