Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

overwrite digital output buffer error -200292

In another attempt to generate a software timed PWM signal using cDAQ-9184 and a 9401 module I ran across another error. (I'm developing this for another application where I need 30 PWM signals, so using counters isn't practical).

 

I created a 1000 element buffer and am generating 1000 samples per second. I set the task to "Allow Regeneration" and set the write position to "First Sample" and Offset = 0. I then start the task. As long as I don't try to write any more samples, the proper PWM signal is continuously generated. When I try to overwrite the 1000 sample buffer with a new array, I get error -200292. 

 

Is there a way I can avoid this error? I have the problematic VI attached. 

 

Thanks,

 

Douwe

0 Kudos
Message 1 of 5
(3,150 Views)

Douwe,

 

There is a post here that details why this error might be occurring. It seems to be a timing issue. I'll keep looking into this further to see if I can find out any other causes.

 

Julia

0 Kudos
Message 2 of 5
(3,112 Views)

Thanks for that link. But I'm trying to dynamically update the buffer as in this example: http://www.ni.com/example/27148/en/. Only I'm trying to do it with a digital output, not an analog output. I don't think this DAQmx write call waits until there is space in the buffer, I think it just overwrites the buffer.

 

The additional difficulty is that I'm trying to do it with a cDAQ-9184 chassis, which has very strange buffer behavior. It always tries to use all the 12Mb of buffer space, regardless of the output buffer size specification. But, I can get the example from the linked example to work for the AO.

 

0 Kudos
Message 3 of 5
(3,098 Views)

How exactly are you monitoring the buffer size?

0 Kudos
Message 4 of 5
(3,091 Views)

I monitor the TotSampPerChanGenerated and CurrWitePosition DAQmx write properties. When there is no regeneration the difference  is how many samples are in the buffer. 

0 Kudos
Message 5 of 5
(3,089 Views)