The workflow exports a calibration contract designed for INCA and CANape. Tunable model parameters are made available through XCPlite calibration pages, while measurement variables use addresses resolved from the generated ELF.
Measurement objects
Signals marked as Simulink test points are exported as measurements. The A2L retains the correct generated-code addresses and removes generated prefixes from display names where possible, making calibration-tool lists easier to read. The runtime creates one XCP event per generated model task, so signals can be assigned to a raster that matches the task period.
Calibration pages
The generated model parameter structure is represented by XCPlite calibration memory. XCP exposes a reference page and a working page. The model scheduler copies the active calibration page into the model parameter structure at the base rate, which gives the model a consistent parameter set for each cycle.
- Reference page: defaults packaged with the runtime/HEX image.
- Working page: values edited by the calibration tool during a session.
- Freeze/persistence: optional target-side saving of calibrated data when
Persistence=true. - Page operations: working/reference switching, copy, checksum, and upload/download follow the XCP calibration-page model.
Lookup-table calibration as one instrument
For an explicit standard 1-D or 2-D Lookup Table block whose breakpoints and table are simple dialog parameter names, the exporter recognises the relationship and generates one A2L characteristic:
| Simulink lookup | A2L object | Calibration-tool result |
|---|---|---|
| 1-D lookup | CURVE plus linked AXIS_PTS for the X breakpoint |
One table instrument with the X axis and data values. |
| 2-D lookup | MAP plus linked AXIS_PTS objects for X and Y |
One map instrument with both axes and table data. |
The displayed characteristic uses the Simulink lookup block label—for example testNew—rather than a generated storage name such as B. This prevents INCA from presenting independent breakpoint and data vectors when the user expects one editable curve or map.
Eligibility and safe fallback
The linked export is intentionally conservative. Input-port axes/tables, parameter expressions, lookup-table objects, and tables above two dimensions remain separate VAL_BLK objects and produce a warning. Exporting an invented axis relationship would be worse than exposing separate vectors, because calibration tools could write an incorrect memory layout.
Calibration filters
CalibrationAllow and CalibrationDeny accept wildcard patterns. An empty allow-list includes every otherwise eligible tunable parameter. The default deny-list removes generated dimension/index bookkeeping. When a lookup table is retained, its referenced axis objects are automatically retained too; filtering cannot leave a dangling AXIS_PTS_REF.
Recommended model preparation
- Set tunable parameter behaviour or a tunable storage class for the values that must be calibrated.
- Mark only meaningful signals as test points; exporting every internal signal consumes DAQ memory and bandwidth.
- Use simple, stable parameter names for breakpoint vectors and table data.
- After changing parameter storage, lookup dimensions, or task partitioning, rebuild and re-import the A2L and HEX together.
Validation without a calibration tool
The workflow includes a MATLAB-side xcpCalPageSmokeTest(cfg) helper for a deployed target. It reads, writes, checksums, and restores a small calibration range. Use it to separate a target-side calibration-page problem from an INCA project/data-set configuration problem.