Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure the national instruments pci-6509 using visual basic

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
0 Kudos
Message 1 of 2
(7,042 Views)

Hi hapless,

I would suggest seeing NI-DAQmx, NI-VISA and NI-488.2 .NET Example Locations  for programs that  you can use and build off of.


David L.
Systems Engineering
National Instruments
0 Kudos
Message 2 of 2
(7,032 Views)