Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

Error evaluating parameter 'Discretization step size' in component "model.name": scalar cannot be indexed with .

0 votes
1,415 views

hello, I ask the following question: when I compile the model RT BOX - celda/controller in RT BOX 3 and TI c2000 launchpad LAUNCHXLF28069M, take place the error:

Error evaluating parameter 'Discretization step size' in component "model.name": scalar cannot be indexed with .

I would be very grateful for any solution.

Regards.

asked Nov 16, 2020 by efrain ibaceta (38 points)
reshown Nov 16, 2020 by Kris Eberle

1 Answer

0 votes

In most cases, this is related to the model initialization script. As the error message indicates, you are treating a scalar as a structure. 

For example, in the code below, attempting to access "Ts.plant" or "Ts.controller" in the model generate an error message since in the third call the datatype of "Ts" is changed from a struct to a scalar.  I would recommend reviewing the model to see if you are inadvertently doing something similar.

Ts.plant = 10e-6;
Ts.controller = 100e-6;
Ts = 100e-6;
answered Nov 16, 2020 by Bryan Lieblick (1,905 points)
...