Model Debugging and Verification


Tracing Configuration

You can control the amount of information that is displayed on the Trace tab by using the Tracing Configuration dialog box. To open the Tracing Configuration dialog box, right-click on the Trace tab background and select Tracer Configuration.

You can use the Tracing Configuration dialog box to filter trace messages according to various criteria: the blocks that generate trace messages, the entities that are mentioned in trace messages, and the simulation clock time of trace messages. You can combine more than one of these criteria to further refine the number of trace messages that appear on the Trace tab. Changes made in the Tracing Configuration dialog box apply only to the model that is active when you open the Tracing Configuration dialog box. These settings last only while Simulation Studio is open. They are not saved when you close Simulation Studio.

Figure 10.3 shows a sample Tracing Configuration dialog box.

Figure 10.3: Tracing Configuration Dialog Box

Tracing Configuration Dialog Box


The following sections appear in the Tracing Configuration dialog box:

  • Blocks

  • Entities

  • Simulation Time

By default, all trace messages that are generated during simulation execution appear on the Trace tab. Therefore, when you open the Tracing Configuration dialog box for the first time, the default options are selected to show all block tracing, show all entity tracing, and show tracing for all simulation times.

If you clear the Show All Block Tracing check box, the Block Tracing button becomes enabled. Click Block Tracing to open the Block Tracing dialog box. Figure 10.4 shows a sample Block Tracing dialog box.

Figure 10.4: Block Tracing Dialog Box

Block Tracing Dialog Box


In this dialog box, select the blocks for which you want to see trace messages and click OK. For trace messages that are generated by blocks, only trace messages generated by the selected blocks are displayed on the Trace tab. If you want to display trace messages generated by all blocks, simply check the Show All Block Tracing check box in the Tracing Configuration dialog box.

If you clear the Show All Entity Tracing check box, the Entity Tracing button becomes enabled. Click Entity Tracing to open the Entity Tracing dialog box. Figure 10.5 shows a sample Entity Tracing dialog box.

Figure 10.5: Entity Tracing Dialog Box

Entity Tracing Dialog Box


In this dialog box, select the entity types for which you want to see trace messages. Also, you can specify a range of Id numbers for each selected entity type, which causes only trace messages for entities with Id numbers in the specified range to be displayed on the Trace tab. Click OK to apply the settings and close the Entity Tracing dialog box. For trace messages regarding entities, only trace messages regarding the selected entity types and Id ranges are displayed on the Trace tab. If you want to display trace messages regarding all entities, simply check the Show All Entity Tracing check box in the Tracing Configuration dialog box.

To show trace messages only for a specified range of simulation clock time, you can specify a start time, an end time, or both. To specify a start time, clear the Zero check box in the Tracing Configuration dialog box and enter a positive integer value in the Start field. Trace messages that are generated before the specified start time are not displayed on the Trace tab. To specify an end time, clear the Infinity check box and enter a positive integer value in the End field. Trace messages that are generated after the specified end time are not displayed on the Trace tab.

The settings in the Blocks, Entities, and Simulation Time sections of the Tracing Configuration dialog box combine to determine what is ultimately displayed on the Trace tab. For example, if you select to show tracing for only the Entity Generator A block, select to show tracing for only the Default entity type, and select to show tracing for only time 10 to 20 on the simulation clock, then the Trace tab displays only messages that are generated by block Entity Generator A. Furthermore, if this block generates messages for entity types other than Default, they are not displayed. Lastly, no trace messages are displayed before time 10 or after time 20, regardless of the block that generated the trace message or the entity type that is referred to by the trace message.