Merged in-situ changes from Echidna
r3252 | ffr | 2011-09-23 14:21:09 +1000 (Fri, 23 Sep 2011) | 2 lines
This commit is contained in:
committed by
Douglas Clowes
parent
d778dd2bfe
commit
d416695b4b
60
site_ansto/instrument/hrpd/config/commands/pulser.tcl
Normal file
60
site_ansto/instrument/hrpd/config/commands/pulser.tcl
Normal file
@@ -0,0 +1,60 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user