Files
sics/site_ansto/instrument/rsd/config/commands/pulser.tcl
Ferdi Franceschini 6cb9be21c1 Ported Andrew Studer's pulser code to kowari for HV control experiments.
r3340 | ffr | 2012-01-16 12:01:32 +1100 (Mon, 16 Jan 2012) | 2 lines
2012-11-15 17:22:46 +11:00

76 lines
1.2 KiB
Tcl

proc PulserOn {} {
pulser send "OUTP ON"
}
proc PulserOff {} {
pulser send "OUTP OFF"
}
proc PulserTTLOn {} {
set resp [pulser send FUNC?]
if {[string first "DC" $resp ] == -1 } {
pulser send FUNC DC
}
pulser send VOLT:OFFS 5
PulserOn
}
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?]
if {[string first "DC" $resp ] == -1 } {
pulser send FUNC DC
}
pulser send VOLT:OFFS $Volt
set resp [pulser send FUNC?]
broadcast $resp
}
publish PulserOn user
publish PulserOff user
publish PulserSin user
publish PulserSquare user
publish PulserDC user
publish PulserSquareOffs user
publish PulserTTLOn user