Hello all, does anyone know how to configure a PCI-6905 board using
visual basic? I am new to the world of programming and do not
understand how it all works yet.
I think you use something like the following in a module:
Option Explicit
Public Declare Function DAQmxCreateTask Lib "nicaiu.dll" (ByVal taskName As String, ByRef taskHandle As Long) As Long
Public Declare Function DAQmxCreateDOChan Lib "nicaiu.dll" (ByVal
taskHandle As Long, ByVal lines As String, ByVal nameToAssignToLines As
String, ByVal lineGrouping As DAQmxLineGrouping) As Long
Public Declare Function DAQmxStartTask Lib "nicaiu.dll" (ByVal taskHandle As Long) As Long
Public Declare Function DAQmxWriteDigitalLines Lib "nicaiu.dll" (ByVal
taskHandle As Long, ByVal numSampsPerChan As Long, ByVal autoStart As
Long, ByVal timeout As Double, ByVal dataLayout As DAQmxValGroup, ByRef
writeArray As Byte, ByRef sampsPerChanWritten As Long, ByVal reserved
As Long) As Long
Public Declare Function DAQmxStopTask Lib "nicaiu.dll" (ByVal taskHandle As Long) As Long
Public Declare Function DAQmxClearTask Lib "nicaiu.dll" (ByVal taskHandle As Long) As Long
Public Declare Function DAQmxGetErrorString Lib "nicaiu.dll" (ByVal
errorCode As Long, ByVal errorString As String, ByVal bufferSize As
Long) As Long
The project that I am working on needs for several digital lines both input and output and well I am not sure first on how to configure then nor to read / write to them.
Thanks