I have a Simulink model that uses the Bernoulli Binary Generator block from the Communications Blockset that has a variable for the Sample Time parameter. If I open the model first, then declare the variable in the MATLAB workspace, I receive the following error when I try to simulate the model:
??? Error using ==> sim Error in block 'test_frmbs/Bernoulli Random Binary Generator': Block initialization commands cannot be evaluated. MATLAB error message: Error using ==> set_param Invalid setting in block 'test_frmbs/Bernoulli Random Binary Generator/DSP Constant/zoh' for parameter 'SampleTime'.
The model simulates correctly if I first declare the variable in the MATLAB workspace and then open the model and simulate it.
Best Answer