OptoDAC class
Driver class to connect matlab to a TUDelft OptoDAC instrument and set its channel voltages.
The class provides a level of usability by checking user input for compatibility with the equipment and returning informative warnings and error messages. The class is a singleton, preventing the user from accidentally instantiating multiple objects that control the same optodac interface. To instantiate optodac objects for multiple Optodac machines, the constructor should be modified. Since the TUDelft Optodac is kind of a blackbox, the most tricky part was finding the correct format to send it commands without freezing it. Using fwrite with 8-bit unsigned integers seems to give the correct behaviour.
Functions:
getInstance - instantiate the optodac object
OpenSerial - check if there is already an open serial connection with the optodac and if not, open it.
GetVoltage - return an array with the set voltages for all 8 DAC channels since instantiation.
SetVoltage - Set a single DAC channel to a required voltage.
A detailed description of all the class' functionality is provided by Optodac_matlab_class.pdf
Citar como
Jakko de Jong (2025). OptoDAC class (https://www.mathworks.com/matlabcentral/fileexchange/60329-optodac-class), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0.0 |