Nucleo support package PIL simulation example
이전 댓글 표시
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
답변 (1개)
Asim
2024년 1월 29일
0 개 추천
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:
- 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.
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
카테고리
도움말 센터 및 File Exchange에서 STMicroelectronics Discovery Boards에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!