Integrating six simulink model

51 visualizaciones (últimos 30 días)
Divyashree
Divyashree el 1 de Dic. de 2024 a las 17:02
Comentada: Divyashree el 5 de Dic. de 2024 a las 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:
  1. SED, NVM and BITE - there is no input and generates only the three pre-processed SED, NVM & BITE output files
  2. From SED and NVM output files - input verfication is done
  3. And the output data from input verfication should be printed in the final generated report
  4. From the SED NVM and BITE output files, analysis is done
  5. The analysed data is again printed in the generated report
  6. 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 comentarios
Divyashree
Divyashree el 2 de Dic. de 2024 a las 5:05
So do you mean I need to create subsystems to integrate all the six matlab function models?
Divyashree
Divyashree el 2 de Dic. de 2024 a las 17:29
  1. This backend simulink model is implemented for the automation tool. In the model, the filepath and the unit number are hardcoded. How can I make the model dynamically run for other multiple units?

Iniciar sesión para comentar.

Respuesta aceptada

Ashok
Ashok el 3 de Dic. de 2024 a las 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'))
  1 comentario
Divyashree
Divyashree el 5 de Dic. de 2024 a las 16:17
This backend simulink model is implemented for the automation tool. In this model, the filepath and the unit number are hardcoded. How can I make the model generic/dynamically run for other multiple units. should I write a config file separately or is there any alternative method for making the model more dynamic'generic?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by