This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Processor-in-the-Loop Execution From Command Line

Use processor-in-the-loop (PIL) execution to verify code that you intend to deploy in production.

To set up and start a PIL execution from the command line:

  1. Create, register, and verify your target connectivity configuration.

  2. Create a coder.EmbeddedCodeConfig object.

  3. Configure the object for PIL.

  4. Use the codegen function to generate library code for your MATLAB® function and the PIL interface.

  5. Use the coder.runTest function to run the test file for your original MATLAB function.

To terminate the PIL execution, use the clear function_pil or clear mex command.

The following example shows how you can use line commands to set up and run a PIL execution on your development computer.

PIL Execution of Code Generated for a Kalman Estimator

  1.  Create a target connectivity API implementation

  2.  Register a target connectivity configuration

  3.  Verify target connectivity configuration

  4.  Copy MATLAB code for Kalman estimator

  5.  Configure the PIL execution

  6.  Generate code and run PIL execution

  7.  Terminate PIL execution

Related Examples

More About