Hi,
I used ACADO Toolkit in order to generate a NMPC solver for a simulink application, using MATLAB interface. In order to do so, I have use the custom s-function, provided by Rien Quirynen in this thread:
https://sourceforge.net/p/acado/discussion/general/thread/2873192d/#e2f5. The code was generated without any problems and the outcome of the simulation in Simulink was as predicted, without any warnings or errors. However, I attempted to upload the exported NMPC for a real time application to D-SPACE MAB2 and specific errors (seen in the attached picture) during Simulink code generation procedure (to be downloaded to MAB2). Could you please advise if these errors have to do with ACADO settings. (Note: the error appears only if ACADO block is present).

The settings for the ACADO code generation for DSPACE are below:

VK01_nmpc = acado.OCPexport( ocp );
VK01_nmpc.set( 'HESSIAN_APPROXIMATION', 'GAUSS_NEWTON' );
VK01_nmpc.set( 'DISCRETIZATION_TYPE', 'MULTIPLE_SHOOTING' );
VK01_nmpc.set( 'SPARSE_QP_SOLUTION', 'FULL_CONDENSING_N2' );
VK01_nmpc.set( 'INTEGRATOR_TYPE', 'INT_IRK_GL2' );
VK01_nmpc.set( 'NUM_INTEGRATOR_STEPS', 2*N );
VK01_nmpc.set( 'QP_SOLVER', 'QP_QPOASES3' );
VK01_nmpc.set( 'LEVENBERG_MARQUARDT', 1e-4 );

if EXPORT
VK01_nmpc.exportCode( 'VK01_export_NMPC' );
end
if COMPILE
global ACADO_;
copyfile([ACADO_.pwd '/../../external_packages/qpoases3'], 'VK01_export_NMPC/qpoases3')

VK01_make_custom_solver_sfunction

end

Thanks for your time

Kind regards
Vasilis