03-01-2007 06:51 PM
I have a PCI-6025E card with a VB6 application. I have discovered that I can not get more than +/- 5vdc measurement on any analog input. The specs on the board state +/-10v. I have tried MAX and it appears to allow the board to measure +/- 10vdc. The graphical display shows what one would expect +10 to –10.
When I run the application and try to use AI_configure I do not seem to be able to change any thing. I am using VB6.0 SP6 and NI-DAQ 7.4.1f4 The application is a very simple analog measurement. Take 10 readings slight delay and produce an average. I have tried input mode in all three modes.
I have spare card and have tried it in two Dell computers. Same result with both cards in both computers. This was a working application. Problems started after HD failure. The board is acting like it will only measure +5 to –5vdc.
Global Const DEVICE_1 = 1
Global Const CHANNELS_ALL = -1
Global Const INPUT_MODE_DIFF = 0
Global Const INPUT_MODE_RSE = 1
Global Const INPUT_MODE_NRSE = 2
Global Const BIPOLAR = 0
Global Const UNIPOLAR = 1
Sub Init_National_Ports()
Dim status As Integer
status = AI_Configure(DEVICE_1, CHANNELS_ALL, INPUT_MODE_RSE, 20, BIPOLAR, 0)
If status <> 0 Then
MsgBox ("Error detected while starting Analog Inputs Status = " & Str$(status)
End If
Exit Sub
For Count = 0 To 9
status = AI_VRead(1, AD0_HP_VOLTAGE, GAIN_1, Voltage)
Call Sleep(20) ' --- just delay a bit between measurments
Average = Average + Voltage
Next Count
Average = (Average / 10)
03-01-2007 08:31 PM
You posted to the LabVIEW forum and not many here use VB. We like to program with pictures.
I'll take a stab at your problem though. I think the gain has to be set to .5 in order to get the +/- 10V range.
03-01-2007 11:30 PM