Copied in-situ modifications from ics1-quokka.
This commit is contained in:
@@ -8,7 +8,7 @@ namespace eval ::scobj::ips120 {
|
||||
# /envcont/setpoint
|
||||
# /envcont/sensor/value
|
||||
proc debug_log {args} {
|
||||
set fd [open "/tmp/ips120.log" a]
|
||||
set fd [open "../log/ips120.log" a]
|
||||
puts $fd "[clock format [clock seconds] -format "%T"] $args"
|
||||
close $fd
|
||||
}
|
||||
@@ -94,9 +94,9 @@ debug_log "setPoint new data for $tc_root [sct] result=$par"
|
||||
hset $tc_root/status "busy"
|
||||
sct print "status: busy"
|
||||
hset $tc_root/drive_state "START"
|
||||
hsetprop $tc_root/setpoint driving 1
|
||||
} catch_message ]
|
||||
if {$catch_status != 0} {
|
||||
hsetprop $tc_root/setpoint driving 0
|
||||
return -code error $catch_message
|
||||
}
|
||||
sct print "setPoint: [hget $tc_root/drive_state]"
|
||||
@@ -455,8 +455,7 @@ debug_log "rdState $tc_root error scan status = $rslt on $my_status"
|
||||
set setpoint [sct target]
|
||||
set lolimit [hval $tc_root/lowerlimit]
|
||||
set hilimit [hval $tc_root/upperlimit]
|
||||
if {$setpoint < $lolimit || $setpoint > $hilimit} {
|
||||
sct driving 0
|
||||
if {$setpoint <= $lolimit || $setpoint => $hilimit} {
|
||||
error "setpoint violates limits"
|
||||
}
|
||||
return OK
|
||||
@@ -646,8 +645,8 @@ debug_log "Registering node $nodeName for write callback"
|
||||
createNode $scobj_hpath $sct_controller $cmdGroup $varName $readable $writable $drivable $dataType $permission $rdCmd $rdFunc $wrCmd $wrFunc $allowedValues $klass
|
||||
}
|
||||
|
||||
hsetprop $scobj_hpath/sensor/value lowerlimit -12
|
||||
hsetprop $scobj_hpath/sensor/value upperlimit 12
|
||||
hsetprop $scobj_hpath/sensor/value lowerlimit -10
|
||||
hsetprop $scobj_hpath/sensor/value upperlimit 10
|
||||
hsetprop $scobj_hpath/sensor/value units "T"
|
||||
|
||||
hfactory $scobj_hpath/apply_tolerance plain user int
|
||||
@@ -745,7 +744,7 @@ debug_log "Registering node $nodeName for write callback"
|
||||
# @param port, the IP protocol port number of the device
|
||||
# @param _tol (optional), this is the initial tolerance setting
|
||||
proc add_ips120 {name IP port {_tol 5.0}} {
|
||||
set fd [open "/tmp/ips120.log" a]
|
||||
set fd [open "../log/ips120.log" a]
|
||||
if {[SplitReply [environment_simulation]]=="false"} {
|
||||
puts $fd "makesctcontroller sct_ips120 oxford ${IP}:$port"
|
||||
makesctcontroller sct_ips120 oxford ${IP}:$port
|
||||
@@ -758,7 +757,7 @@ proc add_ips120 {name IP port {_tol 5.0}} {
|
||||
}
|
||||
|
||||
puts stdout "file evaluation of sct_oxford_ips.tcl"
|
||||
set fd [open "/tmp/ips120.log" w]
|
||||
set fd [open "../log/ips120.log" w]
|
||||
puts $fd "file evaluation of sct_oxford_ips.tcl"
|
||||
close $fd
|
||||
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
source $cfPath(hipadaba)/instdict_specification.tcl
|
||||
source $cfPath(hipadaba)/common_instrument_dictionary.tcl
|
||||
|
||||
InstallHdb
|
||||
|
||||
namespace eval ::hdb {
|
||||
namespace export buildHDB attlist
|
||||
|
||||
|
||||
@@ -76,6 +76,15 @@ proc ::scan::hmm_scan_collect {sobj uobj point} {
|
||||
clientput "Monitor $bmn [SplitReply [$bmon getcounts]]"
|
||||
}
|
||||
}
|
||||
proc ::scan::hmscanend_event {} {
|
||||
::scan::runscan_cmd -set feedback status IDLE
|
||||
}
|
||||
publish ::scan::hmscanend_event user
|
||||
|
||||
proc ::scan::bmonscanend_event {} {
|
||||
::scan::hdb_bmonscan -set feedback status IDLE
|
||||
}
|
||||
publish ::scan::bmonscanend_event user
|
||||
|
||||
proc ::scan::ic_initialize {} {
|
||||
if [ catch {
|
||||
@@ -117,6 +126,8 @@ proc ::scan::ic_initialize {} {
|
||||
savetype text=save,nosave
|
||||
force boolean
|
||||
}]
|
||||
scriptcallback connect hmscan SCANEND ::scan::hmscanend_event
|
||||
scriptcallback connect bmonscan SCANEND ::scan::bmonscanend_event
|
||||
} message ] {
|
||||
if {$::errorCode=="NONE"} {return $message}
|
||||
return -code error $message
|
||||
|
||||
Reference in New Issue
Block a user