- Add a “MATLAB Function” block to the model.
- Use a “Bus” block to combine all outputs from the 'parse motion' block.
- Connect the “Bus” created in Step 2 to the input port of the “MATLAB Function” block from Step 1.
- Link the output of the “MATLAB Function” block from Step 1 to the input port of the “parse motion” block.
- Set the priority of the “MATLAB Function” block from Step 1 higher than that of the “parse motion” block.
- Incorporate domain-specific logic into the newly created “MATLAB Function” block and assign initial data to the relevant properties.
How to implement real-time input using a MATLAB Function block
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello, I am currently researching the control of a Stewart platform simulation. I would like to input the necessary values by dividing them by the step size and using a MATLAB function block to deliver the input values in real-time. Is it possible to receive the calculated input values from a script file into the function block and deliver these values in real-time for each step according to the simulation time?
I want to input the values calculated in the script file into the MATLAB function block as data, with time and step settings, and have the block calculate the 8 prism joint displacements. These displacements should be divided into steps over the simulation time and delivered in real-time.
0 comentarios
Respuestas (1)
Jaimin
el 27 de Sept. de 2024
Hi @석준
In order to obtain the calculated input values from a script file within the function block and provide these values in real-time for each simulation step, I have a workaround that you might consider trying.
Please follow these steps:
For more information on “MATLAB Function” and “Bus” Block you can refer following documentations:
I hope this will be helpful.
0 comentarios
Ver también
Categorías
Más información sobre Troubleshooting in Simulink Real-Time en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!