User Tools

Site Tools


slice:dcc:api

SLICE-DCC API

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:

  1. Syntax is insensitive to case.
  2. A message is an ASCII string composed of a command followed by zero or more arguments.
  3. A command and its arguments are delimited by spaces.
  4. Messages are terminated by a carriage return (“\r”).
  5. All valid messages return an ASCII string value.
  6. [Int] refers to an integer argument that has no decimal point.
  7. [Float] refers to a floating point argument that has a decimal point in its value.
  8. 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

  1. Valid values for the CHANNEL argument are {1, 2}.
  2. All enable commands use an integer argument to convey the state: 0 = Off, 1 = On.
  3. All currents are set and returned in Amperes [A].

Global SLICE Commands

The following commands are operational on all SLICE products.


#VERSION

Arguments: None

Example:

#VERSION   
1.62

I2C Command Number:


Description

Returns firmware version of System Controller.


_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

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

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.

CONTROL?

Arguments:

[Int] CHANNEL

Example:

CONTROL? 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


CONTROL

Arguments:

[Int] CHANNEL
[Int] MODE

Example:

CONTROL 1 3 
3

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


CURRSET?

Arguments:

[Int] CHANNEL

Example:

CURRSET? 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


CURRSET

Arguments:

[Int] CHANNEL
[Float] CURRENT

Example:

CURRSET 1 0.288 
0.288000

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.

MAXCURR?

Arguments:

[Int] CHANNEL

Example:

MAXCURR? 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


MAXCURR

Arguments:

[Int] CHANNEL
[Float] CURRENT

Example:

MAXCURR 2 1.3 
1.300000

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.


CURRENT?

Arguments:

[Int] CHANNEL

Example:

CURRENT? 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


PWRSET?

Arguments:

[Int] CHANNEL

Example:

PWRSET? 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}


PWRSET

Arguments:

[Int] CHANNEL
[Float] POWER

Example:

PWRSET 2 314.0 
314.0

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.


POWER?

Arguments:

[Int] CHANNEL

Example:

POWER? 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}


CVOLT?

Arguments:

[Int] CHANNEL

Example:

CVOLT? 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}


GAIN?

Arguments:

[Int] CHANNEL

Example:

GAIN? 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}


GAIN

Arguments:

[Int] CHANNEL
[Float] GAIN

Example:

GAIN 2 -31.41596 
-31.41596

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)


RESPVTY?

Arguments:

[Int] CHANNEL

Example:

RESPVTY? 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}


RESPVTY

Arguments:

[Int] CHANNEL
[Float] RESPONSIVITY

Example:

RESPVTY 1 0.0035 
0.0035

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)


POL?

Arguments:

[Int] CHANNEL

Example:

POL? 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)


POLARITY

Arguments:

[Int] CHANNEL
[Int] POL

Example:

POLARITY 2 1 
ON

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


INTERLK?

Arguments: None

Example:

INTERLK?  
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


AMODSEL?

Arguments:

[Int] CHANNEL

Example:

AMODSEL? 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.

AMODSEL

Arguments:

[Int] CHANNEL
[Int] SOURCE

Example:

AMODSEL 2 1 
1

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

AOUTSEL?

Arguments:

[Int] CHANNEL

Example:

AOUTSEL? 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

AOUTSEL

Arguments:

[Int] CHANNEL
[Int] DESTINATION

Example:

AOUTSEL 1 1 
1

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

TRIGIN?

Arguments:

[Int] CHANNEL

Example:

TRIGIN? 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

TRIGIN

Arguments:

[Int] CHANNEL
[Int] STATUS

Example:

TRIGIN 1 1 
1

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

TRIGOUT?

Arguments:

[Int] CHANNEL

Example:

TRIGOUT? 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

TRIGOUT

Arguments:

[Int] CHANNEL
[Int] STATUS

Example:

TRIGOUT 1 1 
1

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

HWTEMP?

Arguments:

[Int] CHANNEL

Example:

HWTEMP? 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}


PWRMAX?

Arguments: None

Example:

PWRMAX?  
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


ERROR?

Arguments:

[Int] CHANNEL

Example:

ERROR? 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


ERROR

Arguments:

[Int] CHANNEL
[Int] CODE

Example:

ERROR 2 128 
49152

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.

1)
System may not deliver CURRENT Amps due to the high impedance of the specific load or other irregular system configurations.
2) , 4)
Negative currents are not accepted
3)
as defined by MAXCURR and/or SLICE-DCC unit capacity
5) , 7)
as defined by SLICE-DCC unit capacity
6)
CURRENT? may be < CURRSET if, for instance, the load has higher impedance than can be driven by the SLICE-DCC.
slice/dcc/api.txt · Last modified: 2019/12/13 13:38 by Michael Radunsky