This is an old revision of the document!
Table of Contents
SLICE-DCC API
Links
* Quick-Start Guides
* Electronics
* Websites
- Github page for SLICE-DCC firmware revisions THIS LINK NEEDS UPDATING!
Implementation Instructions
Listed below is the command set for the Application Programming Interface (API) for the SLICE-DCC. Most 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-DCC 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 currents are set and returned in Amperes [A].
Global SLICE Commands
The following commands are operational on all SLICE products.
Firmware Version
Arguments:
No Arguments Taken
Example:
I2C Command Number:
Description
Returns firmware version of System Controller.
Arguments:
No Arguments Taken
Example:
I2C Command Number:
Description
Restores “Personality Board” to factory default settings. No return value. ![]() | Power cycle the SLICE unit to complete factory reset. |
Arguments:
No Arguments Taken
Example:
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
SLICE-DCC-specific Commands
The following commands are specific to the SLICE-DCC dual current controller.
![]() | 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. |
Arguments:
[Int] CHANNEL
Example:
1 0
I2C Command Number:
Description
Returns the current operating mode for channel CHANNEL. In the example, the status of channel 1 is reported to be Constant Current mode, current off.Channel input range
CHANNEL: {1,2}
Possible system responses
0 = Constant Current mode, OFF
1 = Constant Power mode, OFF
2 = Constant Current mode, ON
3 = Constant Power mode, ON
Arguments:
No Arguments Taken
Example:
I2C Command Number:
Description
Sets the operating mode to MODE for channel CHANNEL. Returns CONTROL? CHANNEL. In the example, channel 1 is set to Constant Power mode, current on.CHANNEL input range
CHANNEL: {1,2}
MODE input range & possible system responses
0 = Constant Current mode, OFF
1 = Constant Power mode, OFF
2 = Constant Current mode, ON
3 = Constant Power mode, ON
Arguments:
[Int] CHANNEL
Example:
1 0.422800
I2C Command Number:
Description
Returns the operating current set point in Amps for channel CHANNEL. In the example, channel 1 current is set to 0.422800 A.CHANNEL input range
CHANNEL: {1,2}
System response
Current set point of channel CHANNEL in AMPS
Arguments:
No Arguments Taken
Example:
I2C Command Number:
Description
Sets the set point operating current to CURRENT in Amps for channel CHANNEL. Returns CURRENT? CHANNEL. In the example, the current for channel 1 is set to 0.288 A.1)Input parameter ranges
CHANNEL: {1,2}
CURRENT: (02) to Max Current3))
Possible system responses
Requested current in Amps or closest value as bounded by unit capacity.
![]() | CURRSET does not turn on or off the current. It only changes the set point value. Use a CONTROL command to change the operation mode. |
Arguments:
[Int] CHANNEL
Example:
2 1.435300
I2C Command Number:
Description
Returns user-set maximum current in Amps for channel CHANNEL. In the example, the maximum current supplied by channel 2 has been set to 1.435300 A.Input range
CHANNEL: {1,2}
System response
Maximum allowed current of channel CHANNEL in AMPS
Arguments:
No Arguments Taken
Example:
I2C Command Number:
Description
Sets the maximum allowed current to CURRENT in Amps for channel CHANNEL. Returns MAXCURR? CHANNEL. In the example, the maximum allowed current for channel 2 is set to 1.3 A.Input parameter ranges
CHANNEL: {1,2}
CURRENT: (04) to Max Current5))
Possible system responses
Requested current maximum in Amps or closest value as bounded by unit capacity.
Arguments:
[Int] CHANNEL
Example:
1 271.8
I2C Command Number:
Description
Returns measured current in milliamps for channel CHANNEL. In the example, the measured current of channel 1 is 100e mA.6)Input range
CHANNEL: {1,2}
System response
Measured current being delivered by channel CHANNEL in milliamps
Arguments:
[Int] CHANNEL
Example:
1 314.0
I2C Command Number:
Description
Returns the Constant Power Mode power set point for channel CHANNEL. In the example, the power set point of channel 1 is 314.0 mW.Input range
CHANNEL: {1,2}
Arguments:
No Arguments Taken
Example:
I2C Command Number:
Description
Sets the set point power level in milliwatts to which the Constant Power Mode will attempt to servo for channel CHANNEL. Returns PWRSET? CHANNEL. In the example, the set point power for channel 2 is set to 314.0 mW.Input parameter ranges
CHANNEL: {1,2}
PWRSET: (0 to TBD)7))
Possible system responses
Requested power set point or closest value as bounded by unit capacity.
Arguments:
[Int] CHANNEL
Example:
1 314.0
I2C Command Number:
Description
Returns the measured power for channel CHANNEL in milliwatts. In the example, the power measured at channel 1 is 314.0 mW.Input range
CHANNEL: {1,2}
Arguments:
[Int] CHANNEL
Example:
1 3.345
I2C Command Number:
Description
Returns the measured compliance voltage across channel CHANNEL in volts. In the example, the voltage drop across channel 1 is 3.345 V.Input range
CHANNEL: {1,2}
Arguments:
[Int] CHANNEL
Example:
1 30.000000
I2C Command Number:
Description
Returns the Integral Gain of the Constant Power feedback loop for channel CHANNEL in dB. In the example, the Gain for Constant Power mode feedback for channel 1 is +30.000 000 dB. The default value of the Gain is +30.000 000 dB.Input range
CHANNEL: {1,2}
Arguments:
No Arguments Taken
Example:
I2C Command Number:
Description
Sets the Integral Gain of the Constant Power feedback loop for channel CHANNEL. Returns GAIN? CHANNEL. In the example, the Gain of the Constant Power feedback loop is set to -31.41596 dB.Input parameter ranges
CHANNEL: {1,2}
GAIN: (-100 to +100)
Arguments:
[Int] CHANNEL
Example:
1 0.0035
I2C Command Number:
Description
Returns the Constant Power mode external (customer-supplied) detector responsivity in Amps per Watt for channel CHANNEL. In the example, the responsivity of the detector for channel 1 is 0.0035 A/W.Input range
CHANNEL: {1,2}
Arguments:
No Arguments Taken
Example:
I2C Command Number:
Description
Sets the Constant Power mode external (customer-supplied) detector responsivity in Amps per Watt for channel CHANNEL. Returns RESPVTY? CHANNEL. In the example, the responsivity of the detector for channel 1 is set to 0.0035 A/W.Input parameter ranges
CHANNEL: {1,2}
RESPONSIVITY: (TBD)
Arguments:
[Int] CHANNEL
Example:
1 OFF
I2C Command Number:
Description
Returns the Constant Power mode Optical Power polarity setting of the input transimpedance amplifier for channel CHANNEL. In the example, the optical power polarity for the channel 1 transimpedance amplifier is positive (default).Input range
CHANNEL: {1,2}
Possibe Responses
ON = Negative Polarity
OFF = Positive Polarity (default)
Arguments:
No Arguments Taken
Example:
I2C Command Number:
Description
Sets the Polarity of the input transimpedance amplifier for Constant Power Mode for channel CHANNEL. Returns POL? CHANNEL. In the example, the polarity of the transimpedance amplifier for channel 2 is set to Negative (ON).Input parameter ranges
CHANNEL: {1,2}
POL: {0,1}
Possible Responses
0 = Positive = OFF
1 = Negative = ON
Arguments: None
Example:
ON
I2C Command Number:
Description
Returns the status of the interlock. In the example, the interlock is closed and the system is operational.Possible Responses
ON = Interlock circuit is closed and unit is operational
OFF = Interlock circuit is open and the unit is disabled
Arguments:
[Int] CHANNEL
Example:
1 1
I2C Command Number:
Description
Returns the analog modulation source for channel CHANNEL. In the example, the modulation source for channel 1 is the front-panel input (labeled A).Return Values
0 = Modulation input is the SMA connector labeled Mod In on the back of the unit for the respective channel (default).
1 = Modulation input is the front panel Input BNC
When using the front-panel input:
- Channel 1 uses input A
- Channel 2 uses input B
![]() | Only one modulation input can be active at any given time. |
Arguments:
No Arguments Taken
Example:
I2C Command Number:
Description
Sets the modulation input source for channel CHANNEL. Returns AMODSEL? CHANNEL. In the example, the modulation input source for channel 2 is set to the front-panel BNC (input B).Input parameter ranges
CHANNEL: {1,2}
SOURCE: {0,1}
0 = Modulation input is the SMA connector labeled Mod In on the back of the unit for the respective channel (default).
1 = Modulation input is the front panel Input BNC
When using the front-panel input:
- Channel 1 uses input A
- Channel 2 uses input B
Arguments:
[Int] CHANNEL
Example:
1 1
I2C Command Number:
Description
Returns the location to which the measured power of the monitor photodiode is delivered for channel CHANNEL TRANSFER FUNCTION?. In the example, the measured power of the monitor photodiode for channel 1 is delivered to the front-panel output (output 1).Return Values
0 = The measured power of the monitor photodiode is not delivered to any output port
1 = The measured power of the monitor photodiode is delivered to front-panel output BNC
2 = Optical Power on Analog Output Optical Power from Optical Power input SMA connector on back panel NEEDS CLARIFICATION
When using the front-panel output:
- Channel 1 uses input 1
- Channel 2 uses input 2
Arguments:
No Arguments Taken
Example:
I2C Command Number:
Description
Sets the location to which the measured power of the monitor photodiode is delivered for channel CHANNEL TRANSFER FUNCTION?. Returns AOUTSEL? CHANNEL. In the example, the measured power of the monitor photodiode for channel 1 is directed to be delivered to the front-panel output (output 1).Input parameter ranges
CHANNEL: {1,2}
DESTINATION: {0,1,2}
0 = The measured power of the monitor photodiode is not delivered to any output port
1 = The measured power of the monitor photodiode is delivered to front-panel output BNC
2 = Optical Power on Analog Output Optical Power from Optical Power input SMA connector on back panel NEEDS CLARIFICATION
When using the front-panel output:
- Channel 1 uses output 1
- Channel 2 uses output 2
Arguments:
[Int] CHANNEL
Example:
1 1
I2C Command Number:
Description
Returns the effect of the input trigger on channel CHANNEL. In the example, the input trigger controls the operation of channel 1.Return Values
0 = Trigger input disabled
1 = Trigger input controls operation
- Trigger input high enables channel
- Trigger input low disables channel
![]() | The trigger function can operate on both channels, a single channel, or neither channel |
Arguments:
No Arguments Taken
Example:
I2C Command Number:
Description
Sets the effect of the input trigger on channel CHANNEL. Returns TRIGIN? CHANNEL. In the example, the input trigger is given control over channel 1.Input parameter ranges
CHANNEL: {1,2}
STATUS: {0,1}
0 = Trigger input disabled
1 = Trigger input controls operation
- Trigger input high enables channel
- Trigger input low disables channel
Arguments:
[Int] CHANNEL
Example:
1 1
I2C Command Number:
Description
Returns the response of the output trigger to the status of the interlock. In the example, the output trigger will echo the interlock circuit status.Input parameter ranges
CHANNEL: {1,2}
Return Values
0 = Trigger output does not respond to interlock status
1 = Trigger output echoes interlock status
- Trigger output high: interlock is open
- Trigger output low: interlock is closed
Arguments:
No Arguments Taken
Example:
I2C Command Number:
Description
Sets the response of the output trigger to the interlock status. Returns TRIGOUT? CHANNEL. In the example, the output trigger is directed to echo the status the interlock circuit.Input parameter ranges
CHANNEL: {1,2}
STATUS: {0,1}
0 = Trigger output does not respond to interlock status
1 = Trigger output echoes interlock status
- Trigger output high: interlock open
- Trigger output low: interlock closed
Arguments:
[Int] CHANNEL
Example:
1 43.358
I2C Command Number:
Description
Returns the temperature of the SLICE-DCC “personality board” at the sensor point for channel CHANNEL. In the example, the temperature at the sensor point for channel 1 is 43.358°C.Input parameter ranges
CHANNEL: {1,2}
Arguments: None
Example:
41.5
I2C Command Number:
Description
Returns the maximum power (in Watts) available as configured. In the example, the power available is 41.5 W.Input parameter ranges
CHANNEL: {1,2}
Possible output values
Power: (0 to 42.5 W)
Error Handling
Arguments:
[Int] CHANNEL
Example:
2 49152
I2C Command Number:
Description
Returns the error code for channel CHANNEL. In the example, the error code for channel 2 is 49152 (No errors).Possible Responses
49152 = No errors
49153 = Open circuit/over voltage (posible disconnected load)
49184 = Hardware Temperature Limit Exceeded
49280 = Interlock Circuit Open
49408 = Device total power limit exceeded
Arguments:
No Arguments Taken
Example:
I2C Command Number:
Description
Clears an error code for channel CHANNEL. Returns post-command ERROR? CHANNEL. In the example, error code 49280 (interlock circuit open) is cleared.Input parameter ranges
CHANNEL: {1,2}
CODE: {1,32,128,256}
1 Clears error code 49153 (open circuit)
32 Clears error code 49184 (hardware temperature limit)
128 Clears error code 49280 (interlock open)
256 Clears error code 49408 (power limit exceeded)
Returns
Error code resulting from clearing the error
Note: use this command to clear an error code obtained from the ERROR? command. This command will not clear an error message on the SLICE-DCC touch screen.