Hi,
I am transitioning legacy NI-DAQ VB6 code written for the NI-6062E to DAQmx VB6 code which will now utilize the USB-6212. From what I understand, the constant "ND_INT_AO_CH_1" (which is utilized in my legacy code) internally routes analog output channel 1 to the analog to digital converter. Similiarly my understanding is the constant "ND_INT_AI_GND" internally routes analog input ground to the analog to digital converter. I thought that I would be able to acheive a similiar result in DAQmx by utilizing the set of constants shown below (src: http://zone.ni.com/reference/en-XX/help/370466V-01/mxdevconsid/mseriesinterchan/). However, I wanted to confirm whether this approach is correct and if so, what are the appropriate contants in DAQmx that I should be utilizing in my code?
Below is the relevant code snippet that I am rewriting.
Public Function VoltageGet(ND_INT_AO_CH_1, Voltage As Double, Optional ResetCh As Boolean = True) As String '// Returns the voltage measured on a given channel '// Configure channel for single-ended, bipolar operation iStatus = AI_Configure(iDevice, ND_INT_AO_CH_1, 1, 0, 0, 0) If iStatus <> 0 Then VoltageGet = "ERROR_DAQ - " & iStatus & " " & GetDAQError(iStatus) Exit Function End If If ResetCh Then '// Read in internal ground reference to dissipte any capactive charge left on the mux iStatus = AI_VRead(iDevice, ND_INT_AI_GND, -1, Voltage) If iStatus <> 0 Then VoltageGet = "ERROR_DAQ - " & iStatus & " " & GetDAQError(iStatus) Exit Function End If Delay 0.1 End If '// Read in voltage of specfied channel iStatus = AI_VRead(iDevice, ND_INT_AO_CH_1, -1, Voltage) If iStatus <> 0 Then VoltageGet = "ERROR_DAQ - " & iStatus & " " & GetDAQError(iStatus) Exit Function End If VoltageGet = "PASS" Exit Function End Function