Integrating six simulink model
51 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Divyashree
il 1 Dic 2024 alle 17:02
Commentato: Divyashree
il 5 Dic 2024 alle 16:17
Hello,
I have implemented simulink model. Basically it is a hybrid matlab-simulink model. First I have written a .m script and created a matlab function. By using the coder extrinsic, I've called the .m script in the matlab function model. I've attached the snap. There are six models. How to integrate all the six models?
The process flow of the model should work as mentioned below:
- SED, NVM and BITE - there is no input and generates only the three pre-processed SED, NVM & BITE output files
- From SED and NVM output files - input verfication is done
- And the output data from input verfication should be printed in the final generated report
- From the SED NVM and BITE output files, analysis is done
- The analysed data is again printed in the generated report
- So from input verification and analysis the output should go to final report
If I run the model, the model should generate SED, NVM, BITE and final report as output. How to integrate all the six models?
3 Commenti
Risposta accettata
Ashok
il 3 Dic 2024 alle 8:06
It seems the output files from each process might not be in data types supported by Simulink. If that's the case, the output data can be stored in a variable of a suitable data type in the base workspace or logged to a file in the workspace for access by other blocks. To see the list of data types supported by Simulink, run this command in the MATLAB Command Window:
web(fullfile(docroot, 'simulink/slref/signal.html#d117e449192'))
The 'Switch Case' block can manage the flow from one block to another. The attached file 'example_R2019b.slx' includes this model setup:
Each process's 'MATLAB Function' block is enclosed within a 'Switch Case Action Subsystem'. The 'flag' data store value determines which block is executed, starting with '1' to select 'case [1]' initially in the 'Switch Case' block.
At the end of each process, the flag updates to switch to the next process.
The stop time is set to ‘inf’ and the ‘default’ case is used to end the simulation.
For more details, check out these documentation links by running the commands in the MATLAB Command Window:
- Switch Case
web(fullfile(docroot, 'simulink/slref/switchcase.html'))
- Switch Case Action Subsystem
web(fullfile(docroot, 'simulink/slref/switchcaseactionsubsystem.html'))
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Programmatic Model Editing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!