Compilation error using PLECS
Problem
I am integrating a PLECS circuit into a RT-LAB model (see http://www.opal-rt.com/kb-article/support-plecs-toolbox) and I have the following error at compilation :
"Error: Real-Time Workshop Error in block (...): Cannot generate code for naturally commutated switch in component 'Circuit/Configurable\nSubsystem/IGBT_SwitchModel/IGBTD'."
How can I workaround this ?
Solution
Although this problem is more PLECS related (for more information you contact Plexim Support [support@plexim.com] ) here is the explanation : this limitation regarding code generation for naturally commutated switches is described on page 134 in the current PLECS manual. You _can_ make PLECS produce code for naturally commutated switches by selecting the PLECS circuit block and issuing the following MATLAB command:
plecsedit('set', gcb, 'RTWAllowNaturalCommutation', 'on').




