IXXAT - Products, Services and Training for CAN, CANopen, DeviceNet, CAL, FlexRay, LIN, Embedded TCP/IP
Home
Features
Gallery
Interface Boards
Tutorial
Tips, News, Articles
Support & FAQ
Downloads
Impressum


Deutsch
Tutorial

10 Sequencer module: Transmission of message sequences

The Sequencer module provides a very simple but nevertheless very effective tool for generating time- or event-dependent message sequences. The Sequencer module is an extremely effective tool for testing CAN-devices and -networks, e.g. by simulation of the Start-up-behavior of networks. The following commands are available for the definition of message sequences:

transmission of data- or remote-messages,
wait for arrival of data- or remote-messages,
insert delay times,
wait for user input,
repeat command blocks.

The commands of the Sequencer module are:

Command Meaning Action
td transmit data Transmission of a message
tr transmit remote Transmission of a message request
wd wait for data Wait for arrival of a message
wr wait for remote Wait for arrival of a message request
delay delay Insert a delay time in ms
pause pause Wait for user input
repeat repeat Repeat a block
endrep end repeat End of a block

Insert the Sequencer module into your configuration by dragging the the Sequencer module icon per drag and drop from the module list to your controller.

By double clicking on the Seuqencer module in the configuration tree the module is started. Below the menu bar and toolbar there is an edit field, in which the commands are entered in script language. After the script is started, the Edit field is used as a display field, in which the current state of the processing of the commands is displayed by a scroll-bar.


The syntax of a Transmit- and of a Receive-command is given as an example:

td <number_of_repeats> <delay-time> <message-ID> <[data]>

The command to transmit a message is td. Its four parameters are separated by tabulator or space characters. By entering a delay-time (in milliseconds), it is possible to define whether and how long the Sequencer module interrupts processing of the script after transmission of the message. After this delay time the message is transmitted as often as specified under number_of_repeats. The entry of a data field is optional. This may have up to 8 figures, which are also to be separated by space characters.

wd <delay-time> <message-ID>

The command to wait for reception of a CAN-message with message-ID is wd. Here too the processing of the script can be interrupted by entering a delay-time.

In the following example a sequence of four messages is transmitted five times consecutively. Then reception of a message with the identifier 0x60 is awaited. Finally the whole sequence is repeated three times.

repeat 3
    repeat 5
        ;   Count Delay ID    Data
        td  1     50    41    12 13 14 15
        td  1     50    0x3F  33 44 55
        td  1     50    0x0A  22 33
        td  1     50    32    76 65 43 26
    endrep
    wd  1   0x60
endrep

You can mark this example, copy to the Windows clipboard and insert into the display area of your Sequencer module. Start processing of the command batch either

by selecting the menu point Sequence | Start or
by clicking on the button in the toolbar.

View this with the Receive module. The Sequencer module will stop after transmission of four messages on the wait command wd. To continue processing of the script, you must define a message in the Transmit module with the identifier 0x60 and transmit this as soon as processing stops.