Table of Contents
SLICE-DHV Serial API
Useful Links
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 touchscreencan 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
#VERSION?
Arguments: None
Example:
#VERSION? 1.62
I2C Command Number:
Description
Returns firmware version of System Controller.Reset System to Factory default: _FACTORY
_FACTORY
Arguments:
[Int] SLOT_NUMBER
Example:
_FACTORY 1
I2C Command Number:
Description
Restores “Personality Board” to factory default settings. No return value.Power cycle the SLICE unit to complete factory reset. |
Save current configuration in non-volatile memory: SAVE
SAVE
Arguments: None
Example:
SAVE SUCCESS
I2C Command Number:
Description
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 *
*IDN?
Arguments:
No Arguments Taken
Example:
- IDN?
I2C Command Number:
Description
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.
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 SAVE command after parameter changes. |
Query Output Voltage Maximum: VLIM?
VLIM?
Arguments:
No Arguments Taken
Example:
VLIM?
I2C Command Number:
Description
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 VLIM command.
Set Output Voltage Maximum: VLIM
VLIM
Arguments:
[Int] CHANNEL [Float] Vmax
Example:
VLIM 2 123.45 123.45
I2C Command Number:
Description
Sets the maximum output in Volts for CHANNEL.- In the example, the maximum output of CH 2 is set to 123.45 V.
- Returns VLIM?
- Query Vout maximum with the VLIM? command.
Query Operation Mode: CONTROL?
CONTROL?
Arguments:
No Arguments Taken
Example:
CONTROL?
I2C Command Number:
Description
Returns the enumerated modulation mode and status for CHANNEL. Where:- 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 CONTROL command.
—-
Set Operation Mode: CONTROL
CONTROL
Arguments:
[Int] CHANNEL [Int] MODE
Example:
CONTROL 2 2 2
I2C Command Number:
Description
Sets the enumerated modulation mode and status for CHANNEL. Where:- 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 CONTROL?
Query DC Bias: DCBIASV?
DCBIASV?
Arguments:
No Arguments Taken
Example:
DCBIASV?
I2C Command Number:
Description
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 DCBIASV command.
Set DC Bias: DCBIASV
DCBIASV
Arguments:
[Int] CHANNEL [Float] VOLTAGE
Example:
DCBIASV 2 123.45 123.45
I2C Command Number:
Description
Returns 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 DCBIASV? command.
- Query Vout with the OUTVOLT? command.
Query Output Voltage: OUTVOLT?
OUTVOLT?
Arguments:
No Arguments Taken
Example:
OUTVOLT?
I2C Command Number:
Description
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?
RANGEV?
Arguments:
No Arguments Taken
Example:
RANGEV?
I2C Command Number:
Description
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 RANGEV command.
Set Range of Voltage Sweep: RANGEV
RANGEV
Arguments:
[Int] CHANNEL [Float] Range
Example:
RANGEV 1 12.34 12.34
I2C Command Number:
Description
Sets Range of the Sweep in Volts for CHANNEL.- Returns 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 RANGEV? command.
Query Repetition Rate of Voltage Sweep: SWEEPRT?
SWEEPRT?
Arguments:
No Arguments Taken
Example:
SWEEPRT?
I2C Command Number:
Description
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 SWEEPRT command.
Set Repetition Rate of Voltage Sweep: SWEEPRT
SWEEPRT
Arguments:
[Int] CHANNEL [Float] Rep_Rate
Example:
SWEEPRT 1 12.34 12.34
I2C Command Number:
Description
Sets CHANNEL Sweep Repetition Rate to Rep_Rate (in Hertz).- Returns 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 SWEEPRT? command
Query Sweep Mode: SWEEPMD?
SWEEPMD?
Arguments:
No Arguments Taken
Example:
SWEEPMD?
I2C Command Number:
Description
Returns the enumerated Current Sweep Mode for CHANNEL.- In the example, CH 1 is seen to be in TUNE Mode.
- To set Sweep Mode use SWEEPMD command.
—-
Set Sweep Mode: SWEEPMD
SWEEPMD
Arguments:
[Int] CHANNEL [Int] Mode
Example:
SWEEPMD 1 0 0
I2C Command Number:
Description
Returns SWEEPMD? for CHANNEL.- In the example, CH 1 Sweep Mode is set to OFF.
- To query Sweep Mode use SWEEPMD? command.
Query Repetition Rate of Voltage Sweep: SWEEPRT?
SWEEPRT?
Arguments:
No Arguments Taken
Example:
SWEEPRT?
I2C Command Number:
Description
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 SWEEPRT command.
Set Repetition Rate of Voltage Sweep: SWEEPRT
SWEEPRT
Arguments:
[Int] CHANNEL [Float] Rep_Rate
Example:
SWEEPRT 1 12.34 12.34
I2C Command Number:
Description
Sets CHANNEL Sweep Repetition Rate to Rep_Rate (in Hertz).- Returns 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 SWEEPRT? command
Query Sweep Mode: SWEEPMD?
SWEEPMD?
Arguments:
No Arguments Taken
Example:
SWEEPMD?
I2C Command Number:
Description
Returns the enumerated Current Sweep Mode for CHANNEL.- In the example, CH 1 is seen to be in TUNE Mode.
- To set Sweep Mode use SWEEPMD command.
—-
Set Sweep Mode: SWEEPMD
SWEEPMD
Arguments:
[Int] CHANNEL [Int] Mode
Example:
SWEEPMD 1 0 0
I2C Command Number:
Description
Returns SWEEPMD? for CHANNEL.- In the example, CH 1 Sweep Mode is set to OFF.
- To query Sweep Mode use SWEEPMD? command.
Query Error Code: ERROR?
ERROR?
Arguments:
No Arguments Taken
Example:
ERROR?
I2C Command Number:
Description
Returns the Error Code for CHANNEL.- In the example, CH 1 did not detect an Error.
- To clear an Error Code, use ERROR command.
Clear Error Code: Error
ERROR
Arguments:
[Int] CHANNEL [Int] Code
Example:
ERROR 1 49152 49152
I2C Command Number:
Description
Returns ERROR? for CHANNEL.- In the example, the “no error detected” code is cleared for CH 1.
- To query Error Code, use ERROR? command.
Query Response to Trigger In: TRIGIN?
TRIGIN?
Arguments:
No Arguments Taken
Example:
TRIGIN?
I2C Command Number:
Description
Returns the effect of Trigger In signal on CHANNEL as seen in table 9.- In the example, CH 1 will respond to a Trigger In signal.
- To set the response to a Trigger In signal, use TRIGIN
Set Response to Trigger In: TRIGIN
TRIGIN
Arguments:
[Int] CHANNEL [Int] Selection
Example:
TRIGIN 1 1 1
I2C Command Number:
Description
Returns TRIGIN? for CHANNEL.- In the example, CHANNEL 1 will henceforth respond to Trigger In.
- To query response to trigger input, use TRIGIN? command.
Query Trigger Out Meaning: TRIGOUT?
TRIGOUT?
Arguments:
No Arguments Taken
Example:
TRIGOUT?
I2C Command Number:
Description
Returns the meaning of the Trigger Out signal with respect to CHANNEL as seen in table 11.- 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 TRIGOUT
Set Trigger Out: TRIGOUT
TRIGOUT
Arguments:
[Int] CHANNEL [Int] Selection
Example:
TRIGOUT 1 1 1
I2C Command Number:
Description
Returns TRIGOUT? for CHANNEL.- In the example, Trigger Out will go high in sync with ramp on CH 1
- To query Trigger Out meaning, use 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?
MODEA?
Arguments:
No Arguments Taken
Example:
MODEA?
I2C Command Number:
Description
Returns from where CH 1 receives modulation control as seen in table 13.- 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 MODEA
- Only one modulation source may be active at a time
Set Source of Modulation Signal for CH 1: MODEA
MODEA
Arguments:
[Int] MODE
Example:
MODEA 1 257
I2C Command Number:
Description
Returns MODEA?- 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 MODEA? command
Query Source of Modulation Signal for CH 2: MODEB?
MODEB?
Arguments:
No Arguments Taken
Example:
MODEB?
I2C Command Number:
Description
Returns from where CH 2 receives modulation control as seen in table 15.- 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 MODEB
- Only one modulation source may be active at a time
Set Source of Modulation Signal for CH 2: MODEB
MODEB
Arguments:
[Int] MODE
Example:
MODEB 1 513
I2C Command Number:
Description
Returns MODEB?- 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 MODEB? command
Query Signal Delivered to Front-Panel Output 1: MODE1?
MODE1?
Arguments:
No Arguments Taken
Example:
MODE1?
I2C Command Number:
Description
Returns identity of signal delivered to front-panel Output 1 according to table 17.- 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 MODE1
Set Signal Delivered to Front-Panel Output 1: MODE1
MODE1
Arguments:
[Int] Mode
Example:
MODE1 1 257
I2C Command Number:
Description
Returns MODE1?- 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 MODE1? command
Query Signal Delivered to Front-Panel Output 2: MODE2?
MODE2?
Arguments:
No Arguments Taken
Example:
MODE2?
I2C Command Number:
Description
Returns identity of signal delivered to front-panel Output 2 according to table 19.- 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 MODE2
Set Signal Delivered to Front-Panel Output 2: MODE2
MODE2
Arguments:
[Int] Mode
Example:
MODE2 1 513
I2C Command Number:
Description
Returns MODE2?- 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 MODE2? command