Components
Specifying Component Parameters
Every component has a dialog box to view and modify the component parameters. The dialog box appears when you double-click on the component icon.
Most component parameters accept MATLAB expressions as values, provided that they evaluate to an acceptable result. Parameter expressions are evaluated when you start a simulation or update the Simulink model. In case an error occurs during evaluation of the parameters, an error dialog appears and the corresponding component is highlighted.
An exception to this behavior are parameters that affect the appearance of the component such as the parameter Number of windings of the Mutual Inductor or the parameter Width of the Wire Multiplexer. Such parameters must be literal values and are evaluated immediately.
Using Workspace Variables in Parameter Expressions
Parameter expressions that are not evaluated immediately can include MATLAB variables. Expressions are evaluated as a whole in one workspace. By default, the evaluation workspace is the MATLAB base workspace. However, you can define local mask workspaces for subsystems that will then be used for the parameter evaluation in the underlying schematics. For information on subsystem mask workspaces see Mask Parameters.
You can also mask the Circuit block as a whole. This is necessary e.g. if you want parameter expressions to be evaluated in the Simulink model workspace, or when you use the sim command from within a MATLAB function and want to access the function workspace. For more information see Customizing the Circuit Block.
Displaying Parameters in the Schematic
You can cause PLECS to display any component parameter beneath the block icon in the schematic. You specify the parameters to be displayed using the check boxes next to the edit fields in the dialog box. Parameter values can be edited in the schematic directly by double-clicking them.
Changing Component Names
The component name is also entered in the dialog box. All component names in the same schematic must be unique and must contain at least one non-space character. Trailing spaces are removed from the names.
Changing the Orientation of Components
You can change the orientation of a component by choosing one of these commands from the Format menu:
- The Rotate command rotates a component clockwise 90 degrees (Ctrl-R).
- The Flip left/right command flips a component horizontally (Ctrl-F).
- The Flip up/down command flips a component vertically (Ctrl-I).
Note Unlike in Simulink, flipping a component is not equivalent to rotating it 180 degrees.
Getting Component Help
Use the Help button in the dialog box to get online help about the component.