The Control Terminal example program is written to be a simple example of how to write such code. It is not a full-featured terminal program nor is it intended to become such a program. As such there are no threads but rather the incoming data is polled for every 50 msec which seems to work well for most purposes.
The three zips below contain everything needed to compile CtrlTerm on three platforms (some standard packages may be needed on Linux systems). Just download a small (3-4 MB) zip file, extract the file, open a terminal, and compile the CtrlTerm program (see instructions below). This is a *very* easy way to try Free Pascal, the fpGUI widget set, and the Synapse and SynaSer communication libraries, and the result can be a *very* useful communication troubleshooting tool!
There is so little code in the example that it has been easy to customize the program for several real work projects. One such project added a counter to the 50 msec timer so commands could be issued repeatedly (every 5 seconds for example). Another project monitored the incoming data for a crash of the ReactOS operating system and then CtrlTerm would issue commands to collect extensive debugging information. Another project used the timestamps of received data (see example timestamps on the bottom part of this CtrlTerm screen shot) to demonstrate a firmware bug on data streams coming from some expensive embedded equipment. New! CtrlTerm.pas in the zips below can be replaced with one of these custom applications.
New! Information on related tools
New! Ports to Delphi and Lazarus (also new console port for Android)
New! Related tutorial
If you get compiler errors when compiling on Linux you might need to install linux libraries.
Temp! If your Linux USB device /dev/ttyACMn is not offered as a port option, then you can add "AC*" at the bottom of the synaser.pas file (similar to the "AM*" code). We hope to do this in new zips below soon! You can use dmesg to see if you have a ttyACMn device.
|This page sponsored by: TurboControl.com Contact information on the home page for TurboControl.com|