OptoDAC class

a driver class to control TUDelft Optodac equipment in matlab.
16 Downloads
Updated 21 Nov 2016

View License

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

Cite As

Jakko de Jong (2024). OptoDAC class (https://www.mathworks.com/matlabcentral/fileexchange/60329-optodac-class), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Instrument Connection and Communication in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0