Assign to simulink input in State Flow
29 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
My state flow accepts variables from Workspace as Inputs.
In one of the stateflow state blocks, there is a function call (which I wrote in matlab). This function receives those Inputs as arguments, modifies them during the run and returns them because I intend to pass them to other functions that are invoked in other states.
However, I get the following error:
Attempted to assign to simulink input.
I would appreciate any help to overcome this problem.
2 comentarios
TAB
el 23 de Oct. de 2018
Please post the code/part of code/example code with your question.
It will be easy to understand what you want to do.
Respuestas (2)
Arunkumar M
el 13 de Nov. de 2018
I think what you want to do is to start with the input value and then overwrite the input value later during simulation.
You can try one of the two methods:
- assign a temporary variable say b in entry action (en: b = a), where a is your input variable. Later you can modify b and can use b also in your transition conditions. But in this, the variable a remains untouched
- since your input variable a is stored in workspace, you can overwrite the variable a in workspace through assignin command. This lets your simulation to take the updated value from the next time step.
0 comentarios
Kai Gläsker
el 31 de Mzo. de 2021
Hello, maybe you switched the variables.
entry = Output Data
transition = Input Data
0 comentarios
Ver también
Categorías
Más información sobre Complex Logic 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!