Error When Building a MathWorks, Inc. MATLAB® Plant Model in Veristand

Updated May 22, 2023

Reported In


  • VeriStand

Issue Details

When I try to build a MathWorks, Inc. MATLAB® Plant Model in Veristand, the build fails at the "Generating TLC Interface API" step and I get the following errors:


  • The specified index (11) was out of the range 0 - 10 

  • The argument for an [] operation must be a repeated scope symbol, a vector, or a matrix 

  • Error using tlc_new 

  • Error in tlc

  • Error in build_target 


There are several ways to resolve this error:


  1. Verifying that the model does not contain any "%" characters.
  2. Inline parameters in your MATLAB model. This can be done by selecting Inline Parameters in the Model Configuration Setup in MATLAB®.
  3. Enable TLC Debugging in MATLAB®. This can be done by going to Configuration Parameters > Real-Time Workshop > Debug and selecting Start TLC debugger when generating code. After selecting Build Model, a debugger window will appear. Type Break Error in this window, then Continue. MATLAB® will highlight the first error encountered, if any.

Additional Information

MATLAB®, Simulink®, and Real-Time Workshop® are registered trademarks of The MathWorks, Inc. All other trademarks are the property of their respective owners.