SICS-770 Fixed SICS reports 'bad status code' when scanning the schp motor
This commit is contained in:
@ -423,13 +423,16 @@ namespace eval ::chopper {
|
|||||||
set catch_status [ catch {
|
set catch_status [ catch {
|
||||||
if [hgetpropval $hpath/$node abort] {
|
if [hgetpropval $hpath/$node abort] {
|
||||||
hsetprop $hpath/$node abort 0
|
hsetprop $hpath/$node abort 0
|
||||||
clientput "ERROR: User requested stop. Aborting operation"
|
set errStr "ERROR: User requested stop. Aborting operation"
|
||||||
|
clientput $errStr
|
||||||
|
hsetprop $hpath/$node errmsg $errStr
|
||||||
return $SCode(HWFault)
|
return $SCode(HWFault)
|
||||||
}
|
}
|
||||||
set devErr [hval $hpath/$node/control/device_error]
|
set devErr [hval $hpath/$node/control/device_error]
|
||||||
if {$devErr != ""} {
|
if {$devErr != ""} {
|
||||||
clientput "ERROR: Drive request failed. Aborting operation"
|
set errStr "ERROR: Drive request failed. Aborting operation: device_error = $devErr"
|
||||||
clientput $devErr
|
clientput $errStr
|
||||||
|
hsetprop $hpath/$node errmsg $errStr
|
||||||
return $SCode(HWFault)
|
return $SCode(HWFault)
|
||||||
}
|
}
|
||||||
if [hpropexists $hpath geterror] {
|
if [hpropexists $hpath geterror] {
|
||||||
@ -458,6 +461,8 @@ namespace eval ::chopper {
|
|||||||
return $SCode(HWBusy)
|
return $SCode(HWBusy)
|
||||||
} elseif {[expr $readtime - $timecheck] > $timeout} {
|
} elseif {[expr $readtime - $timecheck] > $timeout} {
|
||||||
return $SCode(HWIdle)
|
return $SCode(HWIdle)
|
||||||
|
} else {
|
||||||
|
return $SCode(HWBusy)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if {$timecheck != -1} {
|
if {$timecheck != -1} {
|
||||||
@ -498,6 +503,9 @@ namespace eval ::chopper {
|
|||||||
proc imot_PhRun {hpath node addr name target} {
|
proc imot_PhRun {hpath node addr name target} {
|
||||||
global SCode
|
global SCode
|
||||||
|
|
||||||
|
if {[hval $hpath/$node/control/device_error] != ""} {
|
||||||
|
hset $hpath/$node/control/device_error ""
|
||||||
|
}
|
||||||
hset $hpath/$node/control/set_ref_delay $target
|
hset $hpath/$node/control/set_ref_delay $target
|
||||||
hsetprop $hpath/$node/control timecheck -1
|
hsetprop $hpath/$node/control timecheck -1
|
||||||
set readtime [hgetpropval $hpath read_time]
|
set readtime [hgetpropval $hpath read_time]
|
||||||
|
Reference in New Issue
Block a user