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) or Terminal (Admin) selection.
  2. Assumming we are using the default IP address on the bossdevice, copy and run the following command on the terminal you have just opened.
New-NetFirewallRule -DisplayName "bossdevice" -Direction Inbound -RemotePort 5505-5507,5510-5512,5515-5517 -Protocol UDP -Action Allow -Profile Any -RemoteAddress 192.168.7.5
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