A package to communicate with a VESCENT Slice-QTC temperature controller.
Project description
SLICE-QTC
A python package to communicate with a VESCENT Slice-QTC temperature controller.
This package wraps the serial API of the Vescent Slice temperature controller Vescent Slice temperature controller to a python class for convenient communication.
All serial commands are implemented as class properties.
Warning: The software currently only works with firmware version 2.22. Earlier firmware versions are not supported!
Usage
Basic usage is to create an instance of the Slice class and access its attributes:
import slice
qtc = slice.Slice()
# read current temperature of channel 1
print(qtc.ch1.Temp)
# change set point of channel 2
qtc.ch2.SetTemp = 19.040
You can also read/set the values for all 4 channels simultaneously:
import slice
qtc = slice.Slice()
# prints a tuple like (20.34, 20.50, 30.1, 10.0)
print(qtc.Temp)
# Sets the setpoint temperature of all 4 channels. Channel 3 will be ignored since 'None' was passed
qtc.SetTemp = (20.5, 21., None, 30.)
# If all channels should receive the identical settings, you can also do:
qtc.PGain = 5.5
For convenience, all channel settings can be exported to and imported from a JSON file:
import slice
qtc = slice.Slice()
# save all channel settings to a JSON file
qtc.save_json('channel_settings.json')
This will create a JSON file containing all settings per channel.
Example JSON
{
"ch1": {
"Beta": 3450.0,
"Bipolar": 0,
"Control": 0,
"Current": 0.0,
"Deriv": 0.0,
"DerivEn": 0,
"Integ": 20.0,
"IntegEn": 1,
"MaxCurr": 1.0,
"MaxPwr": 4.0,
"PGain": 5.0,
"PGainEn": 1,
"RefRes": 10000.0,
"RefTemp": 25.0,
"Slew": 0.0,
"SlewEn": 0,
"TCoefA": 0.000684,
"TCoefB": 0.00029,
"TCoefC": 0.0,
"TempMax": 50.0,
"TempMin": -5.0,
"TempSet": 25.0
},
"ch2": {
"Beta": 3450.0,
"Bipolar": 0,
"Control": 0,
"Current": 0.0,
"Deriv": 0.0,
"DerivEn": 0,
"Integ": 20.0,
"IntegEn": 1,
"MaxCurr": 1.0,
"MaxPwr": 4.0,
"PGain": 5.0,
"PGainEn": 1,
"RefRes": 10000.0,
"RefTemp": 25.0,
"Slew": 0.0,
"SlewEn": 0,
"TCoefA": 0.000684,
"TCoefB": 0.00029,
"TCoefC": 0.0,
"TempMax": 50.0,
"TempMin": -5.0,
"TempSet": 26.0
},
"ch3": {
"Beta": 3450.0,
"Bipolar": 0,
"Control": 0,
"Current": 0.0,
"Deriv": 0.0,
"DerivEn": 0,
"Integ": 20.0,
"IntegEn": 1,
"MaxCurr": 1.0,
"MaxPwr": 4.0,
"PGain": 5.0,
"PGainEn": 1,
"RefRes": 10000.0,
"RefTemp": 25.0,
"Slew": 0.0,
"SlewEn": 0,
"TCoefA": 0.000684,
"TCoefB": 0.00029,
"TCoefC": 0.0,
"TempMax": 50.0,
"TempMin": -5.0,
"TempSet": 26.0
},
"ch4": {
"Beta": 3450.0,
"Bipolar": 0,
"Control": 0,
"Current": 0.0,
"Deriv": 0.0,
"DerivEn": 0,
"Integ": 20.0,
"IntegEn": 1,
"MaxCurr": 1.0,
"MaxPwr": 4.0,
"PGain": 5.0,
"PGainEn": 1,
"RefRes": 10000.0,
"RefTemp": 25.0,
"Slew": 0.0,
"SlewEn": 0,
"TCoefA": 0.000684,
"TCoefB": 0.00029,
"TCoefC": 0.0,
"TempMax": 50.0,
"TempMin": -5.0,
"TempSet": 26.0
}
}
To import it back to the device, just do:
import slice
qtc = slice.Slice()
# save all channel settings to a JSON file
qtc.load_json('channel_settings.json')
Installation
The package can be installed via pip:
pip install slice-qtc
Disclaimer
This is NOT an official package by Vescent Photonics.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file slice_qtc-0.1.1.tar.gz
.
File metadata
- Download URL: slice_qtc-0.1.1.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.8.10 Linux/5.4.0-139-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9850064ee1ad57c1a24380fb0b11140fa43b865a83a7305df3ebff08b950dd4 |
|
MD5 | e33bbadd389051118b04d72f8a0876c8 |
|
BLAKE2b-256 | bba2bb2a303d3668206123e67eda66c240a3c61e7da9cc05085f34c069872cdd |
File details
Details for the file slice_qtc-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: slice_qtc-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.8.10 Linux/5.4.0-139-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ea8bfc28d9da9d3776fc15f84719c309a4f84f34b8de0c52bdf073fcc77536b |
|
MD5 | e2c4f57f6aad6d8e6a106c6df80f79f1 |
|
BLAKE2b-256 | 572625247afb828da456a8c26dfea580bc0c6b108577726da570639715631f3a |