There are two languages available to use in Equations. If an assignment statement does end in a semicolon, then the dump of the contents of the result is suppressed.Īny errors or warnings caused by executing a line in the Command Window are outputted to the Command Window. If an assignment statement does not end in a semicolon, the results of that assignment are outputted in the Command Window, as can be seen in the above figure. It is a useful debugging tool since the contents of a variable can be displayed here. It interacts with the same variables that are visible to the Script Editor. The Command Window is used to execute statements line-by-line. New Use Ctrl+MouseWheel to zoom in and out on the equations Script Editor. New If you want context sensitive help on a keyword, select the keyword and press F1 in the Script Editor. Post-Process data, or define variables as inputs to be used elsewhere.More specifically, the Script Editor window is used to: The Script Editor is used to type in a sets of equation statements to be executed. Use "Use Display" for equations with tuned or gang-tuned parameter variables to make it easy to read/edit the variables. We recommend you use "Use MKS" for model equations to get unit portability. "Use MKS" is very important for Model portability and units portability. So, if an equation variable X=20 is used in an Inductor set to nH in Use MKS the inductor value is 20H (MKS) in Use Display the inductor value is 20nH. "Use Display" means to to interpret the unit of measure of a parameter as a scale factor. If, on the other hand, the Units are set to "Use Display", then the units will be defined where the value is actually used. If the Units are set to "Use MKS", then the value of the variables in this Equations block will be treated as MKS values. The Units button allows you to define how the values of the variables shown in the variable list are to be interpreted when used elsewhere, such as part-parameters. The Equation Language button allows you to set the language of the Equations to be defined, as shown here: Two buttons are located at the top of the Variable Viewer window: The Equation Language button, and the Units button. If you wish to see the variable's value without creating a table, you can do so in the Command Window, as discussed below. If you right-click on any variable displayed in the Variable Viewer, you will be presented with a menu containing options to plot the variable on a graph or display it on a table. If the variable is an array, the type and dimensions of the array are displayed. If the variable is a scalar, the value is displayed.
The Variable Viewer displays any variables that currently exist in the Equations object. Add or Remove a breakpoint from the current line (Ctrl+B) Toggle all existing breakpoints to either the "enabled" or "disabled" state Variable Viewer This button is only enabled while breakpointed. If there is no function call at the current line, or the equation processor cannot step into the function, then all statements on the current line are simply executed. Step Out - run until the current function ends, then break at the next line (the caller) (Shift+F11). Step Over - execute statements on the current line (F10). Step Into - step inside a function and break at the first line of execution in the function (F11). The icons are: Show or hide the Line Numbers margin Turn autocalculate on/off Bring up the Equation Wizard Display Errors for this set of equations Go - run the equations, or continue on from a breakpoint (Ctrl+G) Stop - stop debugging (abort execution). The Equations window also has an associated toolbar, shown here: The Command Window, located on the lower right.The Script Editor, located on the upper right.The Variable Viewer, located on the left.The Equations window has three subwindows: The following image shows a typical Equations window: Two languages are available for defining equations: Engineering Language (EngLang) and Mathematics Language (MathLang).
Equations are a powerful tool that enable post processing of data, control over inputs to simulations, and definition of user-defined custom models.