How can I get a complete record of a signal from my xPC Target using xPC Target 2.0.1 (R13SP1)?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How can I get a complete record of a signal from my xPC Target using xPC Target 2.0.1 (R13SP1)?
I am running my model on an xPC Target in external mode. How can I get a complete record of a signal from the xPC Target?
Réponse acceptée
MathWorks Support Team
le 13 Juin 2013
You can use two xPC host scopes to collect the data. Have the first scope trigger the second scope and the second scope trigger the first scope. Then use a script in MATLAB to collect the data from multiple scopes and save the data into a single MATLAB variable while your simulation is running on the xPC Target.
See following steps for a complete example illustrating the above-described solution:
1) Download the files linked at the bottom of this solution and place them in a directory on your MATLAB path
2) Make sure that you are properly connected to your xPC Target box by running the XPCTEST command
3) Open the downloaded model by typing the following at at the MATLAB command prompt
test_logging
4) Build the test_logging model by selecting Simulation -> Simulation Parameters from the menu and selecting the RTW pane and clicking on the Build button
5) When the build completes successfully, type the following at the MATLAB command prompt to run the downloaded script
collect_data
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Target Computer Setup dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!