Need Help? E-Mail Tech Support your Questions: support@xanalog.com If you haven’t already, you can get your own free copy of NL-SIM and MML. Part 6 can be found here. - Let’s pass the sine wave data flow through an integrator to produce a cosine wave. Press the Pause/Break key to stop the model. Select Re-Edit from the Model menu (or F10); The Load mode closes and the block diagram reappears in the Model Editor. (Note, if you can’t see the editor toolbar, click on Autosize in the Icon Menu, and it will bring it
into active view)
- Click and drag an integral icon
onto the screen. Click again to drop it where you want, creating an integral block. You’ll now be in the Integration Setup Dialog window. Click on OK - there’s no need to change the
name of this block unless you want to. - Add another export block. This time just take the default values by clicking on OK.
- Double click on the block you just created to bring up Export Setup dialog window.
- Now Change its name to Cosine-Out in the Export Setup dialog window, then click on OK.
- Click on the
green connection point at the right side of the integral block.
This will be your outputsignal from the block. The pick and import
of Export dialog window appears. Because there is only one export
available and it is highlighted as the default selection, click OK
to select state output.
- Connect the itnegral block to the Cosine_output block. You model should now look something like this:
 - Now we want to make a branch in the SineWave to Sine_out data flow. To do this, double click on the data flow line between SineWave and Sine_Out and a branch point will appear.
- Move the mouse slightly above the branchpoint so the point is surrounded by green and a green connection point is pointing upwards. Now click on this connection point and drag the data flow line to the integral block.
- Click on the green connection point below the integral block; the Pick an Import dialog window opens. Click OK to select time deriv as the import which has been highlighted as the default.
- Your model is
now ready to run and should look like this:
- Save the model by selecting Save from the File Menu (or press Ctrl-S)
TIP - If you wish to DELETE an object, move the mouse over the object until you see a blue border, and then hit the DEL key. Load the Model Load the Model by selecting Load from the Model Menu (or press F4) When the trace tree window appears, click with the right mouse button on the purple “leaf” icon to display the block model. Display Time Plots for each of the Export Blocks - Click on each of the two export blocks; dotted lines will appear around each of them. Select Time Plots from the Display Menu. Two Time plot windows now
appear.
- Select Run Display Times under the Setup menu (or press F7) in the Display Update Interval dialog window, set the Display Update Interval to 0.01 and click on the Run Indefinitely check box.
- Click on the Up-arrow of both plots to change the time scale to 2e0. Run the Model (F9) and you’ll see two plots, 90 degrees out of phase of each other, like the ones shown below:
Setting Initial Conditions - Press Pause/Break to stop the run. Notice that signals have stopped. If you press F9, the signals pickup where they have left off. Suppose you want to start again at zero. You can do that one of three ways. You can choose Run/Display Times from the Setup menu (F7) and set the Start value to 0 every time, or you can select Reset from the Model Menu, or you can save the zero settings in a Setup File.
Create a Setup File - Choose Run/Display Times from the Setup Menu (F7). Set the Start value to 0. Set the Display Update Interval to 0.01, and select Run Indefinitely. Then click on OK.
- Before Running the model, save these parameters by selecting Save Setup File from the Setup menu. Save the parameters as file name demo.svs. When asked about whether to create the file, click on Yes.
- Run the model (F9), then stop the model (Pause/Break). Now, check the Start value in the Run/Display Times dialog window.
- Select Load Setup File from the Setup menu (F5) and select demo.svs. Then check the Start value again in the Run/Display Time Dialog window to verify the setup file resets
to the chosen starting conditions, in this case a starting value
of zero.
- Close the model by selecting Drop/Unload from the Model window.
CONGRATULATIONS You have completed the NL-SIM Getting Started Guides Part Five of Seven Continue on to Part 6 |