Menu

Compiling grampc on dSpace - s-function sampling time

2019-09-03
2019-09-04
  • Issa Hammoud

    Issa Hammoud - 2019-09-03

    Good morning,

    Kindly, I want to inquire about the following error which I am getting while trying to compile the MPC subsystem from the double integrator example into a dSpace platform:

    The mpc subsystem has sample time 0.0001. Only constant (inf) or inherited (-1) sample times are allowed in function call subsystem (Please see attached a screenshot of the error message).

    *Matlab version: 2017a.

    how the sampling time of the s-function can be defined as inherited?

    Any hints or leads to overcome this error would be much appreciated 😊.

    Thanks in advance!

     
  • Tobias Englert

    Tobias Englert - 2019-09-04

    Hey,

    the sample time of the GRAMPC s-function is inherited (-1). The sampling time is set the s-function grampc_run_Sfct in line 204 "ssSetSampleTime(S, 0, -1);".

    Therefore, I guess there is a problem in your model. Is “MPC-Subsystem” really the name of your GRAMPC s-function or did you put the s-function in another subsystem?
    Best regards
    Tobias

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.