- Open the Simulink model and access the Configuration Parameters by selecting "Simulation" > "Model Configuration Parameters" or pressing Ctrl+E.
- In the Configuration Parameters window, go to "Hardware Implementation" > "Target hardware resources" > "External mode" and set the "Serial port" to COM26.
- If your model includes a PIL configuration block, double-click it to ensure the COM port is set to COM26 there as well.
- During the Hardware Setup process for the Nucleo board via "Add-Ons" > "Manage Add-Ons", confirm that COM26 is selected as the COM port.
- After making these changes, rebuild and redeploy the PIL application to the board.
Nucleo support package PIL simulation example
2 次查看(过去 30 天)
显示 更早的评论
Hi, I'm trying the "Code Verification and Validation with Processor-in-the-loop (PIL) Simulation" example and on the "Verification Referenced Model Code with PIL" section. When I run the simulation, Simulink try to open the default port COM2 insted of the port COM26 as I specified in the configuration parameters window.
I'm using MATLAB R2021b with the latest "Simulink Coder Support Package for STMicroelectronics Nucleo Boards"
Is there a way to change the default setting of this example ?
Best Regards,
Bruno
0 个评论
回答(1 个)
Asim
2024-1-29
Hello Bruno,
To set the COM port to COM26 for a Processor-in-the-Loop (PIL) simulation with the STMicroelectronics Nucleo board support package, please follow these steps:
If the COM port is still defaulting to COM2, you may need to check if there are any scripts or .tlc files that are part of the code generation process which could be overriding the setting.
I hope it helps.
Best Regards,
Asim Asrar
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!