I have 2 PCI-6534 cards conntected. I an attempt to minimize inherent delays between switching from reading to writing, one is dedicated to reading one is dedicated to writing. I want to create a task for reading and use it over and over. Ex) I will write 0x00, write 0x55, then read, then write 0x00, 0xAA, then read...(the pattern continues indefinitly). The problem I am having is that the program makes me stop the task, clear the task, then set it up all over again. (this process takes too long.) Does any one have an example of how to do this?
Here are a couple lines from the code I am curently using and having problems with:
DAQmxErrChk (DAQmxCreateTask("",&gTaskHandle));
DAQmxErrChk (DAQmxCreateDIChan (gTaskHandle, "Dev2/port0_16", "", DAQmx_Val_ChanForAllLines));
DAQmxErrChk (DAQmxCfgChangeDetectionTiming (gTaskHandle, "Dev2/port0_16", "Dev2/port0_16", DAQmx_Val_ContSamps,2));
DAQmxErrChk (DAQmxRegisterSignalEvent(gTaskHandle,DAQmx_Val_ChangeDetectionEvent,0,ChangeDetectionCallback,NULL));
Write_WFM32 ("AB_Module_ID.hws",8, 9);
Write_WFM32 ("A_Address_00.hws",8, 9);
while (x<99999)
{x++;
Write_WFM32 ("AB_Write_05.hws",12, 13);
Write_WFM32 ("A_Address_00.hws",8, 9);
DAQmxErrChk (DAQmxStartTask(gTaskHandle));
Readback_Waveform_AB ("AB_Read.hws",32);
}