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
Replace [asterisk] with a *
*IDN?
Arguments:
No Arguments Taken
Example:
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.
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.
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:
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 |
Tab. 1: Possible return values & meaning for CHANNEL? command
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:
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 |
Tab. 1: Possible return values & meaning for CHANNEL? command
Query DC Bias: DCBIASV?
DCBIASV?
Arguments:
No Arguments Taken
Example:
DCBIASV?
I2C Command Number:
Description
Returns V
bias 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 V
bias 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 Output Voltage: OUTVOLT?
OUTVOLT?
Arguments:
No Arguments Taken
Example:
OUTVOLT?
I2C Command Number:
Description
Returns V
out 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.
-
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.
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).
-
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.
Response | Sweep Mode Status |
0 | OFF |
1 | ON |
2 | Sweep Tune |
Tab. 3: Possible return values & meaning for 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.
Response | Sweep Status |
0 | OFF |
1 | ON |
2 | Sweep Tune |
Tab. 4: Possible input values & meaning for 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.
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).
-
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.
Response | Sweep Mode Status |
0 | OFF |
1 | ON |
2 | Sweep Tune |
Tab. 3: Possible return values & meaning for 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.
Response | Sweep Status |
0 | OFF |
1 | ON |
2 | Sweep Tune |
Tab. 4: Possible input values & meaning for SWEEPMD command
Query Error Code: ERROR?
ERROR?
Arguments:
No Arguments Taken
Example:
ERROR?
I2C Command Number:
Description
Returns the Error Code for CHANNEL.
Response | Meaning |
49152 | No Error |
Other Error Codes | TBD |
Tab. 7: Possible return values & meaning for 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.
Input | Error Cleared |
49152 | No error detected |
TBD | Other errors |
Tab. 8
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.
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 |
Tab. 9: Possible return values & meaning for TRIGIN? command
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.
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 |
Tab. 10
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.
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 |
Tab. 11: Possible return values & meaning for TTL high at the Trigger Out
Set Trigger Out: TRIGOUT
TRIGOUT
Arguments:
[Int] CHANNEL
[Int] Selection
Example:
TRIGOUT 1 1
1
I2C Command Number:
Description
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 |
Tab. 12
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.
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 |
Tab. 13: Possible return values & meaning MODEA? command
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?
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 |
Tab. 14
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.
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 |
Tab. 15: Possible return values & meaning MODEB? command
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?
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 |
Tab. 16
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.
Response | Meaning |
0 | Front-panel Output 1 has no signal |
257 | Front-panel Output 1 monitors CH 1 HV output |
Tab. 17: Possible return values & meaning MODE1? command
Set Signal Delivered to Front-Panel Output 1: MODE1
MODE1
Arguments:
[Int] Mode
Example:
MODE1 1
257
I2C Command Number:
Description
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 |
Tab. 18
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.
Response | Meaning |
0 | Front-panel Output 2 has no signal |
513 | Front-panel Output 2 monitors CH 2 HV output |
Tab. 19: Possible return values & meaning MODE2? command
Set Signal Delivered to Front-Panel Output 2: MODE2
MODE2
Arguments:
[Int] Mode
Example:
MODE2 1
513
I2C Command Number:
Description
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 |
Tab. 20