Software


This section is about the Python library that interfaces with the SPI Rack. It takes care of the communication with the controller module and it contains all the code that sets up the modules correctly. Therefore this library is necessary for the SPI Rack to function. This does not mean that the SPI Rack cannot be used in a different framework. A basic interface for multiple modules has already been written for the Qcodes data acquisition framework: http://qcodes.github.io/Qcodes/.

Here a simple example on how to use the D5a (DAC) module to show how easy it is to get going:

# Import parts of the SPI Rack library
from spirack import SPI_rack, D5a_module

# Instantiate the controller module
spi = SPI_rack(port="COM4", baud=9600, timeout=1)
# Unlock the controller for communication to happen
spi.unlock()

# Instantiate the D5a module using the controller module
# and the correct module address
D5a = D5a_module(spi, module=2)
# Set the output of DAC 1 to the desired voltage
D5a.set_voltage(0, voltage=2.1)

More examples can be found in the example notebooks on GitHub or in the Examples section. The source code can be found at the GitHub page: https://github.com/mtiggelman/SPI-rack.

Content

License

MIT License

Copyright © 2017 QuTech

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

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.