Getting Started with the bossdevice API

Table of Contents

Requirements

Enable bossdevice communication over Control PC

Turn on the bossdevice and connect the Control PC Ethernet port on your bossdevice to an available Ethernet port on your computer.
On your computer, follow these steps to configure the local Ethernet interface on your PC with the IP address 192.168.7.2.
If you are working on Windows, please set the Development-to-Target Computer Ethernet Interface as Private as shown below.
  1. Right-click on the Windows Start menu and click the Windows PowerShell (Admin) selection.
  2. Run the command Get-NetConnectionProfile.
  3. Find the name of the Ethernet interface that you are using for development-to-target computer communication.
  4. Enter the command Set-NetConnectionProfile.
  5. Use the interface name that you find as the Name argument.
  6. Confirm the changes by running Get-NetConnectionProfile.
For example, if the interface is named Unidentified network, enter the command:
Set-NetConnectionProfile -Name "Unidentified network" -NetworkCategory "Private"
Windows may revert the network category to Public depending on your policy settings. To set any unidentified network to be classified as Private rather than Public by default, do the following:
  1. Open Start > Local Security Policy.
  2. Select "Network List Manager Polices" on the left.
  3. Double-click "Unidentified Networks".
  4. Select "Private" under Location type.
  5. Click OK.
If you encounter any communication issues such as connection errors, please visit Troubleshoot Communication Failure Through Firewall (Windows) or reach out to technical support.

Initial toolbox configuration

Download bossdevice-api-installer.mltbx from the latest release available in the GitHub project.
Start MATLAB and install the bossdevice API toolbox with double click on bossdevice-api-installer.mltbx.
In the MATLAB Command Window, call
bd = bossdevice
to add the bossdevice with the default settings to the list of targets. It will also try to establish connection. Alternatively, if you want to change either the name of the bossdevice or its default IP address in your local MATLAB settings, call
bd = bossdevice('bossdevice','192.168.7.5')
replacing the function arguments with the name and IP address you want to set on the real-time device.
Finally, click on the update command if prompted to update the software dependencies on the bossdevice.

Change remote IP address on bossdevice

May you want to change the remote IP address on the bossdevice used for the host-target communication, please call the following command after having successfully established connection with the bossdevice using the default IP address shown above.
bd.changeBossdeviceIP('192.168.1.5') % Introduce the new IP address desired for the bossdevice
After executing this command, the bossdevice will reboot. Please wait a few seconds, until the device is back online before executing further commands.

Get started

Create an instance of the main control class bossdevice bd = bossdevice in the MATLAB command window.
bd = bossdevice
If not found in the MATLAB path, please select mainmodel.mldatx real-time application.
Start firmware with bd.start on the remote device.
bd.start
Explore examples and methods available in the bossdevice object.
demo_script_name
Return to home