User Tools

Site Tools


slice:qt:api

This is an old revision of the document!


SLICE-QT API

Implementation Instructions

Listed below is the command set for the Application Programming Interface (API). Most operations that can be performed via the touchscreen 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.

SLICE-QT Specific Notes

  1. Valid values for the CHANNEL argument are {1, 2, 3, 4}.
  2. All temperatures are set and returned in degrees Celsius [˚C].
  3. All currents are set and returned in Amperes [A].

Temperature Settings


Arguments:

[Int] CHANNEL

Example:

 3 
26.28

I2C Command Number:


Description

Returns the temperature set point for CHANNEL.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the temperature set point for CHANNEL to TEMPERATURE. Returns TempSet?. The temperature set point cannot be set outside the range set by the minimum and maximum allowed temperatures (set by the user). If TEMPERATURE is outside this range, the set point will not be adjusted. Also, the temperature set point will be coerced to a value that has a internal digital representation closest to TEMPERATURE.


Arguments:

[Int] CHANNEL

Example:

 2 
25.398

I2C Command Number:


Description

Returns the actual (measured) temperature for CHANNEL.


Arguments:

[Int] CHANNEL

Example:

 2 
0.0024

I2C Command Number:


Description

Returns the temperature error for CHANNEL in degrees Celsius. The error is calculated as the set point temperature minus the actual temperature.


Arguments:

[Int] CHANNEL

Example:

 2 
5.000

I2C Command Number:


Description

Returns the minimum allowed temperature for CHANNEL.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the minimum allowed temperature for CHANNEL to TEMPERATURE. Returns TempMin?.


Arguments:

[Int] CHANNEL

Example:

 2 
55.000

I2C Command Number:


Description

Returns the maximum allowed temperature for CHANNEL.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the maximum allowed temperature for CHANNEL to TEMPERATURE. Returns TempMax?.


Transducer/Load Settings


Arguments:

[Int] CHANNEL

Example:

 2 
On

I2C Command Number:


Description

Returns whether CHANNEL is configured for either Bipolar operation (for a thermo-electric cooler) or Unipolar operation (for a resistive heater).

  • On = Bipolar operation, i.e., current is bi-directional through transducer.
  • Off = Unipolar operation, i.e., current is uni-directional through transducer.

Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the operational STATE for CHANNEL to be either Bipolar (for a thermo-electric cooler) or Unipolar (for a resistive heater). Returns Bipolar?. STATE can have the following values:

  • On = Bipolar operation, i.e., current is bi-directional through transducer.
  • Off = Unipolar operation, i.e., current is uni-directional through transducer.

Arguments:

[Int] CHANNEL

Example:

 2 
2.000

I2C Command Number:


Description

Returns the current limit for CHANNEL in Amps [A].


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the current limit for CHANNEL to CURRENT in Amps [A]. Returns MaxCurr?. Allowed values are {0.000 … 6.000}.


Arguments:

[Int] CHANNEL

Example:

 2 
0.654

I2C Command Number:


Description

Returns the measured current flowing through the temperature transducer (e.g. TEC or heater) in Amps [A].


Arguments:

[Int] CHANNEL

Example:

 2 
7.000

I2C Command Number:


Description

Returns the power limit for CHANNEL in Watts [W].


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the power limit for CHANNEL to POWER in Watts [W]. Returns MaxPwr?. Allowed values are {0.000 … 20.000}.


Arguments:

[Int] CHANNEL

Example:

 2 
1.582

I2C Command Number:


Description

Returns the measured power output for CHANNEL in Watts [W].


Arguments:

[Int] CHANNEL

Example:

 4 
2.573

I2C Command Number:


Description

Returns the voltage across the load for CHANNEL in Volts [V].


Thermistor Settings


Arguments:

[Int] CHANNEL

Example:

 1 
3450.0000

I2C Command Number:


Description

For the B-parameter thermistor model: Returns the Beta coefficient in Kelvin [K] for CHANNEL.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

For the B-parameter thermistor model: Sets the Beta coefficient in Kelvin [K] to VALUE for CHANNEL. Returns Beta?.


Arguments:

[Int] CHANNEL

Example:

 1 
25.0

I2C Command Number:


Description

For the B-parameter thermistor model: Returns the Reference Temperature in degrees Celsius [˚C] for CHANNEL.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

For the B-parameter thermistor model: Sets the Reference Temperature in degrees Celsius [˚C] to VALUE for CHANNEL. Returns RefTemp?.


Arguments:

[Int] CHANNEL

Example:

 1 
10000.0

I2C Command Number:


Description

For the B-parameter thermistor model: Returns the Reference Resistance in Ohms [Ω] (at the Reference Temperature) for CHANNEL.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

For the B-parameter thermistor model: Sets the Reference Resistance in Ohms [Ω] to VALUE for CHANNEL. Returns RefRes?.


Arguments:

[Int] CHANNEL

Example:

 1 
2.108508173

I2C Command Number:


Description

For the Steinhart-Hart thermistor model: Returns the A coefficient for CHANNEL.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

For the Steinhart-Hart thermistor model: Sets the A coefficient to VALUE for CHANNEL. Returns TCoefA?.


Arguments:

[Int] CHANNEL

Example:

 1 
0.797204727

I2C Command Number:


Description

For the Steinhart-Hart thermistor model: Returns the B coefficient for CHANNEL.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

For the Steinhart-Hart thermistor model: Sets the B coefficient to VALUE for CHANNEL. Returns TCoefB?.


Arguments:

[Int] CHANNEL

Example:

 1 
6.535076315

I2C Command Number:


Description

For the Steinhart-Hart thermistor model: Returns the C coefficient for CHANNEL.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

For the Steinhart-Hart thermistor model: Sets the C coefficient to VALUE for CHANNEL. Returns TCoefC?.


Loop Filter Settings


Arguments:

[Int] CHANNEL

Example:

 2 
3

I2C Command Number:


Description

Returns the control mode for CHANNEL:

  • 0 = Manual Mode Off
  • 1 = Servo Mode Off
  • 2 = Manual Mode On
  • 3 = Servo Mode On

Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the control MODE for CHANNEL:

  • 0 = Manual Mode Off
  • 1 = Servo Mode Off
  • 2 = Manual Mode On
  • 3 = Servo Mode On

Arguments:

[Int] CHANNEL

Example:

 2 
1.8

I2C Command Number:


Description

Returns the proportional gain for CHANNEL.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the proportional gain for CHANNEL to GAIN. Returns PGain?.


Arguments:

[Int] CHANNEL

Example:

 2 
On

I2C Command Number:


Description

Returns the On/Off STATE of the proportional gain for CHANNEL.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the On/Off STATE of the proportional gain for CHANNEL. Returns PGainEn?.


Arguments:

[Int] CHANNEL

Example:

 1 
2.000

I2C Command Number:


Description

Returns the integral time constant for CHANNEL in seconds [s].


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the integral time constant for CHANNEL to TIME_CONSTANT in seconds [s]. Returns Integ?.


Arguments:

[Int] CHANNEL

Example:

 2 
On

I2C Command Number:


Description

Returns the On/Off STATE of the integral gain for CHANNEL.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the On/Off STATE of the integral gain for CHANNEL. Returns IntegEn?.


Arguments:

[Int] CHANNEL

Example:

 1 
0.500

I2C Command Number:


Description

Returns the derivative time constant for CHANNEL in seconds [s].


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the derivative time constant for CHANNEL to TIME_CONSTANT in seconds [s]. Returns Deriv?.


Arguments:

[Int] CHANNEL

Example:

 4 
On

I2C Command Number:


Description

Returns the On/Off STATE of the derivative gain for CHANNEL.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the On/Off STATE of the derivative gain for CHANNEL. Returns DerivEn?.


Arguments:

[Int] CHANNEL

Example:

 1 
1.5

I2C Command Number:


Description

Returns the slew rate limit for CHANNEL in degrees Celsius per second [˚C/s].


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the slew rate limit for CHANNEL to RATE in degrees Celsius per second [˚C/s]. Returns Slew?.


Arguments:

[Int] CHANNEL

Example:

 4 
On

I2C Command Number:


Description

Returns the On/Off STATE of the slew rate limiter for CHANNEL.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the On/Off STATE of the slew rate limiter for CHANNEL. Returns SlewEn?.


I/O Channel Settings


Output Function CHANNEL FUNCTION VALUE1 VALUE2
[Int] [Int] [Float] [Float]
Temperature Error 1 - 4 0 Gain [V/˚C] Offset [˚C]
Temperature 1 - 4 1 Gain [V/˚C] Offset [˚C]
Current Output 1 - 4 2 Gain [V/A] Offset [A]

Arguments:

No Arguments Taken

Example:

  
2, 3, 0.500, 0.0

I2C Command Number:


Description

For the front panel Output 1, returns a comma-delimited ASCII string with the following format: “CHANNEL, FUNCTION, VALUE1, VALUE2”.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the FUNCTION and CHANNEL for the front panel Output 1 with the settings prescribed by VALUE1 and VALUE2. Returns Output1?.


Arguments:

No Arguments Taken

Example:

  
{2, 3, 0.500, 0.0}

I2C Command Number:


Description

For the front panel Output 2, returns a comma-delimited ASCII string with the following format: “CHANNEL, FUNCTION, VALUE1, VALUE2”.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the FUNCTION and CHANNEL for the front panel Output 2 with the settings prescribed by VALUE1 and VALUE2. Returns Output2?.


Input Function CHANNEL FUNCTION VALUE1 VALUE2 VALUE3
[Int] [Int] [Float] [Float] [Int]
Slow Servo 1 - 4 0 Integral Gain Set point voltage [V] Polarity [0/1 = +/-]
External Temperature 1 - 4 1 Gain [˚C/V] Offset [V] N/A
External Error 1 - 4 2 Gain [˚C/V] Offset [V] N/A
External Setpoint 1 - 4 3 Gain [˚C/V] Offset [V] N/A
Feedforward 1 - 4 4 Gain [A/V] Offset [V] N/A

—-

Arguments:

No Arguments Taken

Example:

  
{2, 3, 0.500, 0.0}

I2C Command Number:


Description

For the front panel Input A, returns a comma-delimited ASCII string with the following format: “CHANNEL, FUNCTION, VALUE1, VALUE2, VALUE3 (if applicable)”.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the FUNCTION and CHANNEL for the front panel Input B with the settings prescribed by VALUE1-3. Returns InputA?.


Arguments:

No Arguments Taken

Example:

  
2, 0, 0.500, 0.0, 1

I2C Command Number:


Description

For the front panel Input B, returns a comma-delimited ASCII string with the following format: “CHANNEL, FUNCTION, VALUE1, VALUE2, VALUE3 (if applicable)”.


Arguments:

No Arguments Taken

Example:

I2C Command Number:


Description

Sets the FUNCTION and CHANNEL for the front panel Input B with the settings prescribed by VALUE1-3. Returns InputB?.


Error Handling


slice/qt/api.1550534705.txt.gz · Last modified: 2021/08/26 14:26 (external edit)