4-wire resistance measurement feature TBT

This commit is contained in:
germano 2022-12-16 11:57:33 +01:00
parent 8c9ee6584e
commit 46deb81013
3 changed files with 8 additions and 2 deletions

View File

@ -70,6 +70,7 @@ status_pin: 0
; port: ?
baudrate: 115200
cable_resistance: 0.75
4wire: disabled
[neo_pixels]
; port: ?

View File

@ -13,6 +13,7 @@ port: COM6
[multicomp]
port: COM10
4wire: enabled
[recipe]
recipe_name_field: cod finito cliente

View File

@ -40,7 +40,10 @@ class Multicomp730424(Component):
self.write("FUNC1 \"RES\"")
self.write("RATE F")
self.write("AUTO 0")
self.write("CONF:RES 500")
if self.config[self.name]["4wire"] is "enabled":
self.write("CONF:FRES 500")
else:
self.write("CONF:RES 500")
def set_resistance_scale(self, resistance=None):
if resistance is None:
@ -79,6 +82,7 @@ class Multicomp730424(Component):
self.write(command)
info[value_name] = self.read()
if isinstance(info["measure"], float) and info["measure"] < 1e9:
info["measure"] -= self.cable_resistance
if self.config[self.name]["4wire"] is not "enabled":
info["measure"] -= self.cable_resistance
self.log.debug(str(info))
super()._get([info])