Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI DAQmx: Continuous Digital Task looping from a data array

Hi,
Using an M Seres 6281 card, I am trying to have a digital pattern of 8 lines from an array of 128 elements which runs continuously (looping). The digital pattern must run continously while other tasks etc are able to be completed, also until the user requests it to stop. The 8 line data required involves signals like: clk, clkbar, testen, xfrclk, datain, mclr, monout, dataout so it is not just a continuous clock. The data is required to drive a 74595 shift register,serial in, parallel out, which is monitoring a continous serial 8bit data stream from an ASIC device which we are trying to test and display the data on 8 leds.
 
As far as I can tell there is no way of loading the array into a looping memory.
Please can you advise me as I need to resolve this problem or find another alternative option.
 
Thanks Andy Rob
0 Kudos
Message 1 of 2
(2,463 Views)

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);

0 Kudos
Message 2 of 2
(2,451 Views)