Updated to get in-situ changes to motor configurations (eg monochromator resolvers) r3072 | ffr | 2011-02-25 19:12:19 +1100 (Fri, 25 Feb 2011) | 2 lines
64 lines
1.0 KiB
Tcl
64 lines
1.0 KiB
Tcl
proc PulserOn {} {
|
|
pulser send "OUTP ON"
|
|
|
|
}
|
|
|
|
proc PulserOff {} {
|
|
pulser send "OUTP OFF"
|
|
|
|
}
|
|
|
|
proc PulserSin {Freq Volt} {
|
|
set resp [pulser send FUNC?]
|
|
if {[string first "SIN" $resp ] == -1 } {
|
|
pulser send FUNC SIN
|
|
}
|
|
pulser send VOLT $Volt
|
|
pulser send FREQ $Freq
|
|
pulser send VOLT:OFFS 0
|
|
|
|
}
|
|
|
|
proc PulserSquare {Freq Volt} {
|
|
set resp [pulser send FUNC?]
|
|
if {[string first "SQU" $resp ] == -1 } {
|
|
pulser send FUNC SQU
|
|
}
|
|
pulser send VOLT $Volt
|
|
pulser send FREQ $Freq
|
|
pulser send VOLT:OFFS 0
|
|
|
|
}
|
|
|
|
proc PulserSquareOffs {Freq Volt Offs} {
|
|
set resp [pulser send FUNC?]
|
|
if {[string first "SQU" $resp ] == -1 } {
|
|
pulser send FUNC SQU
|
|
}
|
|
pulser send VOLT $Volt
|
|
pulser send FREQ $Freq
|
|
pulser send VOLT:OFFS $Offs
|
|
|
|
}
|
|
|
|
|
|
proc PulserDC {Volt} {
|
|
set resp [pulser send FUNC?]
|
|
broadcast $resp
|
|
if {[string first "DC" $resp ] == -1 } {
|
|
pulser send FUNC DC
|
|
}
|
|
pulser send VOLT:OFFS $Volt
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
publish PulserOn user
|
|
publish PulserOff user
|
|
publish PulserSin user
|
|
publish PulserSquare user
|
|
publish PulserDC user
|
|
publish PulserSquareOffs user
|