Support of PLECS toolbox

It is now possible to interface PLECS toolbox from Plexim with RT-LAB. So a PLECS model can be run in real-time using RT-LAB. Here are the things to know for compiling a RT-LAB model containing a PLECS circuit :

  1. perform the two first steps of compilation : separation and RTW code generation
  2. In the repertory model_name_sm_subsystem\OpREDHAWKtarget you should find a c file plecs_n_m.c (with n,m some numbers that can change from one model to the other) which is generated. In the "Files" menu of your model add this file to transfer in ascii mode before compilation in the targeted subsystem
  3. In your PLECS installation folder (for Example C:\PLECS) there are two files that are used by the QNX / Redhat compiler to read C code generated by RTW. These files are located in PLECS_Directory\plecs\rtw\src\ and are named plecsrtw.c and plecsrtw.h. In the "Files" menu of your model add this file to transfer in ascii mode before compilation in the targeted subsystem

Attached is a demo based on Opal-RT AD-DRIVE-06 PMSM at 9kHz demo (please see our Applications booklet for further details). Results can be compared between PLECS and ARTEMIS / RTE.

Demo_PLECS_SPS_2CPU.zip - PMSM drive using PLECS and using SPS-ARTEMIS-RTE