From 5b48df31bafdfcf7ebc600ef9d2f8914d097d889 Mon Sep 17 00:00:00 2001 From: Douglas Clowes Date: Wed, 25 Jun 2014 16:08:16 +1000 Subject: [PATCH] Merge from Quokka hvcommands.tcl and pulser.tcl --- site_ansto/instrument/config/commands/hvcommands.tcl | 6 +++--- site_ansto/instrument/config/commands/pulser.tcl | 11 ++++++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/site_ansto/instrument/config/commands/hvcommands.tcl b/site_ansto/instrument/config/commands/hvcommands.tcl index d31c64c6..7777e3df 100644 --- a/site_ansto/instrument/config/commands/hvcommands.tcl +++ b/site_ansto/instrument/config/commands/hvcommands.tcl @@ -23,7 +23,7 @@ proc SetVolt {volt} { } proc GetVolt {} { - pulser send VOLT:OFFS? + pulser transact VOLT:OFFS? } proc SingleVolt {volt oscno} { @@ -47,7 +47,7 @@ proc SetDC {} { pulseroff #NOTE: Setting FUNC DC generates a remote ctrl error if the # burst mode happens to be on - set resp [pulser send "BURS:STAT OFF;:FUNC DC;:VOLT:OFFS 0; OFFS?"] + set resp [pulser transact "BURS:STAT OFF;:FUNC DC;:VOLT:OFFS 0; OFFS?"] pulseron } @@ -311,7 +311,7 @@ proc PulserBurst {} { PulserOn pulser send "*TRG;:BURS:NCYC?" while {1} { - set sval [pulser send *OPC?] + set sval [pulser transact *OPC?] if {[string first 1 $sval] >-1} {break} } PulserOff diff --git a/site_ansto/instrument/config/commands/pulser.tcl b/site_ansto/instrument/config/commands/pulser.tcl index 944c6998..c7a51457 100644 --- a/site_ansto/instrument/config/commands/pulser.tcl +++ b/site_ansto/instrument/config/commands/pulser.tcl @@ -11,13 +11,14 @@ proc PulserOff {} { proc PulserTTLOn {} { #NOTE: Setting FUNC DC generates a remote ctrl error if the # burst mode happens to be on - pulser send "BURS:STAT OFF;:FUNC DC;:VOLT:OFFS 5; OFFS?" + # Set 5.2 Volts to get about 5.1. (5 actually gives 4.8) + pulser send "BURS:STAT OFF;:FUNC DC;:VOLT:OFFS 5.2; OFFS?" PulserOn } proc PulserSin {Freq Volt} { - set resp [pulser send FUNC?] + set resp [pulser transact FUNC?] if {[string first "SIN" $resp ] == -1 } { pulser send "FUNC SIN;:FUNC?" } @@ -28,7 +29,7 @@ proc PulserSin {Freq Volt} { } proc PulserSquare {Freq Volt} { - set resp [pulser send FUNC?] + set resp [pulser transact FUNC?] if {[string first "SQU" $resp ] == -1 } { pulser send "FUNC SQU;:FUNC?" } @@ -39,7 +40,7 @@ proc PulserSquare {Freq Volt} { } proc PulserSquareOffs {Freq Volt Offs} { - set resp [pulser send FUNC?] + set resp [pulser transact FUNC?] if {[string first "SQU" $resp ] == -1 } { pulser send "FUNC SQU;:FUNC?" } @@ -53,7 +54,7 @@ proc PulserSquareOffs {Freq Volt Offs} { proc PulserDC {Volt} { #NOTE: Setting FUNC DC generates a remote ctrl error if the # burst mode happens to be on - set resp [pulser send "BURS:STAT OFF;:FUNC DC;:VOLT:OFFS $Volt; OFFS?"] + set resp [pulser transact "BURS:STAT OFF;:FUNC DC;:VOLT:OFFS $Volt; OFFS?"] broadcast $resp }