11-29-2005 04:13 AM
DAQmxErrChk (DAQmxResetDevice ("Dev1"));
DAQmxErrChk (DAQmxCreateTask("emission",&taskE));
DAQmxErrChk (DAQmxCreateDOChan(taskE,"Dev1/port0","",DAQmx_Val_ChanForAllLines));
DAQmxErrChk (DAQmxCreateTask("reception",&taskR));
DAQmxErrChk (DAQmxCreateDOChan(taskR,"Dev1/port2","",DAQmx_Val_ChanForAllLines));
DAQmxErrChk (DAQmxCfgHandshakingTiming (taskE,DAQmx_Val_ContSamps,1));
...
for
(i=0;i<a;i++){DAQmxErrChk (DAQmxWriteDigitalU8(taskE,64,TRUE,180,DAQmx_Val_GroupByChannel,&data[i][0],&writeE,NULL));
DAQmxErrChk (DAQmxWriteDigitalU8(taskR,1,TRUE,180,DAQmx_Val_GroupByChannel,&data[i][1],&writeR,NULL));
DAQmxErrChk (taskE);
DAQmxErrChk (taskR);
}
I get samples on port2, but nothing on port0. When I try to apply handshaking on port2, it's the same as for port0... I think my problem come from the buffer size or the numSampsPerChan which I have to pass to 64 to get only one sample generated in my loop.
11-30-2005 04:38 AM
Hi,
You will find some help about handshaking mode here :
http://zone.ni.com/devzone/conceptd.nsf/webmain/467ED254F3A30B1286256A6F00720951?OpenDocument
Here is an example :
Marc L.
12-01-2005 09:30 AM
Thank you for these links,
But I still don't find what I was looking for, how to configure the right handshaking mode. Today I tried to use DAQ instead of DAQmx, I found here the function DIG_Group_Mode which allow to pass in parameter the wished mode. DAQmx seem to be the new generation of DAQ, delivered with the PCI-DIO-32HS card but in the user manual there is only flowcharts for DAQ !
With DAQ I have the same mistake as with DAQmx : I can generate samples on my ports only if I don't configure handshaking, if I do the program run but I don't get any signal !
If you can help me.
Thanks
Vergnolle G.