Hi everybody,
my 6509 works fine with the test panel and the DAQmx example programs (CVI 8).
Now, I need to use each of the 96 lines as independent output, i.e. put HI on ch.12 and do nothing on the rest of lines.
This is apparently not possible unless write 8 bit on Dev1/port1 which contains ch.12.
So:
1. How to write only the selected bit?
2. How to put that line back to zero?
My questions are due to my nonfunctional code:
clock on ch.12:
/*********************************************/
chan = "Dev1/port2/line8:15"
data = {0,0,0,0,1,0,0,0}
SetWaitCursor(1);
DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
DAQmxErrChk (DAQmxCreateDOChan(taskHandle,chan,"",DAQmx_Val_ChanForAllLines));
DAQmxErrChk (DAQmxStartTask(taskHandle));
DAQmxErrChk (DAQmxWriteDigitalLines(taskHandle,1,1,10.0,DAQmx_Val_GroupByChannel,data,NULL,NULL));
DAQmxStopTask(taskHandle);
DAQmxClearTask(taskHandle);
data = {0,0,0,0,0,0,0,0}
SetWaitCursor(1);
DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
DAQmxErrChk (DAQmxCreateDOChan(taskHandle,"Dev1/port2/line8:15","",DAQmx_Val_ChanForAllLines));
DAQmxErrChk (DAQmxStartTask(taskHandle));
DAQmxErrChk (DAQmxWriteDigitalLines(taskHandle,1,1,10.0,DAQmx_Val_GroupByChannel,data,NULL,NULL));
DAQmxStopTask(taskHandle);
DAQmxClearTask(taskHandle);
/**********************************************************/
Thanks,
Rabdo