Main Content

Generate Signals Without Source Blocks

Signal generators create signals without adding a block to your model. Generators are added and managed through the Viewers and Generators Manager.

Attach Signal Generator

Context Menu

  1. In the Simulink® Editor, right-click the input to a block.

  2. From the context menu, select Create And Connect Generator > product > generator.

    The name of the generator you choose appears in a box connected to the block input.

Viewers and Generators Manager

  1. From the Simulation tab, open the Prepare gallery and select Viewers Manager. The Viewers and Generators Manager panel opens to the side of the Simulink editor.

  2. In the Viewers and Generators panel, select the Generators tab.

  3. Click the button and select a generator.

    The generator is added to the list of generators.

  4. Click the generator you just added from the list and select the button.

  5. The canvas grays, indicating you are now in connect mode. Click the block you want to connect the generator to and in the pop-up, select the check box for the input port you want to attach the generator to.

  6. Close connect mode by clicking the X in the upper right corner of the canvas.

Modify Signal Generator Parameters

Context Menu

  1. Right-click the generator name and select Generator Parameters. In the Generator Parameters dialog box, enter parameters for this generator.

  2. To rename a signal generator, double-click the generator label and type your new name for the generator.

Viewers and Generators Manager

  1. From the Viewers and Generators Manager panel, select the generator from the Generator tab.

  2. Click and enter parameter values for this generator.

  3. To rename a signal generator, double-click the generator name in the Generators list and type your new name for the generator.

Remove Signal Generator

Context Menu

  1. Right-click a generator.

  2. From the context menu, select Disconnect Generator.

    To also delete the generator, select Disconnect and Delete Generator

Viewers and Generators Manager

  1. From the Viewers and Generators Manager panel, select the generator from the Generator tab.

  2. Enter connect mode by selecting the button

  3. On the grayed canvas, select the generator and, in the pop-up, clear the check box next to the port you want to disconnect.

  4. To delete the generator completely, in the Viewers and Generators Manager panel, also click .

See Also

Related Topics