PIL Framework
Integrating the PIL concept into your embedded hardware is easy. Included with the PLECS PIL package are "PIL framework" libraries providing all the required functionality in a clean and encapsulated fashion. Multiple demonstration projects illustrating the use of the PIL Framework and how it can be customized for a particular application and communication link are also part of the package.
The fundamental operation of a PIL simulation consists of overriding and reading variables in the embedded application, and synchronizing the execution of the control task(s) with the simulation of a PLECS model. The PIL framework provides the following functionality:
- "Read probes" to read the values of variables in the embedded code executing on the target and feed the information into the simulation model.
- "Override probes" to override variables in the embedded code with values obtained from the simulation.
- "Calibrations" to configure control algoritms from PLECS without having to recompile the embedded code.
- A method to uniquely identify the software executing on the target.
- A remote agent, capable of communicating with PLECS and interpreting commands related to PIL operation.
- A mechanism to stop and start the control task(s) execution.
- A means to provide configuration parameters to PLECS, such as the communication baudrate.
Communication Interfaces
During a PIL simulation, information is continuously exchanged between the embedded processor and the circuit simulator.
PLECS supports several communication interfaces:
- Hardware serial ports
- USB-based virtual communication ports (VCP)
- Native FTDI link
- Ethernet connection