Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

PXIe-6363 : error -50103 writing several digital outputs

Hi,

 

I am writing a program for my PXIe-6363 with the NI-DAQ C.

 

I want my digital outputs to cycle between several outputs at the fastest speed possible. The digital output lines would be the same between outputs, and their timing would be the same too, based on the onboard clock.

 

What I was hoping to do run a setup code similar to:

DAQmxCreateTask

DAQmxCreateDOChan

DAQmxCfgSampClkTiming

DAQmxWriteDigitalLines

 

with a different taskhandle per digital output, changing only the digital array to write in the DAQmxWriteDigitalLines function.

 

Then I could simply start the Tasks one after the other to rapidly cycle through each output.

 

The setup code runs fine for the first digital output, but unfortunately give me the error -50103 'the specified resource is reserved. The operation could not be completed as specified.' when DAQmxWriteDigitalLines is reached the second time.

 

Is there anyway for me to create several digital outputs patterns using the same digital output lines so I can just cycle through Start\Stop tasks? If not, what is the fastest way for me to cycle through digital outputs values using the same digital lines? (performing a continous output is not an option as I need to interlace an analog read in between each digital output)

 

Thanks,

 

Gabriel

0 Kudos
Message 1 of 1
(1,802 Views)