Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Buffered operations on NI USB-6259 vs Ni USB-6343

Hello,

 

I am trying to run a program that was written for a NI USB-6343 on a NI USB-6259. The program uses two analog outputs to step the voltage applied to galvo mirrors, and one counter input to read TTL pulses from an APD. These operations all work fine for both systems. However, any buffered operations, for example creating a pulse train to synchronize stepping the galvos and reading the APD, causes an error when run on the USB-6259. These are the lines of code that are used to prepare the pulse train and configure the internal timing:

 

obj.CreateChannels('DAQmxCreateCOPulseChanFreq',ctr,'',obj.dev.DAQmx_Val_Hz,obj.dev.DAQmx_Val_Low ,delay,frequency,DutyCycle);

obj.LibraryFunction('DAQmxCfgImplicitTiming',obj,mode,NSamples);

obj.LibraryFunction('DAQmxSetCOPulseTerm',obj,ctr,line);

 

When run on the USB-6259, an error occurs saying that the pulse train task cannot be started because the resource is reserved (status code -50103). I have checked and the counter being used by the pulse train is different than the counter input used for the APD. Is there a difference in how the 6259 and the 6343 handle buffered operations?

 

Thanks

 

 

 

0 Kudos
Message 1 of 2
(1,885 Views)

On the M-series boards (like the 6259), a finite pulsetrain consumes *both* counters.  The output signal comes out of the one you explicitly configure.  But in the background, the other counter is needed as a kind of pause trigger.  And you've already got that other counter tied up with counting APD pulses, hence the error.

 

On X-series boards (like the 6343), you had two advantages.  First, a finite pulsetrain now only consumes *one* counter.  Second, the board has 4 counters available, so you would have had another "out".

 

A possible workaround is to use a dummy finite AI task in place of the desired finite CO pulse train task.  You can then designate a signal similar to "/Dev1/ai/SampleClock" as the clock source for both your CI and AO tasks.

 

 

-Kevin P

 

P.S.  Just checked the spec sheet for the USB-6259.  There's likely a 3rd disadvantage waiting for you.  The on-board FIFO for counter measurements is only 2 samples long.  Combined with your USB connection, you're probably gonna get a bunch of errors related to overflowing the FIFO before data can be transferred across USB to your PC.   The X-series boards have a much bigger FIFO (127 samples) and are very much less prone to this problem.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 2
(1,859 Views)