Skip to content

Getting Started: Your First Signal

This page takes you from a Simulink model running on your target to a live signal of that model in the Scope.

Using Xcos?

The steps are the same for Xcos models.

Before you start

  • Your model has been converted with X2C, compiled and flashed onto the target, and the target is running.
  • The target is connected to your PC (for example by a serial cable, USB or Ethernet).

1. Connect the Communicator to the target

  1. Start the Communicator and open the Setup tab.
  2. In the Interface box, choose how the target is connected: "Serial", "TCP/IP", "USB-FTDI", "PCAN", "VCI-CAN" or "CANopen over PCAN", and fill in its settings, e.g. "Port:" and "Baudrate:" for a serial connection.
  3. Click Connect to target Connect in the toolbar.

The status bar changes from "Not connected" to "Connected", and the log on the Status tab shows "Connect OK".

2. Load your model

If the Communicator does not have your model yet, load it with Model → Load Model from File (an "X2C Model File (.xml)"). The Scope offers the blocks and ports of this model as signal sources.

3. Open the Scope

Click Scope Scope in the toolbar. The button is available once the Communicator is connected and a model is loaded.

4. Enable a channel

In the Channel Configuration of the Scope, click the enable switch of channel 1 (marker 1).

Important

A channel must be enabled before you can choose its source. As long as a channel is switched off, its source fields are greyed out.

Channel Configuration with channel 1 enabled

5. Choose the signal

In the Source column of the enabled channel (marker 2):

  1. Leave the source type at Block.
  2. Click the "Name:" field. A list of your model's blocks opens; type part of the block name to filter it, and click the block whose signal you want to see.
  3. Choose the block's output in the "Port:" list.

Channel 1 with a block and its output chosen

6. Start sampling

Click Start sampling Sample in the Scope toolbar. The signal of your model appears in the plot.

The signals of a model in the Scope

Next steps

  • Channels: more channels, labels, units, gain and offset.
  • Trigger: a stable picture of a periodic signal.
  • Scope overview: everything else the Scope can do.