06-08-2006 10:13 AM
06-09-2006 04:01 AM
A Simple solution really. Maybe I should have looked into it a bit deeper before posting the message. Just by using the ContSamps option in the DAQmxCfgSampClkTiming function enable the data array to be looped
// This configures the counter timing to contin pulses
DAQmxCfgImplicitTiming (clkgen, DAQmx_Val_ContSamps, 1000);
//________________________________________________
//Create the drive DigitalOutput task
DAQmxCreateTask ("", &DOtask);
//Create the Digital Output channel(s) (drvChans define eariler)
DAQmxCreateDOChan (DOtask, drvChans, "", DAQmx_Val_ChanForAllLines);
//Configure the Drive task sample clock to be Ctr0 internal output
//Note if on Finite Samples then the last field of "CfgSamClkTiming" will repeat the write array if the number is more than the array size,
//ie 200 will loop the write array[10] data 20 times
//if on ContSamps the data array will loop
//The rate is only needed if you are using an external clock and should be set to max expected from that
//You you could pass NULL if using internal clk
DAQmxCfgSampClkTiming (DOtask, "/Dev1/Ctr0InternalOutput", 1, DAQmx_Val_Rising, DAQmx_Val_ContSamps, *writeSize);