External mode enables Simulink® on your host computer to communicate with a deployed model on your robotics hardware during runtime. External mode allows you to tune block mask parameters and to visualize signals on your model while your model is running. For ROS Toolbox, deployed models are ROS nodes running on the target hardware that communicates with Simulink over TCP/IP.
To use external mode with ROS Toolbox models:
On the Apps tab, under Control Systems, click Robot Operating System (ROS).
In the Robot Operating System (ROS) dialog box that opens
Robot Operating System (ROS) from the
ROS Network drop-down. This opens up the
ROS tab in the toolstrip which shows the specified ROS
Network in the Connect section.
In the Connect section, specify Deploy
To option as
Remote Device, from the
drop-down. To configure the remote device details such as IP address and user
Manage Remote Device from the
In the Prepare section, click Hardware Settings to open the model configuration parameters dialog box. In Target Hardware Resources, set the External mode parameters. Click OK.
In the model, set the Simulation mode to
Run the model.
Your model connects to the Device Address specified in the Connect to ROS Device dialog box which is used to connect to your ROS device when deploying the model.
To configure signal monitoring and data archiving, go to the Apps tab and select External Mode Control Panel. You can also connect to the target program and start and stop execution of the model code. For more information, see External Mode Simulations for Parameter Tuning and Signal Monitoring (Simulink Coder).