Added ss2? slits and set IP addresses for controllers.
r993 | ffr | 2006-05-10 16:27:45 +1000 (Wed, 10 May 2006) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
f6896faaad
commit
99eb416ad3
@@ -1,5 +1,5 @@
|
|||||||
# $Revision: 1.3 $
|
# $Revision: 1.4 $
|
||||||
# $Date: 2006-05-09 05:56:22 $
|
# $Date: 2006-05-10 06:27:45 $
|
||||||
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
|
||||||
# Last revision by: $Author: ffr $
|
# Last revision by: $Author: ffr $
|
||||||
|
|
||||||
@@ -85,16 +85,13 @@ MakeDrive
|
|||||||
set dmc2280_controller1(host) 137.157.201.66
|
set dmc2280_controller1(host) 137.157.201.66
|
||||||
set dmc2280_controller1(port) 1034
|
set dmc2280_controller1(port) 1034
|
||||||
|
|
||||||
set dmc2280_controller2(host) localhost
|
set dmc2280_controller2(host) 137.157.201.67
|
||||||
#set dmc2280_controller2(host) 137.157.201.67 1034
|
|
||||||
set dmc2280_controller2(port) 1034
|
set dmc2280_controller2(port) 1034
|
||||||
|
|
||||||
set dmc2280_controller3(host) localhost
|
set dmc2280_controller3(host) 137.157.201.68
|
||||||
#set dmc2280_controller3(host) 137.157.201.67
|
set dmc2280_controller3(port) 1034
|
||||||
set dmc2280_controller3(port) 1035
|
|
||||||
#set dmc2280_controller3(port) 1034
|
|
||||||
|
|
||||||
set dmc2280_controller4(host) 137.157.201.68
|
set dmc2280_controller4(host) 137.157.201.69
|
||||||
set dmc2280_controller4(port) 1034
|
set dmc2280_controller4(port) 1034
|
||||||
|
|
||||||
#Motor mth DMC2280 [params \
|
#Motor mth DMC2280 [params \
|
||||||
@@ -423,6 +420,10 @@ ss1r home 0
|
|||||||
# host $dmc2280_controller4(host)\
|
# host $dmc2280_controller4(host)\
|
||||||
# port $dmc2280_controller4(port)\
|
# port $dmc2280_controller4(port)\
|
||||||
# axis F?\
|
# axis F?\
|
||||||
|
units mm\
|
||||||
|
maxSpeed 1\
|
||||||
|
maxAccel 1\
|
||||||
|
maxDecel 1\
|
||||||
# stepsPerX -20000\
|
# stepsPerX -20000\
|
||||||
# motorHome 2043085]
|
# motorHome 2043085]
|
||||||
#ss2u hardlowerlim 0
|
#ss2u hardlowerlim 0
|
||||||
@@ -435,6 +436,10 @@ ss1r home 0
|
|||||||
# host $dmc2280_controller4(host)\
|
# host $dmc2280_controller4(host)\
|
||||||
# port $dmc2280_controller4(port)\
|
# port $dmc2280_controller4(port)\
|
||||||
# axis F?\
|
# axis F?\
|
||||||
|
units mm\
|
||||||
|
maxSpeed 1\
|
||||||
|
maxAccel 1\
|
||||||
|
maxDecel 1\
|
||||||
# stepsPerX -20000\
|
# stepsPerX -20000\
|
||||||
# motorHome 2043085]
|
# motorHome 2043085]
|
||||||
#ss2d hardlowerlim 0
|
#ss2d hardlowerlim 0
|
||||||
@@ -447,6 +452,10 @@ ss1r home 0
|
|||||||
# host $dmc2280_controller4(host)\
|
# host $dmc2280_controller4(host)\
|
||||||
# port $dmc2280_controller4(port)\
|
# port $dmc2280_controller4(port)\
|
||||||
# axis F?\
|
# axis F?\
|
||||||
|
units mm\
|
||||||
|
maxSpeed 1\
|
||||||
|
maxAccel 1\
|
||||||
|
maxDecel 1\
|
||||||
# stepsPerX -20000\
|
# stepsPerX -20000\
|
||||||
# motorHome 500000]
|
# motorHome 500000]
|
||||||
#ss2l hardlowerlim 0
|
#ss2l hardlowerlim 0
|
||||||
@@ -459,6 +468,10 @@ ss1r home 0
|
|||||||
# host $dmc2280_controller4(host)\
|
# host $dmc2280_controller4(host)\
|
||||||
# port $dmc2280_controller4(port)\
|
# port $dmc2280_controller4(port)\
|
||||||
# axis F?\
|
# axis F?\
|
||||||
|
units mm\
|
||||||
|
maxSpeed 1\
|
||||||
|
maxAccel 1\
|
||||||
|
maxDecel 1\
|
||||||
# stepsPerX -20000\
|
# stepsPerX -20000\
|
||||||
# motorHome 500000]
|
# motorHome 500000]
|
||||||
#ss2r hardlowerlim 0
|
#ss2r hardlowerlim 0
|
||||||
@@ -472,28 +485,28 @@ proc SplitReply { text } {
|
|||||||
set l [split $text =]
|
set l [split $text =]
|
||||||
return [lindex $l 1]
|
return [lindex $l 1]
|
||||||
}
|
}
|
||||||
# virtual motor ss1(h)orizontal (width)
|
|
||||||
#--------------------------------------------------------
|
#--------------------------------------------------------
|
||||||
proc widthscript {val} {
|
proc ss1widthscript {val} {
|
||||||
set currentWidth [expr [SplitReply [ss1r]] + [SplitReply [ss1l]]]
|
set currentWidth [expr [SplitReply [ss1r]] + [SplitReply [ss1l]]]
|
||||||
set diff [expr $val - $currentWidth]
|
set diff [expr $val - $currentWidth]
|
||||||
set newD1R [expr [SplitReply [ss1r]] + $diff/2]
|
set newD1R [expr [SplitReply [ss1r]] + $diff/2]
|
||||||
set newD1L [expr [SplitReply [ss1l]] + $diff/2]
|
set newD1L [expr [SplitReply [ss1l]] + $diff/2]
|
||||||
return "ss1r=$newD1R,ss1l=$newD1L"
|
return "ss1r=$newD1R,ss1l=$newD1L"
|
||||||
}
|
}
|
||||||
publish widthscript user
|
publish ss1widthscript user
|
||||||
|
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
proc readwidth {} {
|
proc ss1readwidth {} {
|
||||||
return [expr [SplitReply [ss1r]] + [SplitReply [ss1l]]]
|
return [expr [SplitReply [ss1r]] + [SplitReply [ss1l]]]
|
||||||
}
|
}
|
||||||
publish readwidth user
|
publish ss1readwidth user
|
||||||
MakeConfigurableMotor ss1hg
|
MakeConfigurableMotor ss1hg
|
||||||
ss1hg drivescript widthscript
|
ss1hg drivescript ss1widthscript
|
||||||
ss1hg readscript readwidth
|
ss1hg readscript ss1readwidth
|
||||||
|
|
||||||
# virtual motor ss1(h)orizontal (offset)
|
|
||||||
#--------------------------------------------------------
|
#--------------------------------------------------------
|
||||||
proc horoffsetscript {val} {
|
proc ss1horoffsetscript {val} {
|
||||||
set SR [SplitReply [ss1r]]
|
set SR [SplitReply [ss1r]]
|
||||||
set SL [SplitReply [ss1l]]
|
set SL [SplitReply [ss1l]]
|
||||||
set currentOffset [ expr $SR - ($SR + $SL)/2.0 ]
|
set currentOffset [ expr $SR - ($SR + $SL)/2.0 ]
|
||||||
@@ -502,42 +515,43 @@ proc horoffsetscript {val} {
|
|||||||
set newD1L [expr $SL - $diff]
|
set newD1L [expr $SL - $diff]
|
||||||
return "ss1r=$newD1R,ss1l=$newD1L"
|
return "ss1r=$newD1R,ss1l=$newD1L"
|
||||||
}
|
}
|
||||||
publish horoffsetscript user
|
publish ss1horoffsetscript user
|
||||||
|
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
proc readhoroffset {} {
|
proc ss1readhoroffset {} {
|
||||||
set SR [SplitReply [ss1r]]
|
set SR [SplitReply [ss1r]]
|
||||||
return [ expr $SR - ($SR + [SplitReply [ss1l]])/2.0 ]
|
return [ expr $SR - ($SR + [SplitReply [ss1l]])/2.0 ]
|
||||||
}
|
}
|
||||||
publish readhoroffset user
|
publish ss1readhoroffset user
|
||||||
|
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
MakeConfigurableMotor ss1ho
|
MakeConfigurableMotor ss1ho
|
||||||
ss1ho drivescript horoffsetscript
|
ss1ho drivescript ss1horoffsetscript
|
||||||
ss1ho readscript readhoroffset
|
ss1ho readscript ss1readhoroffset
|
||||||
|
|
||||||
# virtual motor ss1v(ertical), height
|
|
||||||
#-----------------------------------------------------
|
#-----------------------------------------------------
|
||||||
proc heightscript {val} {
|
proc ss1heightscript {val} {
|
||||||
set currentWidth [expr [SplitReply [ss1u]] + [SplitReply [ss1d]]]
|
set currentWidth [expr [SplitReply [ss1u]] + [SplitReply [ss1d]]]
|
||||||
set diff [expr $val - $currentWidth]
|
set diff [expr $val - $currentWidth]
|
||||||
set newD1B [expr [SplitReply [ss1d]] + $diff/2]
|
set newD1B [expr [SplitReply [ss1d]] + $diff/2]
|
||||||
set newD1T [expr [SplitReply [ss1u]] + $diff/2]
|
set newD1T [expr [SplitReply [ss1u]] + $diff/2]
|
||||||
return "ss1d=$newD1B,ss1u=$newD1T"
|
return "ss1d=$newD1B,ss1u=$newD1T"
|
||||||
}
|
}
|
||||||
publish heightscript user
|
publish ss1heightscript user
|
||||||
|
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
proc readheight {} {
|
proc ss1readheight {} {
|
||||||
return [expr [SplitReply [ss1u]] + [SplitReply [ss1d]]]
|
return [expr [SplitReply [ss1u]] + [SplitReply [ss1d]]]
|
||||||
}
|
}
|
||||||
publish readheight user
|
publish ss1readheight user
|
||||||
|
|
||||||
#---------------------------------------------------------
|
#---------------------------------------------------------
|
||||||
MakeConfigurableMotor ss1vg
|
MakeConfigurableMotor ss1vg
|
||||||
ss1vg drivescript heightscript
|
ss1vg drivescript ss1heightscript
|
||||||
ss1vg readscript readheight
|
ss1vg readscript ss1readheight
|
||||||
|
|
||||||
# virtual motor ss1(v)ertical (offset)
|
|
||||||
#--------------------------------------------------------
|
#--------------------------------------------------------
|
||||||
proc vertoffsetscript {val} {
|
proc ss1vertoffsetscript {val} {
|
||||||
set SU [SplitReply [ss1u]]
|
set SU [SplitReply [ss1u]]
|
||||||
set SD [SplitReply [ss1d]]
|
set SD [SplitReply [ss1d]]
|
||||||
set currentOffset [ expr $SU - ($SU + $SD)/2.0 ]
|
set currentOffset [ expr $SU - ($SU + $SD)/2.0 ]
|
||||||
@@ -546,15 +560,106 @@ proc vertoffsetscript {val} {
|
|||||||
set newD1D [expr $SD - $diff]
|
set newD1D [expr $SD - $diff]
|
||||||
return "ss1u=$newD1U,ss1d=$newD1D"
|
return "ss1u=$newD1U,ss1d=$newD1D"
|
||||||
}
|
}
|
||||||
publish vertoffsetscript user
|
publish ss1vertoffsetscript user
|
||||||
|
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
proc readvertoffset {} {
|
proc ss1readvertoffset {} {
|
||||||
set SU [SplitReply [ss1u]]
|
set SU [SplitReply [ss1u]]
|
||||||
return [ expr $SU - ($SU + [SplitReply [ss1d]])/2.0 ]
|
return [ expr $SU - ($SU + [SplitReply [ss1d]])/2.0 ]
|
||||||
}
|
}
|
||||||
publish readvertoffset user
|
publish ss1readvertoffset user
|
||||||
|
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
MakeConfigurableMotor ss1vo
|
MakeConfigurableMotor ss1vo
|
||||||
ss1vo drivescript vertoffsetscript
|
ss1vo drivescript ss1vertoffsetscript
|
||||||
ss1vo readscript readvertoffset
|
ss1vo readscript ss1readvertoffset
|
||||||
|
###############################################
|
||||||
|
|
||||||
|
|
||||||
|
#--------------------------------------------------------
|
||||||
|
proc ss2widthscript {val} {
|
||||||
|
set currentWidth [expr [SplitReply [ss2r]] + [SplitReply [ss2l]]]
|
||||||
|
set diff [expr $val - $currentWidth]
|
||||||
|
set newD1R [expr [SplitReply [ss2r]] + $diff/2]
|
||||||
|
set newD1L [expr [SplitReply [ss2l]] + $diff/2]
|
||||||
|
return "ss2r=$newD1R,ss2l=$newD1L"
|
||||||
|
}
|
||||||
|
publish ss2widthscript user
|
||||||
|
|
||||||
|
#-------------------------------------------------------
|
||||||
|
proc ss2readwidth {} {
|
||||||
|
return [expr [SplitReply [ss2r]] + [SplitReply [ss2l]]]
|
||||||
|
}
|
||||||
|
publish ss2readwidth user
|
||||||
|
MakeConfigurableMotor ss2hg
|
||||||
|
ss2hg drivescript ss2widthscript
|
||||||
|
ss2hg readscript ss2readwidth
|
||||||
|
|
||||||
|
#--------------------------------------------------------
|
||||||
|
proc ss2horoffsetscript {val} {
|
||||||
|
set SR [SplitReply [ss2r]]
|
||||||
|
set SL [SplitReply [ss2l]]
|
||||||
|
set currentOffset [ expr $SR - ($SR + $SL)/2.0 ]
|
||||||
|
set diff [expr $val - $currentOffset]
|
||||||
|
set newD1R [expr $SR + $diff]
|
||||||
|
set newD1L [expr $SL - $diff]
|
||||||
|
return "ss2r=$newD1R,ss2l=$newD1L"
|
||||||
|
}
|
||||||
|
publish ss2horoffsetscript user
|
||||||
|
|
||||||
|
#-------------------------------------------------------
|
||||||
|
proc ss2readhoroffset {} {
|
||||||
|
set SR [SplitReply [ss2r]]
|
||||||
|
return [ expr $SR - ($SR + [SplitReply [ss2l]])/2.0 ]
|
||||||
|
}
|
||||||
|
publish ss2readhoroffset user
|
||||||
|
|
||||||
|
#-------------------------------------------------------
|
||||||
|
MakeConfigurableMotor ss2ho
|
||||||
|
ss2ho drivescript ss2horoffsetscript
|
||||||
|
ss2ho readscript ss2readhoroffset
|
||||||
|
|
||||||
|
#-----------------------------------------------------
|
||||||
|
proc ss2heightscript {val} {
|
||||||
|
set currentWidth [expr [SplitReply [ss2u]] + [SplitReply [ss2d]]]
|
||||||
|
set diff [expr $val - $currentWidth]
|
||||||
|
set newD1B [expr [SplitReply [ss2d]] + $diff/2]
|
||||||
|
set newD1T [expr [SplitReply [ss2u]] + $diff/2]
|
||||||
|
return "ss2d=$newD1B,ss2u=$newD1T"
|
||||||
|
}
|
||||||
|
publish ss2heightscript user
|
||||||
|
|
||||||
|
#-------------------------------------------------------
|
||||||
|
proc ss2readheight {} {
|
||||||
|
return [expr [SplitReply [ss2u]] + [SplitReply [ss2d]]]
|
||||||
|
}
|
||||||
|
publish ss2readheight user
|
||||||
|
|
||||||
|
#---------------------------------------------------------
|
||||||
|
MakeConfigurableMotor ss2vg
|
||||||
|
ss2vg drivescript ss2heightscript
|
||||||
|
ss2vg readscript ss2readheight
|
||||||
|
|
||||||
|
#--------------------------------------------------------
|
||||||
|
proc ss2vertoffsetscript {val} {
|
||||||
|
set SU [SplitReply [ss2u]]
|
||||||
|
set SD [SplitReply [ss2d]]
|
||||||
|
set currentOffset [ expr $SU - ($SU + $SD)/2.0 ]
|
||||||
|
set diff [expr $val - $currentOffset]
|
||||||
|
set newD1U [expr $SU + $diff]
|
||||||
|
set newD1D [expr $SD - $diff]
|
||||||
|
return "ss2u=$newD1U,ss2d=$newD1D"
|
||||||
|
}
|
||||||
|
publish ss2vertoffsetscript user
|
||||||
|
|
||||||
|
#-------------------------------------------------------
|
||||||
|
proc ss2readvertoffset {} {
|
||||||
|
set SU [SplitReply [ss2u]]
|
||||||
|
return [ expr $SU - ($SU + [SplitReply [ss2d]])/2.0 ]
|
||||||
|
}
|
||||||
|
publish ss2readvertoffset user
|
||||||
|
|
||||||
|
#-------------------------------------------------------
|
||||||
|
MakeConfigurableMotor ss2vo
|
||||||
|
ss2vo drivescript ss2vertoffsetscript
|
||||||
|
ss2vo readscript ss2readvertoffset
|
||||||
|
|||||||
Reference in New Issue
Block a user