Download Docklight V2.1 User Manual 08/2015
Transcript
28
Working with Docklight (Advanced)
6
Working with Docklight (Advanced)
6.1
Sending Commands With Parameters (Send Sequence
Wildcards)
When testing a serial device, the device will most likely support a number of commands
that include a parameter.
Example: A digital camera supports a command to set the exposure time. For setting
the exposure time to 25 milliseconds, you need to send the following sequence:
e | x | p | | 0 | 2 | 5 | r ("r" is a terminating <CR> Carriage Return character)
To avoid defining a new Send Sequence for every exposure time you want to try, you can
use a Send Sequence with wildcards instead:
e|x|p| |?|?|?|r
The following step-by-step example describes how to define an exposure time command
with a parameter and use a different exposure value each time the sequence is sent.
Preconditions
· Docklight is ready to run a test as described in testing a serial device or a protocol
implementation.
Performing the test using commands with parameters
A) Preparing the project
Create a new Docklight project and set up all communication parameters.
B) Defining the commands used
1. Create a new Send Sequence. Enter a Name for the sequence.
2. Enter the fixed part of your command in the Sequence section. For our example
you would enter the following sequence in ASCII mode:
e|x|p| |
3. Now open the context menu using the right mouse button, and choose Wildcard
'?' (matches one character) to insert one wildcard at the cursor position. In our
example we would have to repeat this until there are three '?' wildcards for our threedigit exposure time. The sequence now looks like this:
e|x|p| |?|?|?
4. Now add the terminating <CR> character, using the default control character
shortcut Ctrl+Enter. The example sequence now is
e|x|p| |?|?|?|r
5. Click OK to add the new sequence to the Send Sequence list.
Repeat steps 1 - 5 to define other commands needed to perform your test.
NOTE: To distinguish a '?' wildcard from a question mark ASCII character (decimal code
63), the wildcard is shown on a different background color within the sequence editor.
C) Sending a command to the serial device
1.
Use the
Send button to open the serial communication port and send one
command to the serial device.
Docklight V2.1 User Manual 08/2015
Copyright 2015 Flachmann und Heggelbacher GbR