Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Equivalent functions

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

0 Kudos
Message 1 of 3
(3,437 Views)

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.

Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 2 of 3
(3,426 Views)

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

0 Kudos
Message 3 of 3
(3,422 Views)