Page 749 - ExtendSim User Guide
P. 749

Debugging Tools 723
Dotted lines for unconnected connections
To set a condition on the breakpoint so it will break only if the overflow is greater than 0.0: In the Debugger window:
Remove the existing breakpoint by clicking its red circle in the Debugger window. Add a new breakpoint to the Debugger window after the entire “if” and “else” state-
ment; in this case at the ending brace that is below the “overflow = 0.0” statement. The next step is to write a comparison statement that will compare the overflow value to zero. In the Breakpoints window:
Double-click the area to the right of the breakpoint. This opens the Conditional Break- point window, shown below.
In the Variable A column of the Conditional Breakpoint window, select the overflow variable as A.
Since you want the condition to determine when the overflow is greater than zero, choose A>B as the comparison.
Check the Use constant for B check box and enter 0.0 as the constant.
Click OK
Notice that the breakpoint’s red circle in the Debug- ger window has changed to a half circle, indicating there is a condition on the breakpoint.
The finished Conditional Breakpoint window
• ClicktheredStopExecutingbuttonontheDebuggerwindow.Thisclosesthewindowand stops the model run.
• Runthesimulation.ThefirstoverflowvaluewillbedisplayedintheVariablespane.
As an additional exercise, try using different values for the overflow condition, such as 2.0, to see when that value first appears.
☞ Advanced modelers might benefit from reading about the Source Code Debugger in the Devel- oper Reference.
Since you have set conditions, and you want to find
the first time the condition is met, the calculation
must start again from the beginning. To start the run over:
Dotted lines for unconnected connections
If a block is not getting an input or is not generating an output when you think it should, it may not be connected properly in the model. This can happen when connections run underneath blocks when you thought that they were connected to the blocks. ExtendSim shows incomplete connections as a red dotted line. To fix these, delete the incomplete connections by double-clicking them and reattach them to where they are supposed to be. Clicking one segment selects that seg- ment; double-clicking a segment selects the entire connection line.
Incomplete connection
How To


































































































   747   748   749   750   751