Docklight Applications and Examples

Docklight Applications and Examples

A collection of Docklight examples, demos, videos, and Application Notes. They show how to use Docklight with various serial communication standards and application protocols, including RS232, RS485, TCP, UDP, HID, CRC checksums, byte stuffing, automation examples, and data acquisition / DAQ for specific devices.

Docklight Videos, Tutorials and Demos

To see Docklight in action, please visit the YouTube channel Docklight - Serial Communications Made Easy. It also contains a playlist with Docklight Tutorials From Our Partners and Users.

Docklight Application Notes

Download
..TapPro_Tap485.pdf Docklight Tap Pro and Docklight Tap 485 (RS232 and RS485/RS422 applications, 2-wire and 4-wire RS485, hardware setup and wiring, software options). PDF document.
..RS422_485.pdf RS422/485 Communication (using Docklight with USB-to-RS485 hardware, project settings for RS422/485. PDF document.
..DocklightTap.pdf Low latency RS232 monitoring with Docklight Tap. PDF document, 522 KB.
..RS232_Adapter.pdf RS232 Communication with Docklight RS232 Adapter (incl. information on non-standard baud rates). PDF document.
..TCP_Monitoring.pdf TCP Monitoring (monitoring a single client/server TCP connection). PDF document.
..Bluetooth.pdf Docklight and Bluetooth Serial Port. PDF document.
..DLL.pdf DLL Automation API. Adding Docklight-style communications (serial COM port, TCP or UDP) to your own application. PDF document.
..ArduinoSerial.pdf Working with Docklight and Arduino, the open-source electronics prototyping platform. PDF document.

RS232 / Serial Communication Examples

Please download and install the latest release of Docklight or Docklight Scripting before opening the examples below. Please extract .zip files to a folder on your computer first, then open the project file in Docklight.
Download
ModemDiagnostics.ptp This can be used to perform a modem / AT command test. This can be also used with cellular devices via Bluetooth that install a modem COM port on your PC.
PingPong.ptp A simple example for how to define and use Receive Sequences and automatically respond to incoming data.
ModbusRtuCrc.zip A well-documented example for using Docklight to simulate a basic Modbus RTU master and evaluate the Modbus slave responses. (Extract the .zip contents to a folder on your computer first, then open the .ptp file with Docklight.)

Automation / Decoding / Encoding Examples


Please download and install the latest release of Docklight Scripting before opening the examples below. Please extract .zip files to a folder on your computer first, then open the project or script in Docklight Scripting.

Download
LogFileNamesTimestamp.zip Demo scripts for using log files names that include a date stamp and starting a different log file every day / every hour
VBScriptLanguage.zip A collection of scripts with VBScript code examples (functions, methods, objects, properties, statements)
AcknowledgeTimeout.zip Demo for a typical use case: testing the reaction of a device.
EchoMessages.zip Script and project file to simulate a communication loopback.
FlexibleAnswers.zip How to use a flexible response to an incoming sequence, instead of answering with the same sequence all the time.
PacketLengthTest.zip This sample script can be used when there is a significant pause between two data packets and you need to check for a maximum packet length which may not be exceeded.
SendByteTiming.zip How to add a delay time between individual characters of a Send Sequence.
SendSequenceLoop.zip How to send all Send Sequences defined in a constant loop.
CrcReverseEngineeringExample.zip Solving a CRC Reverse Engineering puzzle from Stackoverflow - how to find out the CRC algorithm to use when all you know from your protocol is a set of example messages including CRC.
CobsEncoderDecoderExample.zip Encoding and decoding data using Consistent Overhead Byte Stuffing (COBS). This example shows how to use OnSend / OnReceive event procedures and script autostart, so new packets get encoded on-the-fly, and incoming COBS packets are automatically decoded / returned to the original form without Byte Stuffing.

Networking Examples

Please extract .zip files to a folder on your computer first, then open the project file in Docklight Scripting.
Download
PingPong_TCP.zip Demonstrates the use of Docklight Scripting as a TCP server and client.
PingPong_UDP_Loopback.zip Demonstrates the use of Docklight Scripting as an UDP peer client talking to himself.
PingPong_UDP_Peer.zip Demonstrates the use of Docklight Scripting as an UDP peer.
TCP_Monitoring_HTTP.zip Demonstrates how to use Docklight Monitoring Mode for a TCP/IP based connection.

Third-Party Devices and Protocols


Please extract .zip files to a folder on your computer first, then open the project or script in Docklight / Docklight Scripting.

Download
Datainterface_SCPI_Example.zip Reading data via SCPI protocol from a measuring instrument like Agilent HP34401 or Tektronix DMM6500. Simulating a SCPI device answer ("virtual instrument").
UT803_DigitalMultimeter_Example.zip Voltage measurement and automated data logging for bench type digital multimeter UNI-T UT803. This example also demonstrates how you can create custom data logs in your preferred format for further processing, e.g. .CSV Comma Seperated Values file format for import into Microsoft Excel.
Voltcraft_PPS_PowerSupply_Example.zip How to read voltage data from VOLTCRAFT PPS multimeter series from Conrad Electronic.
HeliosPreisserDigitalIndicator_Example.zip Millimeter and micrometer distance measurement using Helios Preisser digital indicators with RS232 or USB data interface, e.g. Helios Preisser DIGI-MET. The example demonstrates how to handle additional RS232 requirements like 'RTS high for power supply/VCC' and DTR switching for measurement data inquiry.
Gardasoft_RT_Example.zip Testing and using Gardasoft RT series LED controller for machine vision and other applications.
Faulhaber_RS232_Example.zip Testing and using FAULHABER motion controllers, e.g. MCBL 300x RS, MCDC 300x RS, 3564...B CS, 32xx...BX4 CS, 22xx...BX4 CSD
JennyScienceXenaxDriveControlExample.zip Quickstart, manual and automated motion tasks for JENNY SCIENCE XENAX / LINAX / ELAX high precision linear drives. Shows different Docklight script approaches for device status polling or waiting for device events.
BarionetExamples.zip Testing networking protocols (TCP and UDP-based) for Barix Barionet network-enabled automation interface (TCP, UDP and serial gateway).
IMSTec-LEDcontroller.zip How do I control two 350mA LEDs in continous mode using the IMSTec LED controller ILC2008.
RussoundControllersExample.zip Instructions and demo for testing RS232 communications with Russound multiroom audio controllers.
VolpiIntraLED2020Example.zip Controlling the intensity of an illumination source Volpi IntraLED 2020.
ValhallaScientific_4300C_Example.zip How to perform basic data logging for Valhalla Scientific Inc. programmable Micro-Ohmmeter Model 4300C
LogitechWirelessRumblepad2Example.zip How to use USB HID communication with Logitech Rumblepad 2 USB HID game controller, display joystick positions and keypad control events.
ParitySwitch_9BitProtocols.zip How to access MDB multidrop bus protocol for vending machines and other 9-bit serial data protocols. This works with standard PC serial interfaces (8-bit UART) by switching the parity settings temporarily within one Send Sequence.
ArduinoExamples.zip Arduino and Docklight example projects/scripts as shown in the Docklight Arduino Application Note.