proc PulserOn {} { sct_pulser send "OUTP ON;:OUTP?" } proc PulserOff {} { sct_pulser send "OUTP OFF;:OUTP?" } proc PulserTTLOn {} { #NOTE: Setting FUNC DC generates a remote ctrl error if the # burst mode happens to be on # Set 5.2 Volts to get about 5.1. (5 actually gives 4.8) sct_pulser send "BURS:STAT OFF;:FUNC DC;:VOLT:OFFS 5.2; OFFS?" PulserOn } proc PulserSin {Freq Volt} { set resp [sct_pulser transact FUNC?] if {[string first "SIN" $resp ] == -1 } { sct_pulser send "FUNC SIN;:FUNC?" } sct_pulser send "VOLT $Volt;:VOLT?" sct_pulser send "FREQ $Freq;:FREQ?" sct_pulser send "VOLT:OFFS 0; OFFS?" } proc PulserSquare {Freq Volt} { set resp [sct_pulser transact FUNC?] if {[string first "SQU" $resp ] == -1 } { sct_pulser send "FUNC SQU;:FUNC?" } sct_pulser send "VOLT $Volt;:VOLT?" sct_pulser send "FREQ $Freq;:FREQ?" sct_pulser send "VOLT:OFFS 0; OFFS?" } proc PulserSquareOffs {Freq Volt Offs} { set resp [sct_pulser transact FUNC?] if {[string first "SQU" $resp ] == -1 } { sct_pulser send "FUNC SQU;:FUNC?" } sct_pulser send "VOLT $Volt;:VOLT?" sct_pulser send "FREQ $Freq;:FREQ?" sct_pulser send "VOLT:OFFS $Offs; OFFS?" } proc PulserDC {Volt} { #NOTE: Setting FUNC DC generates a remote ctrl error if the # burst mode happens to be on set resp [sct_pulser transact "BURS:STAT OFF;:FUNC DC;:VOLT:OFFS $Volt; OFFS?"] broadcast $resp } publish PulserOn user publish PulserOff user publish PulserSin user publish PulserSquare user publish PulserDC user publish PulserSquareOffs user publish PulserTTLOn user