I want to determine which value a variable should be set for my motor control algrithm, so I try to tune the value of this variable with the help of Simulink external mode.
But during running, only such kind of variables are allowed to be tuned, when their values are explicitly displayed in the block.
1) When the Constant value of the Constant block is set to 1. So it can be tuned during the mode.
2) When the Constant value of this block is set to C (my variable), however, it can not be tuned anymore.
Since there are many variables in the model, I don't find it's a wise way to replace all of them with their own values explicitly. So I tried to change its value in command window. Although according to the workspace a new value is assigned to the variable, but nothing changed in the Simulink model.
Is there anyone who can give me some advise?