MATLAB: Does FIS wizard fail to auto generate blocks when the number of rules exceeds 500 in Simulink 6.6 (R2007a)

500blocksconnectedfisFuzzy Logic Toolboxlargenotnumberofruleswizard

When I add a large number of rules (about 500) in a FIS, the FIS Wizard under Fuzzy Logic Controller toolbox fails to link the auto generated blocks to the block output. Is there a limitation on the number of rules that can be used in the FIS?
The error I encounter is this:
Error in 'untitled1/Fuzzy Controller with Ruleviewer/Fuzzy Logic Controller/FIS Wizard': Initialization commands cannot be evaluated. MATLAB error message: Error using ==> add_block
Input bounds are out of range.

Best Answer

This bug has been fixed in Release 2011b (R2011b). For previous product releases, read below for any possible workarounds:
Simulink block positions have been restricted to be less than 32768. This is mentioned in the documentation page below for the Position property of a Simulink block.
Common Block Parameters :: Model and Block Parameters (Simulink)
In the Fuzzy Wizard block case this limit is reached with a very large number of rules. As a workaround, you can decrease vertical spacing between the blocks in Fuzzy wizard. You can do this by editing line 260 in 'fuzwizmask.m' in the '$MATLABROOT/toolbox/fuzzy/fuzzy' folder.
The original code is:
'y0 = y0 + dym1 + dym2 + 30;
You may change the space between blocks on 'y' axis from 30 to a smaller number to accomodate all the blocks.