Digital Multimeters (DMMs) and Precision DC Sources

cancel
Showing results for 
Search instead for 
Did you mean: 

Bad reading from DMM board

On DMM 4060 board, sometimes get bad reading of resistance from 20.xx ----12.xx ohms. I should expect a reading about 2.xx ohms. The bad reading is not repeatable. I re-read the board again, most time, I will get good reading again. Please Help!

Here is my code in Visual Basic 6:

r64Range = 10#
r64Resolution = 0.01

Status = -1

Emit ("Open a session....")
'mstrResource = "DAQ::" & Format$(miNIDeviceNumber, "0") & "::INSTR"
'Open a session to the instrument
iStatus = niDMM_init(mstrResource, VI_TRUE, VI_TRUE, miDeviceHandler)

If iStatus >= VI_SUCCESS Then
Call Writeln("OK.")
Emit ("Configure Resistance Measurement ....")
iStatus = niDMM_ConfigureMeasurement(miDeviceHandler, NIDMM_VAL_2_WIRE_RES, r64Range, r64Resolution)

If CheckError(iStatus) = VI_FALSE Then
Call Writeln("OK.")
Call Emit("Configure Multi Point....")
' SAMPLE_COUNT = 6, SAMPLE_INTERVAL_SECOND = 1 second, TRIGGER_COUNT = 1
iStatus = niDMM_ConfigureMultiPoint(miDeviceHandler, TRIGGER_COUNT, SAMPLE_COUNT, NIDMM_VAL_IMMEDIATE, SAMPLE_INTERVAL_SECOND)

If CheckError(iStatus) = VI_FALSE Then
Call Writeln("OK.")
Call Writeln("Measure Resistance....")
'Read the measurements
iStatus = niDMM_ReadMultiPoint(miDeviceHandler, TIMEOUT_LIMINT_MILLI_SECOND, SAMPLE_COUNT, r64MeasArray(1), i32NumPointsRead)

If CheckError(iStatus) = VI_FALSE And i32NumPointsRead > 0 Then
'Status = 0
'Format and display measurements
iGoodSampleCount = 0
For i = 1 To i32NumPointsRead
If IsNumeric(Str$(r64MeasArray(i))) Then
If 0 < r64MeasArray(i) And r64MeasArray(i) < r64Range Then
'only sum up the goog data
dReading = dReading + r64MeasArray(i)
iGoodSampleCount = iGoodSampleCount + 1
End If
Writeln ("Readout " & Format$(r64MeasArray(i), "##0.000000 ") & vbCrLf)
Else
Status = -2
dReading = OVER_RANGE
Writeln ("Over Range" & vbCrLf)
Exit For
End If
Next i

If Status < 2 And (i32NumPointsRead - iGoodSampleCount) < BAD_SAMPLE_COUNT_MAX Then
Status = 0
dReading = dReading / iGoodSampleCount
Writeln ("Ave Read out " & Format$(dReading, "##0.000000") & " Ohms")
Else
Status = -1
Writeln ("Too many bad samples. No valid reading")
End If
Else
Writeln ("Failed")
RaiseEvent ErrorOccurred(PalletID, iStatus, "Failed to read the device", "ResistanceReadout", mstrParameterList)

End If

Else
Writeln ("Failed")
RaiseEvent ErrorOccurred(PalletID, iStatus, "Failed to configure the device", "ResistanceReadout", mstrParameterList)

End If

Else
Writeln ("Failed")
RaiseEvent ErrorOccurred(PalletID, iStatus, "Failed to configure the device", "ResistanceReadout", mstrParameterList)

End If

Else
Call Writeln("Failed.")
RaiseEvent ErrorOccurred(PalletID, iStatus, "Failed to initialize the device", "ResistanceReadout", mstrParameterList)
End If
0 Kudos
Message 1 of 2
(6,880 Views)
Hey monkeytail123,
There is a pretty nice function called niDMM_IsOverRange(...) that I would check after each niDMM_Read(...). This will set a boolean to a value based on whether the sample is overrange. If you continue to receive problems, please place your code (in its entirety) using the "Attachment" box under a "Message Body" box when you reply. This would allow us to reproduce your system to see if the code has a hidden "bug" in it.
There is also another suggestion. If you would, please uninstall your current version of NI-DMM (done under Windows Add/Remove Programs>>National Instruments Software (click change)>>NI-DMM (hit "Remove"). After doing so, please download the newest version of NI-DMM from our website www.ni.com/downloads ("drivers and updates"). This should take care of any problems fixed in newer revisions of the driver.

Sincerely,
Gavin Goodrich
Applications Engineer, MI/PXI
National Instruments
0 Kudos
Message 2 of 2
(6,869 Views)