Remove superfluous trailing white space from TCL files
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
#--------------------------------------------------------
|
||||
# This is a scriptcontext based driver for the EL734
|
||||
# motor controller. This is part of an ongoing effort to
|
||||
# expire older drivers and to consolidate on the new
|
||||
# motor controller. This is part of an ongoing effort to
|
||||
# expire older drivers and to consolidate on the new
|
||||
# scriptcontext system.
|
||||
#
|
||||
# Scriptchains:
|
||||
# Rather then having long script chains many of the
|
||||
# intricacies of the EL734 are handled via a command
|
||||
# processing state machine. See the docs below for
|
||||
# Rather then having long script chains many of the
|
||||
# intricacies of the EL734 are handled via a command
|
||||
# processing state machine. See the docs below for
|
||||
# details
|
||||
#
|
||||
# copyright: see file COPYRIGHT
|
||||
@@ -19,24 +19,24 @@ namespace eval el734 {}
|
||||
|
||||
#---------------------------------------------------------
|
||||
# The EL734 is a a tricky thing. Some special conditions
|
||||
# apply:
|
||||
# - On emergency stop an *ES is sent. But only the second
|
||||
# response of this kind is valid because there can be
|
||||
# spurious *ES on the line even when the emergency stop
|
||||
# apply:
|
||||
# - On emergency stop an *ES is sent. But only the second
|
||||
# response of this kind is valid because there can be
|
||||
# spurious *ES on the line even when the emergency stop
|
||||
# has been released.
|
||||
# - If someone fingers the EL734 or after startup it is in
|
||||
# - If someone fingers the EL734 or after startup it is in
|
||||
# local mode. Then two commands have to be sent in order to
|
||||
# make it go into remote mode before retrying the command.
|
||||
# - In some echo modes of the controller it sends a echo
|
||||
# make it go into remote mode before retrying the command.
|
||||
# - In some echo modes of the controller it sends a echo
|
||||
# of the command. This has to be ignored in order to get at
|
||||
# the real problem
|
||||
#
|
||||
# In order to deal with all this, el734::command is implemented
|
||||
# as a state machine which calls another script when a valid
|
||||
# In order to deal with all this, el734::command is implemented
|
||||
# as a state machine which calls another script when a valid
|
||||
# reponse has actually been found.
|
||||
# The state of the current command processing
|
||||
# is saved in a node property comstate. The actual command to send
|
||||
# is in the property comstring. The script to call if we actually
|
||||
# is in the property comstring. The script to call if we actually
|
||||
# have a valid response is stored in the property comresponse
|
||||
#---------------------------------------------------------------
|
||||
proc el734::setcommand {command responsescript {motno 0}} {
|
||||
@@ -45,10 +45,10 @@ proc el734::setcommand {command responsescript {motno 0}} {
|
||||
sct comstring $command
|
||||
sct commotno $motno
|
||||
return command
|
||||
}
|
||||
}
|
||||
#---------------------------------------------------------------
|
||||
# As implemented now this can go in an endless loop if switching
|
||||
# to local fails repeatedly. TODO: test if this happens with the
|
||||
# to local fails repeatedly. TODO: test if this happens with the
|
||||
# real device
|
||||
#---------------------------------------------------------------
|
||||
proc el734::command {} {
|
||||
@@ -132,7 +132,7 @@ proc el734::checkerror {} {
|
||||
}
|
||||
}
|
||||
return $reply
|
||||
}
|
||||
}
|
||||
#========================== Position ===============================
|
||||
proc el734::readpos {num} {
|
||||
set com [format "u %d" $num]
|
||||
@@ -214,7 +214,7 @@ proc el734::decodemsr {name msr} {
|
||||
set msrdata(0x40) "Bad step"
|
||||
set msrdata(0x100) posfault
|
||||
set msrdata(0x400) posfault
|
||||
|
||||
|
||||
set oredmsr [hval /sics/${name}/oredmsr]
|
||||
if {$msr == 0} {
|
||||
#-------- FINISHED
|
||||
@@ -223,7 +223,7 @@ proc el734::decodemsr {name msr} {
|
||||
if {$pos > 0 || $run > 0} {
|
||||
return posfault
|
||||
}
|
||||
|
||||
|
||||
set orlist [array names oredata]
|
||||
foreach code $orlist {
|
||||
if {$oredmsr & $code} {
|
||||
@@ -402,7 +402,7 @@ proc el734::refrun {controller name num} {
|
||||
wait 2
|
||||
set ss [hval /sics/${name}/ss]
|
||||
if { [string first ?BSY $ss] < 0} {
|
||||
break
|
||||
break
|
||||
}
|
||||
set rupt [getint]
|
||||
if { [string compare $rupt continue] != 0} {
|
||||
@@ -426,7 +426,7 @@ proc el734::reset {name} {
|
||||
#========================= Make ==================================
|
||||
proc el734::make {name no controller} {
|
||||
MakeSecMotor $name
|
||||
|
||||
|
||||
hfactory /sics/${name}/oredmsr plain internal int
|
||||
hfactory /sics/${name}/runfault plain internal int
|
||||
hfactory /sics/${name}/posfault plain internal int
|
||||
@@ -442,7 +442,7 @@ proc el734::make {name no controller} {
|
||||
hsetprop /sics/${name}/hardlowerlim read el734::getlim $name $no
|
||||
hsetprop /sics/${name}/hardlowerlim command el734::command
|
||||
$controller poll /sics/${name}/hardlowerlim 120
|
||||
|
||||
|
||||
hsetprop /sics/${name}/status read el734::readstatus $no $name
|
||||
hsetprop /sics/${name}/status command el734::command
|
||||
$controller poll /sics/${name}/status 40
|
||||
@@ -472,7 +472,7 @@ proc el734::addrefstuff {name no controller} {
|
||||
hfactory /sics/${name}/refnull plain user int
|
||||
hsetprop /sics/${name}/refnull read el734::readref $no
|
||||
hsetprop /sics/${name}/refnull command el734::command
|
||||
$controller poll /sics/${name}/refnull 300
|
||||
$controller poll /sics/${name}/refnull 300
|
||||
|
||||
hsetprop /sics/${name}/refnull write el734::setref $name $no
|
||||
hsetprop /sics/${name}/refnull command el734::command
|
||||
@@ -481,8 +481,8 @@ proc el734::addrefstuff {name no controller} {
|
||||
hfactory /sics/${name}/ss plain internal text
|
||||
hsetprop /sics/${name}/ss read el734::readss $no
|
||||
hsetprop /sics/${name}/ss ssread el734::ssread
|
||||
$controller poll /sics/${name}/ss 300
|
||||
$controller poll /sics/${name}/ss 300
|
||||
|
||||
$name makescriptfunc refrun "el734::refrun $controller $name $no" user
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user