User Tools

Site Tools


slice:dcc:api

This is an old revision of the document!


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


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. The SAVE command saves the entire configuration into non-volatile memory. A single SAVE command can be issued after any number of configuration changes.

Slot Number

  • 1 = first slot
  • 2 = second slot

Possible Responses

  • SUCCESS
  • FAIL

SLICE-DCC-specific Commands


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.


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 of 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 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.000000 dB.

Input range
CHANNEL: {1,2}


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the 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: (TBD)


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}
GAIN: (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}
Response
0 = Positive = OFF
1 = Negative = ON


Error Handling


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.1575681251.txt.gz · Last modified: 2021/08/26 14:26 (external edit)