By using our free product software APIs, users of Total Phase products can develop their own custom applications or even utilize the tools in external applications. One that is often inquired about is MATLAB. While Total Phase does not directly support MATLAB, it is possible to configure the device using the API to work in a MATLAB environment.
MATLAB® is a programming platform used by engineers to analyze and design systems and products. Embedded engineers may use this platform for test and measurement applications. Specifically, our customers have used MATLAB for analysis and control of our tools.
Total Phase products are supported on Windows, Linux, and Mac operating systems and also include software APIs. Our product APIs support multiple languages including C, C#, Python, and VB, and come with examples. Currently, the API package does not include MATLAB drivers, but users can easily create them.
Below are the steps that users can take to use Total Phase products with MATLAB:
1. Download and run the latest version of the Total Phase USB Drivers Installer.
2. Download and unzip the latest version of the Aardvark Software API.
3. Go the c directory in the Aardvark Software API package.
4. Modify the functions' names in the aardvark.h file.
5. Run the Mathworks loadlibrary command.
6. Call loadlibrary('aardvark.dll',['aardvark.h'],'mfilename','aardvark_matlab'). (The Mathworks loadlibrary command takes c header file and creates m wrapper instead. This command creates a file called aardvark_matlab.m).
7. Continue with the programing based on the system requirements.
Mathworks offers an “Instrument Control Toolbox Support Package” for the Aardvark I2C/SPI Host Adapter that enables users to use the Aardvark adapter to communicate, using I2C or SPI interfaces, with chips, circuit boards, or sensors remotely from a computer running MATLAB. Find the package here and instructions to install here.
1. Download and run the latest version of the Total Phase USB Drivers Installer.
2. Download and unzip the latest version of the Cheetah Software API.
3. Go the c directory in the Cheetah Software API package.
4. Modify the functions' names in the cheetah.h file.
5. Run the Mathworks loadlibrary command.
6. Call loadlibrary('cheetah.dll',[cheetah.h'],'mfilename','cheetah_matlab'). (The Mathworks loadlibrary command takes c header file and creates m wrapper instead. This command creates a file called cheetah_matlab.m).
7. Continue with the programing based on the system requirements.
1. Download and run the latest version of the Total Phase USB Drivers Installer.
2. Download and unzip the latest version of the Promira Software API.
3. Go the c directory in the Promira Software API package.
4. Modify the functions' names in the promira.h file.
5. Run the Mathworks loadlibrary command.
6. Call loadlibrary('promira.dll',[promira.h'],'mfilename','promira_matlab'). (The Mathworks loadlibrary command takes c header file and creates m wrapper instead. This command creates a file called promira_matlab.m).
7. Continue with the programing based on the system requirements.
1. Download and run the latest version of the Total Phase USB Drivers Installer.
2. Download and unzip the latest version of the Beagle Software API.
3. Go the c directory in the Beagle Software API package.
4. Modify the functions' names in the beagle.h file.
5. Run the Mathworks loadlibrary command.
6. Call loadlibrary('beagle.dll',[beagle.h'],'mfilename','beagle_matlab'). (The Mathworks loadlibrary command takes c header file and creates m wrapper instead. This command creates a file called beagle_matlab.m).
7. Continue with the programing based on the system requirements.
We recommend customers use the correct API architecture (32 or 64 bit). In the API software package, we include several code examples that include integrating with MATLAB as well as many chips and devices. These examples can be customized as needed. Multiple customers have used this information to successfully implement MATLAB with their Total Phase device.
For further information, we recommend taking a look at our API documentation in our product user manuals:
Aardvark I2C/SPI Host Adapter User Manual
Cheetah SPI Host Adapter User Manual
Promira Serial Platform I2C/SPI Active User Manual
Beagle Protocol Analyzer User Manual
Please note that further high-level guidelines for implementing MATLAB with our devices is out of our scope. Such questions can be directed at Mathwork support.