Hi Shaz,
Yes, absolutely. This is given in the PLECS User Manual here, under "Generating Code" within the chapter titled "Code Generation".
"To enable a subsystem for code generation, select the subsystem, then choose Execution settings... from the Subsystem submenu of the Edit menu or the context menu. In the Subsystem Settings dialog check the option Enable code generation. Note that it is not possible to enable code generation for a subsystem that is contained by or that itself contains other subsystems that enable code generation."
Regards,
Manu