Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmxWriteCtrTicks Usage for Varying Width Pulses

I have the 6343 USB DAQ, and I am trying to generate a series of varying width pulses using the NI driver DAQmx calls. I have been able to generate a series of SAME width pulses using the sequence of:

 

DAQmxCreateCOPulseChanTicks

DAQmxCfgImplicitTiming

DAQmxStartTask

 

This works well, but I need each pulse to be a different width. I see the high potential driver call 'DAQmxWriteCtrTicks, which appears to be able to take an array of low and high ticks. I just can't put the driver calls together in order to make it work. I am trying to use the driver calls in this order:

 

DAQmxCreateCOPulseChanTicks   (just to create the channel....not sure how else to do it)

DAQmxWriteCtrTicks (times out)

 

I'm not sure exactly what to call, and in what order. There is no help on the whole sequence that I can find. A flowchart would have been a really nice thing for NI to provide. The help on DAQmxWriteCtrTicks indicates that the function:

 

"Writes new pulse high tick counts and low tick counts to each channel in a continuous counter output task that contains one or more channels."

 

Does this imply that there must already be a 'continuous' task running that before you call it? If so, how does one setup a task in preparation for this?

 

Certainly I'm not the first person to try to do this, so anyone out there that knows how to do this please reply.

 

Cheers,

Wayne

 

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

Wayne,

 

Could you please let us know what programming environment you are working in? Thanks!

Daniel G.
Semiconductor & Wireless
National Instruments
0 Kudos
Message 2 of 3
(2,929 Views)

I'm working in Delphi, which is probably not very relevent, as I am making direct calls to the driver dll itself. 

 

Thanks,

Wayne

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