Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.

Script to measure resistance within a tolerance

DMM6500 6½-Digit Touchscreen Multimeter
Post Reply
florentin.westermann
Posts: 1
Joined: October 12th, 2020, 12:40 am
Country: Switzerland

Script to measure resistance within a tolerance

Post by florentin.westermann » October 13th, 2020, 4:46 am

I want to write a test script on my DMM6500 with which I can measure if the resistor is within a tolerance. The tolerance is given by poslimit and neglimit, and I am using an if together with and for a PASS. However, the display never changes when the resistance is within those limits.
What am I doing wrong?

here's my code:

Code: Select all

local resi
local poslimit = 1515
local neglimit = 1485

reset()

--Set the measure function to 2-wire resistance
dmm.measure.func = dmm.FUNC_RESISTANCE
--Set the measure function to 4-wire resistance
--dmm.measure.func = dmm.FUNC_4W_RESISTANCE
-- Set the number of power line cycles 1 PLC
dmm.measure.nplc = 1
-- Immediately update autozero reference measurements and then disable the autozero function
dmm.measure.autozero.once()
-- Enable offset compensation for more accurate resistance reading
--dmm.measure.offsetcompensation.enable = dmm.ON

display.changescreen(display.SCREEN_USER_SWIPE)

while true do

display.settext(display.TEXT1, "FAIL")

resi = dmm.measure.read()

if (resi > neglimit and resi < poslimit) then

display.settext(display.TEXT1, "PASS")
--beeper.beep(0.05, 2400)

else

display.settext(display.TEXT1, "FAIL")
delay(0.1)

end
end

Post Reply

Return to “DMM6500 Bench/System DMM”

Who is online

Users browsing this forum: No registered users and 1 guest