initial commit

This commit is contained in:
l_samenv
2022-08-18 15:04:28 +02:00
commit 46dcf8e77c
591 changed files with 69282 additions and 0 deletions

28
tcl/drivers/presshch.tcl Normal file
View File

@ -0,0 +1,28 @@
# humidity chamber pressure reading (4-20 mA with taskit RS232 ADC)
namespace eval presshch {} {
}
proc stdConfig::presshch {} {
controller std "\r" 5
obj PressHumidityChamber rd
prop readcmd ":0400000003.."
prop update presshch::update
kids Pressure {
node calib_min par 848
node calib_max par 1153
}
}
proc presshch::update {} {
if {[scan [sct result] ":0406%4x%4x%4x" a0 a1 a2] == 3} {
get_values [sct] calib_min calib_max
sct update [expr (($a2-$a0) * 25 / 65536. - 4) / 16. * ($calib_max - $calib_min) + $calib_min]
} else {
error "bad result: [sct result]"
}
return idle
}