How PIL works

At the most basic level, a PIL simulation can be summarized as follows:

  • Input variables on the embedded processor, such as current and voltage measurements, are overridden with values provided by the PLECS simulation.
  • The control algorithms are executed for one control period.
  • Output variables on the target, such as PWM peripheral register values, are read and fed back into the simulation.