PLECS 3.2 Online Help |
You can customize the mask of the Circuit block to a certain extent, e.g. in order to change the block icon or to define mask parameters. For information on Simulink block masks please refer to the Simulink documentation.
If you define mask parameters for the Circuit block, PLECS evaluates component parameters in the mask workspace rather than the MATLAB base workspace. The mask workspace contains both the mask parameters and any additional variables defined by the mask initialization commands. For details on parameter evaluation see Specifying Component Parameters.
By default, a double-click on the Circuit block opens the schematic editor. This can be changed by editing the OpenFcn parameter of the block. To change the behavior so that a double-click opens both the schematic editor and the mask dialog,
plecs('sl', 202); open_system(gcb, 'mask');
Alternatively, you can change the behavior so that a double-click opens only the mask dialog. Then, add a checkbox to the dialog that will open the schematic editor when you click on it:
if (strcmp(get_param(gcb, 'openschematic'), 'on'))
set_param(gcb, 'openschematic', 'off');
plecs('sl', 202);
end