Start the CarMaker for Simulink session
cm_session_startStarts a CarMaker for Simulink session when missing by launching MATLAB, running cmenv, and opening the Simulink model and CarMaker GUI; returns ready status or what it is waiting for.
Instructions
Bring up a CarMaker for Simulink session as far as it is missing: start MATLAB (visible, in the project's src_cm4sl folder, engine shared), run cmenv, open the Simulink model and open the CarMaker GUI. Nothing is restarted or closed. Returns ready=true, or ready=false with what it is waiting for: call again until ready. Without a model it opens none and lists models_loaded and models_found to choose from. Many projects need their own setup script before the model compiles: if init_scripts_found lists one, pass it as init.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| init | No | The project's own MATLAB setup script, run once per MATLAB session before the model is opened (default: CM_MATLAB_INIT). A name from init_scripts_found, or a full path | |
| model | No | Simulink model to open: a name on the MATLAB path, a path as listed in models_found, or a full path (default: CM_MODEL) | |
| max_wait_s | No | Longest time to wait in seconds; keep it below your client's tool time-out and call again if not finished |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||