- Extended sicshdbadapter to attach a node to the target of any
drivable. Required a new event in devexec.c - Fixed the phytron driver to handle speed well - Added a protocol driver for the TCP/IP bridge to the SLS magnets SKIPPED: psi/make_gen psi/phytron.c psi/psi.c psi/slsecho.c psi/sps.c
This commit is contained in:
@@ -8,6 +8,10 @@
|
||||
# baud and it ought to remember this. The command to change this
|
||||
# 0IC1S9600, the command to read this is 0IC1R.
|
||||
#
|
||||
# So, if this thing does not work on a serial port then the solution is
|
||||
# to set the terminal server to 57600 and try again. And set the baud rate
|
||||
# or leave it.
|
||||
#
|
||||
# There are surely many ways to use the MCC-2. It supports two axes, X and Y.
|
||||
# All examples below are given for X only. This driver uses it in
|
||||
# this way:
|
||||
@@ -163,7 +167,7 @@ proc phytron::readspeed {axis} {
|
||||
}
|
||||
#------------------------------------------------------------------------
|
||||
proc phytron::rcvspeed {} {
|
||||
set data [phyton::check]
|
||||
set data [phytron::check]
|
||||
set speed [string range $data 3 end]
|
||||
sct update $speed
|
||||
return idle
|
||||
@@ -176,7 +180,7 @@ proc phytron::writespeed {axis} {
|
||||
}
|
||||
#------------------------------------------------------------------------
|
||||
proc phytron::rcvwspeed {axis} {
|
||||
set data [phyton::check]
|
||||
set data [phytron::check]
|
||||
if {[string first NACK $data] >= 0} {
|
||||
error "Invalid command"
|
||||
}
|
||||
@@ -238,12 +242,13 @@ proc phytron::make {name axis controller lowlim upperlim} {
|
||||
hsetprop /sics/${name}/status statend phytron::statend $axis
|
||||
$controller poll /sics/${name}/status 60
|
||||
|
||||
hfactory /sics/{$name}/speed plain user float
|
||||
hfactory /sics/${name}/speed plain user float
|
||||
hsetprop /sics/${name}/speed read "phytron::readspeed $axis"
|
||||
hsetprop /sics/${name}/speed rcvspeed "phytron::rcvspeed"
|
||||
hsetprop /sics/${name}/speed write "phytron::writespeed $axis"
|
||||
hsetprop /sics/${name}/speed rcvwspeed "phytron::rcvwspeed $axis"
|
||||
$controller poll /sics/${name}/speed 60
|
||||
$controller write /sics/${name}/speed
|
||||
|
||||
$name makescriptfunc halt "phytron::halt $controller $axis" user
|
||||
|
||||
@@ -256,17 +261,16 @@ proc phytron::make {name axis controller lowlim upperlim} {
|
||||
$controller queue /sics/${name}/hardposition progress read
|
||||
$controller queue /sics/${name}/speed progress read
|
||||
}
|
||||
#======================================================================
|
||||
# At MORPHEUS there is a special table where one motor needs a brake.
|
||||
# This requires a digital I/O to be disabled before driving and
|
||||
# enabled after driving. The code below adds this feature to
|
||||
#===============================================================================================
|
||||
# At MORPHEUS there is a special table where one motor needs a brake. This requires a digital I/O
|
||||
# to be disabled before driving and enabled after driving. The code below adds this feature to
|
||||
# a phytron motor
|
||||
#------------------------------------------------------------------------
|
||||
#-----------------------------------------------------------------------------------------------
|
||||
proc phytron::openset {out} {
|
||||
sct send [format "0A%dS" $out]
|
||||
return openans
|
||||
}
|
||||
#------------------------------------------------------------------------
|
||||
#----------------------------------------------------------------------------------------------
|
||||
proc phytron::openans {axis name} {
|
||||
after 100
|
||||
return [phytron::setpos $axis $name]
|
||||
|
||||
Reference in New Issue
Block a user