How do we fix this in Simulink ?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Varun Nair
el 22 de Jul. de 2021
Respondida: Keyur Mistry
el 23 de Jul. de 2021
I have taken a simple D axis Current transformation from looking under mask option of a PMSM motor. Once Implemented in the running stage, it pops the following message.
How should I add the parameter. I am not able to rechange the name as my parameter that was included in the workspace![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/692834/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/692834/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/692839/image.png)
0 comentarios
Respuesta aceptada
Keyur Mistry
el 23 de Jul. de 2021
You need to define the "Ldq" variable array of size 1x2, before the simulation starts.
Either you can create variable manually in MATLAB command window:-
>> Ldq = [Ld Lq]; % Ld is D-axis Inductance value and Lq is Q-axis Inductance value
Or you can add the above command in the "InitFcn" of the model file.
Open your .slx simulink file -> right click (keeping curson on white space in model file window) -> select "Model Properties" -> In "Model Properties" window go to "Callbacks" tab -> Select "InitFcn" under "Model Callbacks" -> Enter your code.
Code written in "InitFcn" will be executed first once the Run button is hit for simulation.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Programmatic Model Editing en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!