fix valve readback
the ccu4 firmware does not report changes on valves upon the ? command. fix it: poll explicitly
This commit is contained in:
@ -385,12 +385,14 @@ proc stdConfig::ccu4 {{title CCU4} args} {
|
|||||||
} elseif {[string match valve* $a]} {
|
} elseif {[string match valve* $a]} {
|
||||||
set nvalve [string range $a 5 end]
|
set nvalve [string range $a 5 end]
|
||||||
for {set ch 1} {$ch <= 12} {incr ch} {
|
for {set ch 1} {$ch <= 12} {incr ch} {
|
||||||
node v$ch upd
|
node v$ch rd -int 10
|
||||||
|
prop read ccu4::readValve v$ch
|
||||||
prop enum valve_off,valve_on,no_valve,timeout,timeout1,boost
|
prop enum valve_off,valve_on,no_valve,timeout,timeout1,boost
|
||||||
if {$ch > $nvalve} {
|
if {$ch > $nvalve} {
|
||||||
prop visible false
|
prop visible false
|
||||||
}
|
}
|
||||||
node vc$ch out -int
|
node vc$ch out -int
|
||||||
|
prop write ccu4::writeValve v$ch
|
||||||
prop enum valve_off,valve_on
|
prop enum valve_off,valve_on
|
||||||
if {$ch > $nvalve} {
|
if {$ch > $nvalve} {
|
||||||
prop visible false
|
prop visible false
|
||||||
@ -404,6 +406,20 @@ proc stdConfig::ccu4 {{title CCU4} args} {
|
|||||||
return "CCU4"
|
return "CCU4"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc ccu4::readValve {valve} {
|
||||||
|
# for some strange reason, v... are not queried with '?'
|
||||||
|
# we have to do it here
|
||||||
|
sct send $valve
|
||||||
|
return ccu4::complete
|
||||||
|
}
|
||||||
|
|
||||||
|
proc ccu4::writeValve {valve} {
|
||||||
|
set res [ccu4::write]
|
||||||
|
# update readback value immediately
|
||||||
|
hupdate [sct parent]/$valve [sct target]
|
||||||
|
return $res
|
||||||
|
}
|
||||||
|
|
||||||
proc ccu4::completeStart {name} {
|
proc ccu4::completeStart {name} {
|
||||||
set resval(cid) 0
|
set resval(cid) 0
|
||||||
set resval(cir) ""
|
set resval(cir) ""
|
||||||
|
@ -30,10 +30,6 @@ GraphAdd p4 bar p4 yellow
|
|||||||
makenv -objname pressreg -driver bronkpreg -port jtccr-ts:3005 18
|
makenv -objname pressreg -driver bronkpreg -port jtccr-ts:3005 18
|
||||||
GraphAdd pressreg bar preg magenta
|
GraphAdd pressreg bar preg magenta
|
||||||
|
|
||||||
#makenv -objname v -driver svumot -port jtccr-ts:3006 {
|
|
||||||
# v1 1 v2 2 v3 3 v4 4 v5 5 v6 6 v7 7 v8 mot
|
|
||||||
#}
|
|
||||||
|
|
||||||
makenv epc epc8210 -port jtccr-ts:3007 {jt-compressor 1 jt-pump 2 ccr-compressor 3}
|
makenv epc epc8210 -port jtccr-ts:3007 {jt-compressor 1 jt-pump 2 ccr-compressor 3}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user