| Real-Time Workshop® | ![]() |
| On this page… |
|---|
In general, you cannot change a parameter if doing so results in a change in the structure of the model. For example, you cannot change
The number of states, inputs, or outputs of any block
The sample time or the number of sample times
The integration algorithm for continuous systems
The name of the model or of any block
The parameters to the Fcn block
If you cause any of these changes to the block diagram, then you must rebuild the program with newly generated code.
However, you can change parameters in transfer function and state space representation blocks in specific ways:
The parameters (numerator and denominator polynomials) for the Transfer Fcn (continuous and discrete) and Discrete Filter blocks can be changed (as long as the number of states does not change).
Zero entries in the State-Space and Zero Pole (both continuous and discrete) blocks in the user-specified or computed parameters (that is, the A, B, C, and D matrices obtained by a zero-pole to state-space transformation) cannot be changed once external simulation is started.
In the State-Space block, if you specify the matrices in the controllable canonical realization, then all changes to the A, B, C, D matrices that preserve this realization and the dimensions of the matrices are allowed.
Note Opening a dialog box for a source block causes the simulation to pause. While the simulation is paused, you can edit the parameter values. You must close the dialog box to have the changes take effect and allow the simulation to continue. |
If the Simulink® block diagram does not match the external program, the Simulink engine displays an error informing you that the checksums do not match (that is, the model has changed since you generated code). This means that you must rebuild the program from the new block diagram (or reload the correct one) to use external mode.
If the external program is not running, the Simulink engine displays an error informing you that it cannot connect to the external program.
When you use external mode, the machine running the Simulink product and the machine running the target executable must have matching bit architectures, either 32-bit or 64-bit. This is because the Real-Time Workshop® software varies a model's checksum based on whether it is configured for a 32-bit or 64-bit platform.
If you attempt to connect from a 32-bit machine to a 64-bit machine or vice versa, the external mode connection fails.
![]() | Using External Mode Programmatically | Program Architecture | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |