How can I sovle about external mode problem?
2 views (last 30 days)
Show older comments
I'm using the Pixhawk Support Package(PSP) from Mathworks. For using Pixhawk external mode, I have some problem. In 'Ext_mode_intro.slx' example, Pixhawk was done code generation and build. But if I clicked the "Connect to Target" button, occure error like below picture.
I follwed this process in manual from mathworks. How can I sovle this problem? Thanks.
1 Comment
Tushar Sinha
on 12 Jan 2016
Hi JaeYeong,
Here are some troubleshooting steps which might help resolve this issue:
1)Make sure that the possible reasons for the failure shown in error message are verified.
2)Delete the existing "slprj" file in the current directory and re-build your solution.
3)Make sure you have installed the "Pixhawk Firmware V1.4" which is a requirement.
a) Available only on 64-bit Microsoft Windows.
b) This support package is available for R2014b and R2015a.
5) Make sure you have set the correct compiler using "mex -setup" MATLAB command.
Thanks,
Tushar
Answers (2)
oualid doukhi
on 3 Jun 2018
The script’s filename is rc.txt. It should be copied to the SD-card directory /etc. A script sample has been provided by the PSP installation and can be found in your Pixhawk Toolchain installation directory: c:\px4\Firmware\etc. By copying this file to your SD-card in the folder /etc the Pixhawk will execute the px4_simulink_app at system startup. This app is built into the firmware that is flashed onto your PX4 hardware at Simulink Model build time. Simply renaming this file (e.g. rc.txt to rc.txt.simulink) on the SD-card will allow boot-up of the default flight control software
0 Comments
Steve Kuznicki
on 17 Feb 2016
JaeYeong, You will also need to make sure that you are setting the correct serial port parameters in the model. You need to set both the 'Interface' options under Code Generation (for Host serial port) and the Coder Target-External Mode options parameter (for Pixhawk serial port). You will also need to make sure that the px4_simulink_app is started on the Pixhawk before you attempt to connect. This is done by modifying the rc.txt file or manually starting it via a serial terminal (not the same port used for ext-mode).
2 Comments
Rogelio Flores
on 27 Apr 2018
I use windows 10 and I can not correct this error that is generated when loading a control from simulink to the pixhawk, could you help me?
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!