Testing a Serial Device or a Protocol Implementation

<< Click to Display Table of Contents >>

Navigation:  Working with Docklight >

Testing a Serial Device or a Protocol Implementation

 

DL-PC-Device_340x122-OL

 

 

Preconditions

 

You need the specification of the protocol to test, e.g. in written form.

The serial device to test should be connected to one of the PC's COM ports. See section Standard RS232 Cables for details on how to connect two serial devices.

The serial device must be ready to operate.

 

Performing the test

 

A) Creating a new project

Create a new Docklight project by selecting the menu File > NEW New Project

 

 

B) Setting the Communication Options

1.Choose the menu Tools > PROPERTIES Project Settings...
2.Choose communication mode Send/Receive
3.At Send/Receive on comm. channel, set the COM Port where your serial device is connected.
4.Set the baud rate and all other COM Port Settings required.
5.Confirm the settings and close the dialog by clicking the OK button.

 

 

C) Defining the Send Sequences to be used

You will probably test your serial device by sending specific sequences, according to the protocol used by the device, and observe the device's reaction. Perform the following steps to create your list of sequences:  

 

1.Double click on the last line of the Send Sequences table. The Edit Send Sequence dialog is displayed (see also Editing and Managing Sequences).
2.Enter a Name for the sequence. The sequence name should be unique for every Send Sequence defined.
3.Enter the Sequence itself. You may enter the sequence either in ASCII, HEX, Decimal or Binary format. Switching between the different formats is possible at any time using the Edit Mode radio buttons.
4.After clicking the OK button the new sequence will be added to the Send Sequence lists.

 

Repeat steps 1 - 4 to define the other Send Sequences needed to perform your test.

 

 

D) Defining the Receive Sequences used

If you want Docklight to react when receiving specific sequences, you have to define a list of Receive Sequences.

 

1.Double click on the last line of the Receive Sequences table. The dialog Edit Receive Sequence is displayed. The dialog consist of three parts: Name field, Sequence field, and Action field.
2.Edit the Name and Sequence fields.
3.Specify an Action to perform after the sequence has been received by Docklight. There are four types of actions available:

Answer - After receiving the sequence, transmit one of the Send Sequences.

Comment - After receiving the sequence, insert a user-defined comment into the communication window (and log file, if available).
Trigger - This is an advanced feature described in Catching a specific sequence...
Stop - After receiving the sequence, Docklight stops communications.
4. Click the OK button to add the new sequence to the list.

 

Repeat steps 1 - 4 to define the other Receive Sequences you need to perform your test.

 

E) Storing the project

Before running the actual test, it is recommended that the communication settings and sequences defined be stored. This is done using the menu File > SAVE Save Project.

 

 

F) Running the test

Start Docklight by choosing Run > play Start Communication.

 

Docklight will open a serial connection according to the parameters specified. It will then display all incoming and outgoing communication in the communication window. Use the Pt_Send_Button Send button to send one of the defined sequences to the serial device. The on-screen display of all data transfer allows you to check the device's behavior. All protocol information can be logged in a text file for further analysis. Please see section Logging and analyzing a test.

 

TIP: Using the Documentation Area , you can easily take additional notes, or copy & paste parts of the communication log for further documentation.