With external mode, you can log signals and tune parameters while the model is running on the target hardware in real time. When you change parameter values from within Simulink, the modified parameter values are communicated to the target hardware immediately. You can monitor the effects of the parameters tuning activity by viewing the algorithm signals on the scopes.
To prepare your model for external mode:
In the Configuration Parameters dialog box, select Hardware Implementation > Hardware board > ARM Cortex-based VEX Microcontroller.
Under Target Hardware Resources, select External Mode.
For setting the COM port automatically, in the Set
host COM port parameter, select
For setting the COM port manually, in the Set host
COM port parameter, select
If you select the
for Set host COM port parameter, specify the
corresponding COM port in COMPort parameter.
To find the COM port on your Windows® computer, select Start > Control Panel > Device Manager > Ports (COM & LPT).
To find the COM port on your Mac computer, open a terminal window and enter the following command:
This command lists the path and file name of the USB device that is connected to the VEX® hardware.
For example: /dev/cu.usbmodem1410
Make sure that you select the Verbose check box to view the external mode execution progress and updates in the Diagnostic Viewer or in the Command Window.
Your model is now ready to run in external mode.
To run your model in external mode on your computer:
Select Simulation > Mode > External.
Click the Run button.