===== SLICE-DHV Serial API ===== ==== Useful Links ==== /* * **Quick-Start Guides** * [[slice:quick_start_dhv|SLICE-DHV Quick Start]] */ * [[https://www.vescent.com/products/electronics/slice/slice-hva-high-voltage-amplifier//|SLICE-DHV web page]] * [[slice:dhv|SLICE-DHV Manual]] * [[https://github.com/Vescent|SLICE-DHV firmware upgrade instructions]] * [[https://github.com/Vescent/|Github page for SLICE-DHV firmware revisions]] /* [[https://github.com/Vescent|Github page for SLICE-DHV GUI]] */ =====Implementation Instructions===== Listed below is the command set for the Application Programming Interface (API) for the SLICE-DHV. All operations that can be performed via the touchscreen /* or PC-resident GUI */can be also be performed via the API. Computer communication to the SLICE instrument occurs by first establishing a Serial COM port via the USB 2.0 physical interface. Computer communication should be platform independent, though appropriate USB drivers may have to be installed. The following table shows the serial port settings: ^ Baud Rate | 9600 | ^ Data Bits | 8 | ^ Parity | None | ^ Stop Bits | 1 | ^ Flow Control | None | To perform an operation, an ASCII-based text message is first constructed from a command and its arguments, and then the message is transmitted to the SLICE instrument through the COM port. The following rules apply: - Syntax is //insensitive// to case. - A message is an ASCII string composed of a command followed by zero or more arguments. - A command and its arguments are delimited by spaces. - Messages are terminated by a carriage return ("\r"). - All valid messages return an ASCII string value. - [Int] refers to an integer argument that has no decimal point. - [Float] refers to a floating point argument that has a decimal point in its value. Changes effected by issuing a serial command from this API are not permanently stored in non-volatile memory until you issue a SAVE command. Configuration changes without the SAVE command will be lost with power cycling. The Save command stores the entire configuration and so several configuration changes can be implemented and then a single SAVE command could be issued. ===== SLICE-DHV Specific Notes ===== - Valid values for the CHANNEL argument are {1, 2}. - All enable commands use an integer argument to convey the state: 0 = Off, 1 = On. - All voltages are set and returned in Volts [V]. ---- ===== Global SLICE Commands ===== The following commands are operational on all SLICE products. ---- ==== Obtain System Controller firmware version: #VERSION ==== Returns firmware version of System Controller. /*Note: For the Return Question mark, we had to use a slightly different question mark image. This one: ?. Rather than this one: ?. */ ---- ==== Reset System to Factory default: _FACTORY ==== Restores "Personality Board" to factory default settings. No return value. \\ | {{ :take-note.png?80&nolink }} | Power cycle the SLICE unit to complete factory reset. | ---- ==== Save current configuration in non-volatile memory: SAVE ==== Saves "Personality Board" settings into EEPROM. Unsaved changes will be lost if board is powered off without issuing a SAVE command. The SAVE command saves the entire configuration into non-volatile memory. A single SAVE command can be issued after any number of configuration changes. When changes are made to the SLICE configuration through the touch screen, the new values are automatically saved and it is not necessary to issue a SAVE command.\\ \\ __Slot Number__\\ * 1 = first slot * 2 = second slot __Possible Responses__\\ * SUCCESS * FAIL ---- ==== SCPI device information: *IDN? ==== Replace [asterisk] with a * Returns SCPI device information. Running System Controller firmware version 1.74 and DHV firmware version 1.18. ---- ===== SLICE-DHV-specific Commands ===== The following commands are specific to the SLICE-DHV high-voltage amplifier.\\ | {{ :take-note.png?350&nolink }} | Changes to operation parameters executed by these commands are stored only in RAM. If you wish to permanently save new parameter values, you must execute a [[slice:dhv:api#global_slice_commands|SAVE command]] after parameter changes. | ==== Query Output Voltage Maximum: VLIM? ==== Returns maximum output in Volts for CHANNEL. * In the example, CH 2 is seen to have a maximum of 123.45 V. * Set Vout maximum with the [[slice:dhv:api#set_Output_Voltage_Maximum:_VLIM|VLIM]] command. ---- ==== Set Output Voltage Maximum: VLIM ==== Sets the maximum output in Volts for CHANNEL. * In the example, the maximum output of CH 2 is set to 123.45 V. * Returns [[slice:dhv:api#query_Output_Voltage_Maximum:_VLIM?|VLIM?]] * Query Vout maximum with the [[slice:dhv:api#query_Output_Voltage_Maximum:_VLIM?|VLIM?]] command. ---- ==== Query Operation Mode: CONTROL? ==== Returns the enumerated modulation mode and status for CHANNEL. Where: \\ ^ Response ^ Gain ^ Range ^ Operation Status ^ | 0 | 1 V/V | ±10 V | OFF | | 1 | 20 V/V | 0-200 V | OFF | | 2 | 1 V/V | ±10 V | ON | | 3 | 20 V/V | 0-200 V | ON | * In the example, CH 1 is found to have Gain = 1 V/V, allowing control over the range of Vout = Vbias ± 10 V, with the voltage output turned off. * Set these parameters with the [[slice:dhv:api#set_operation_mode:_CONTROL|CONTROL]] command. ---- ==== Set Operation Mode: CONTROL ==== Sets the enumerated modulation mode and status for CHANNEL. Where: \\ ^ MODE Input ^ Gain ^ Range ^ Operation Status ^ | 0 | 1 V/V | ±10 V | OFF | | 1 | 20 V/V | 0-200 V | OFF | | 2 | 1 V/V | ±10 V | ON | | 3 | 20 V/V | 0-200 V | ON | * In the example, CH 2 is set to Mode 2 (Gain = 1 V/V, with control over the range Vout = Vbias ± 10 V). The output of CH 2 is turned ON. * Returns value of [[slice:dhv:api#query_operation_mode:_CONTROL?|CONTROL?]] ---- ==== Query DC Bias: DCBIASV? ==== Returns Vbias in Volts for CHANNEL. * In the example, CH 2 has Vbias = 123.456 V. * If the CHANNEL is turned OFF, the returned value will be Vbias, but Vout will remain at 0 V. * Set Vbias with the [[slice:dhv:api#set_DC_Bias:_DCBIASV|DCBIASV]] command. ---- ==== Set DC Bias: DCBIASV ==== Returns [[slice:dhv:api#query_DC_Bias:_DCBIASV?|DCBIASV?]] \\ * In the example, CH 2 Vbias is set to 123.45 V. \\ * If the CHANNEL is turned OFF, Vbias will be set to the input value, but Vout will remain at 0 V until the CHANNEL is turned ON. \\ * If a value that is negative or above the Voltage Limit (see below) is attempted, the value will be set to the exceeded boundary. \\ * Query Vbias with the [[slice:dhv:api#query_DC_Bias:_DCBIASV?|DCBIASV?]] command. * Query Vout with the [[slice:dhv:api#query_Output_Voltage:_OUTVOLT?|OUTVOLT?]] command. ---- ==== Query Output Voltage: OUTVOLT? ==== Returns Vout for CHANNEL. * In the example, CH 2 reports Vout = 123.456789 V. * The user can only directly set Vbias, not Vout. ---- ==== Query Range of Voltage Sweep: RANGEV? ==== Returns Range of the Sweep in Volts for CHANNEL. * In the example, CH 2 is seen to have a Sweep Range of 12.34 V. * Vout sweeps from (Vbias - Range/2) to (Vbias + Range/2) in a sawtooth waveform. * If the CHANNEL is turned OFF, the returned value will be the Range over which Vout will sweep when the CHANNEL is turned ON, but Vout will remain at 0 V. * Set Range with the [[slice:dhv:api#set_Range_of_Voltage_Sweep:_RANGEV|RANGEV]] command. ---- ==== Set Range of Voltage Sweep: RANGEV ==== Sets Range of the Sweep in Volts for CHANNEL. * Returns [[slice:dhv:api#Query_Range_of_Voltage_Sweep:_RANGEV?|RANGEV?]] * In the example, the Range of the Sweep for CH 1 is set to 12.34 V. * Vout sweeps from (Vbias - Range/2) to (Vbias + Range/2) in a sawtooth waveform. * If the CHANNEL is turned OFF, the value will be the Range over which Vout will sweep when the CHANNEL is turned ON, but Vout will remain at 0 V. * Query Range with the [[slice:dhv:api#Query_Range_of_Voltage_Sweep:_RANGEV?|RANGEV?]] command. ---- ==== Query Repetition Rate of Voltage Sweep: SWEEPRT? ==== Returns Repetition Rate of the Sweep in Hertz for CHANNEL. * In the example, CH 2 is seen to have a Sweep Repetition Rate of 12.34 Hz. * Set Sweep repetition rate with the [[slice:dhv:api#Set_Repetition_Rate_of_Voltage_Sweep:_SWEEPRT|SWEEPRT]] command. ---- ==== Set Repetition Rate of Voltage Sweep: SWEEPRT ==== Sets CHANNEL Sweep Repetition Rate to Rep_Rate (in Hertz). * Returns [[slice:dhv:api#Query_Repetition_Rate_of_Voltage_Sweep:_SWEEPRT?|SWEEPRT?]] * In the example, the Repetition Rate of the Sweep for CH 1 is set to 12.34 Hz * Valid Repetition Rate Range: 0-30 Hz * Query Sweep repetition rate with the [[slice:dhv:api#Query_Repetition_Rate_of_Voltage_Sweep:_SWEEPRT?|SWEEPRT?]] command ---- ==== Query Sweep Mode: SWEEPMD? ==== Returns the enumerated Current Sweep Mode for CHANNEL. ^ Response ^ Sweep Mode Status ^ | 0 | OFF | | 1 | ON | | 2 | Sweep Tune | * In the example, CH 1 is seen to be in TUNE Mode. * To set Sweep Mode use [[slice:dhv:api#Set_Sweep_Mode:_SWEEPMD|SWEEPMD]] command. ---- ==== Set Sweep Mode: SWEEPMD ==== Returns SWEEPMD? for CHANNEL. ^ Response ^ Sweep Status ^ | 0 | OFF | | 1 | ON | | 2 | Sweep Tune | * In the example, CH 1 Sweep Mode is set to OFF. * To query Sweep Mode use [[slice:dhv:api#Query_Sweep_Mode:_SWEEPMD?|SWEEPMD?]] command. ---- ==== Query Repetition Rate of Voltage Sweep: SWEEPRT? ==== Returns Repetition Rate of the Sweep in Hertz for CHANNEL. * In the example, CH 2 is seen to have a Sweep Repetition Rate of 12.34 Hz. * Set Sweep repetition rate with the [[slice:dhv:api#Set_Repetition_Rate_of_Voltage_Sweep:_SWEEPRT|SWEEPRT]] command. ---- ==== Set Repetition Rate of Voltage Sweep: SWEEPRT ==== Sets CHANNEL Sweep Repetition Rate to Rep_Rate (in Hertz). * Returns [[slice:dhv:api#Query_Repetition_Rate_of_Voltage_Sweep:_SWEEPRT?|SWEEPRT?]] * In the example, the Repetition Rate of the Sweep for CH 1 is set to 12.34 Hz * Valid Repetition Rate Range: 0-30 Hz * Query Sweep repetition rate with the [[slice:dhv:api#Query_Repetition_Rate_of_Voltage_Sweep:_SWEEPRT?|SWEEPRT?]] command ---- ==== Query Sweep Mode: SWEEPMD? ==== Returns the enumerated Current Sweep Mode for CHANNEL. ^ Response ^ Sweep Mode Status ^ | 0 | OFF | | 1 | ON | | 2 | Sweep Tune | * In the example, CH 1 is seen to be in TUNE Mode. * To set Sweep Mode use [[slice:dhv:api#Set_Sweep_Mode:_SWEEPMD|SWEEPMD]] command. ---- ==== Set Sweep Mode: SWEEPMD ==== Returns SWEEPMD? for CHANNEL. ^ Response ^ Sweep Status ^ | 0 | OFF | | 1 | ON | | 2 | Sweep Tune | * In the example, CH 1 Sweep Mode is set to OFF. * To query Sweep Mode use [[slice:dhv:api#Query_Sweep_Mode:_SWEEPMD?|SWEEPMD?]] command. ---- ==== Query Error Code: ERROR? ==== Returns the Error Code for CHANNEL. ^ Response ^ Meaning ^ | 49152 | No Error | | Other Error Codes | TBD | * In the example, CH 1 did not detect an Error. * To clear an Error Code, use [[slice:dhv:api#Clear_Error_Code:_ERROR|ERROR]] command. ---- ==== Clear Error Code: Error ==== Returns ERROR? for CHANNEL. ^ Input ^ Error Cleared ^ | 49152 | No error detected | | TBD | Other errors | * In the example, the "no error detected" code is cleared for CH 1. * To query Error Code, use [[slice:dhv:api#Query_Error_Code:_ERROR?|ERROR?]] command. ---- ==== Query Response to Trigger In: TRIGIN? ==== Returns the effect of Trigger In signal on CHANNEL as seen in . ^ Response ^ Meaning ^ | 0 | Trigger In status has no effect on CHANNEL | | 1 | High signal on Trigger In enables CHANNEL. Low signal on Trigger In disables CHANNEL | * In the example, CH 1 will respond to a Trigger In signal. * To set the response to a Trigger In signal, use [[slice:dhv:api#Set_Response_to_Trigger_In:_TRIGIN|TRIGIN]] ---- ==== Set Response to Trigger In: TRIGIN ==== Returns TRIGIN? for CHANNEL. ^ Selection ^ Programmed Response to Trigger In ^ | 0 | CHANNEL will not respond to Trigger In | | 1 | High signal on Trigger In enables CHANNEL. Low signal on Trigger In disables CHANNEL | * In the example, CHANNEL 1 will henceforth respond to Trigger In. * To query response to trigger input, use [[slice:dhv:api#Query_Response_to_Trigger_In:_TRIGIN?|TRIGIN?]] command. ---- ==== Query Trigger Out Meaning: TRIGOUT? ==== Returns the meaning of the Trigger Out signal with respect to CHANNEL as seen in . ^ Response ^ Meaning ^ | 0 | No change in state of the Trigger Out based state of CHANNEL | | 1 | The signal at Trigger Out will go high in sync with the ramp on CHANNEL | * In the example, the signal at Trigger Out will go high in sync with the ramp on CH 1. * To set the meaning of the Trigger Out signal, use [[slice:dhv:api#Set_Trigger_Out:_TRIGOUT|TRIGOUT]] ---- ==== Set Trigger Out: TRIGOUT ==== Returns TRIGOUT? for CHANNEL. ^ Selection ^ Meaning of Trigger Out with respect to CHANNEL ^ | 0 | Trigger out is unresponsive to state of CHANNEL | | 1 | A TTL high signal at Trigger Out will be in sync with ramp of CHANNEL | * In the example, Trigger Out will go high in sync with ramp on CH 1 * To query Trigger Out meaning, use [[slice:dhv:api#Query_Trigger_Out_Meaning:_TRIGOUT?|TRIGOUT?]] command * Setting the Trigger Out to be in sync with CH 1 removes Trigger Out's synchronicity with CH 2 & vice versa ---- ==== Query Source of Modulation Signal for CH 1: MODEA? ==== Returns from where CH 1 receives modulation control as seen in . ^ Response ^ Meaning ^ | 0 | CH 1 accepts its modulation signal from rear-panel SMA connector | | 257 | CH 1 accepts its modulation signal from front-panel Input A BNC connector | * In the example, CH 1 accepts its modulation signal from the front-panel Input A. * To set from where CH 1 accepts a modulation signal, use [[slice:dhv:api#Set_Source_of_Modulation_Signal_for_CH_1:_MODEA|MODEA]] * Only one modulation source may be active at a time ---- ==== Set Source of Modulation Signal for CH 1: MODEA ==== Returns MODEA? ^ Mode ^ Location of modulation input for CH 1 ^ | 0 | CH 1 accepts modulation signal from rear-panel SMA connector | | 1 | CH 1 accepts modulation signal from front-panel Input A BNC connector | * In the example, CH 1 will accept a modulation signal from the front-panel Input A BNC * To query the modulation source for CH 1, use [[slice:dhv:api#Query_Source_of_Modulation_Signal_for_CH_1:_MODEA?|MODEA?]] command ---- ==== Query Source of Modulation Signal for CH 2: MODEB? ==== Returns from where CH 2 receives modulation control as seen in . ^ Response ^ Meaning ^ | 0 | CH 2 accepts its modulation signal from rear-panel SMA connector | | 513 | CH 2 accepts its modulation signal from front-panel Input B BNC connector | * In the example, CH 2 accepts its modulation signal from the front-panel Input B. * To set from where CH B accepts a modulation signal, use [[slice:dhv:api#Set_Source_of_Modulation_Signal_for_CH_2:_MODEB|MODEB]] * Only one modulation source may be active at a time ---- ==== Set Source of Modulation Signal for CH 2: MODEB ==== Returns MODEB? ^ Mode ^ Location of modulation input for CH 2 ^ | 0 | CH 2 accepts modulation signal from rear-panel SMA connector | | 1 | CH 2 accepts modulation signal from front-panel Input B BNC connector | * In the example, CH 2 will henceforth accept a modulation signal from the front-panel Input B BNC * To query the modulation source for CH 2, use [[slice:dhv:api#Query_Source_of_Modulation_Signal_for_CH_2:_MODEB?|MODEB?]] command ---- ==== Query Signal Delivered to Front-Panel Output 1: MODE1? ==== Returns identity of signal delivered to front-panel Output 1 according to . ^ Response ^ Meaning ^ | 0 | Front-panel Output 1 has no signal | | 257 | Front-panel Output 1 monitors CH 1 HV output | * In the example, front-panel output 1 is monitoring CH 1 output * V1 = VCH 1 ÷ 20 * To set what signal is delivered to front-panel Output 1, use [[slice:dhv:api#Set Signal Delivered to Front-Panel Output 1: MODE1|MODE1]] ---- ==== Set Signal Delivered to Front-Panel Output 1: MODE1 ==== Returns MODE1? ^ Mode ^ Result ^ | 0 | Sets signal at front-panel Output 1 to no signal | | 1 | Sets signal at front-panel Output 1 to monitor CH 1 Output | * In the example, front-panel Output 1 will henceforth monitor the CH 1 output * Vout = VCH 1 ÷ 20 * To query the signal delivered to the front-panel Output 1, use [[slice:dhv:api#Query Signal Delivered to Front-Panel Output 1: MODE1?|MODE1?]] command ---- ==== Query Signal Delivered to Front-Panel Output 2: MODE2? ==== Returns identity of signal delivered to front-panel Output 2 according to . ^ Response ^ Meaning ^ | 0 | Front-panel Output 2 has no signal | | 513 | Front-panel Output 2 monitors CH 2 HV output | * In the example, front-panel Output 2 is monitoring CH 2 output * V2 = VCH 2 ÷ 20 * To set what signal is delivered to front-panel Output 2, use [[slice:dhv:api#Set Signal Delivered to Front-Panel Output 2: MODE2|MODE2]] ---- ==== Set Signal Delivered to Front-Panel Output 2: MODE2 ==== Returns MODE2? ^ Mode ^ Result ^ | 0 | Sets signal at front-panel Output 2 to no signal | | 1 | Sets signal at front-panel Output 2 to monitor CH 2 Output | * In the example, front-panel Output 2 will henceforth monitor the CH 2 output * Vout = VCH 2 ÷ 20 * To query the signal delivered to the front-panel Output 2, use [[slice:dhv:api#Query Signal Delivered to Front-Panel Output 2: MODE2?|MODE2?]] command ----