06-05-2007 08:03 AM
Hi there
I m writing an program in Visual Basic 6.0 using DAQmx driver 8.3 fo PCI 6602 . I would like to convert the program from using traditional DAQ to DAQmx. I have the following functions in traditional DAQ
1) DIG_IN_LINE
2)DIG_OUT_LINE
3)DIG_CONFIG_LINE
Can i get the equivalent function in DAQmx?
Thanks
06-06-2007 10:55 AM
Hi Rajaram,
There isn't a direct translation for these NI-DAQ functions in DAQmx. The equivelant would be DAQmxCreateDIChan (or DAQmxCreateDOChan) and you can read more about them in the NI-DAQmx C Reference Help (Start >> All Programs >> National Instruments >> NI-DAQ).
There's a good series on transitioning from traditional DAQ to DAQmx which you may find useful:
http://zone.ni.com/devzone/cda/tut/p/id/4344
There are some useful links at the bottom of the page the explain things like the terminology changes in DAQmx.
06-06-2007 11:03 AM
Hello Sarah,
Thanks for your reply, I have sorted out using the following functions
DAQmxErrChk DAQmxCreateDOChan(taskHandle, "Dev1/port0/line10", "", DAQmx_Val_ChanForAllLines)
DAQmxErrChk DAQmxReadDigitalLines(taskHandle, 1, 10#, DAQmx_Val_GroupByChannel, istate(0), arraySizeInBytes, _
sampsPerChanRead, numBytesPerSamp, ByVal 0&)
DAQmxErrChk DAQmxWriteDigitalLines(taskHandle, 1, True, 10#, DAQmx_Val_GroupByChannel, istate(0), _
sampsPerChanWritten, ByVal 0&)
Regards