CtrlTerm Custom Programs


New!
  Echo example:
  CtrlTermEcho050916.zip 5.1 KB
1) Compile CtrlTerm normally using one of the zips on the main page
2) Rename the CtrlTerm program in the bin folder
3) Run fpclean to empty the dcu folder
4) Replace CtrlTerm.pas with the one in the above zip and compile the new echo program
5) Run the new echo program. select host and then enter 127.0.0.1, then enter 10003 for the port (should be some larger number for Linux), then click Connect (may need to unblock the port)
6) Run the original CtrlTerm program (renamed above in step #2), select host and enter 127.0.0.1 and the same port number, then click Connect. Enter some text into the Send editbox and click Send



New!  Modbus master (RTU) example:
  CtrlTermModbus031016.zip 5.4 KB (adds Modbus TCP)
Use to replace CtrlTerm.pas in one of the zips on the main page.
Previous release (No Modbus TCP):
  CtrlTermModbus080913.zip 5.2 KB

Change line 738 to send a different packet:
  TmpStr := #1#3#0#0#0#1;
Change line 588 if need different parity or stop bits:
  ser.Config( StrToIntDef( BaudComboBox.Text, -1), 8, 'N', SB1, false, false);

Here is a CtrlTermModbus screen shot.

Modbus is a registered trademark of MODICON, Inc.

You can get a nice free Windows slave simulator here (to use with the above master program):
  http://www.peakhmi.com/
Select Downloads then "PeakHMI Slave Simulators"


Serial monitor example:
  CtrlTermMonitor090613.zip 4.2 KB
Use to replace CtrlTerm.pas in one of the zips on the main page.

Consider using this example if you want to monitor (log) the serial communication between a program on your PC and a device (see the "related tools" page for some options to monitor TCP/IP communications).

You can use this example if you have two extra serial ports available (a 4 port USB adapter is recommended on the "related tools" page) or, if you are using Windows, you might consider using Com0Com (see note on the "related tools" page).

You can use this example to monitor the data on two serial ports.  The data received on a port is logged and is also transmitted on the other port.  For example:
  PC program (COM1) - null modem cable - CtrlTerm Port A (COM2)
  CtrlTerm Port B (COM3) - connect to device
  Select COM2 and COM3 (and proper baud rate) in CtrlTerm.

Note: This example is only to log (slow) data.  If your PC program and device have critical timing requirements and/or hardware handshaking you should probably ignore this example and use other methods to monitor things:
- use a serial tap cable
- use a single RS-232 port with an adapter such as this (and custom software for Modbus which uses the 3 character delay between polls and responses to detect an end of frame at which time it inserts a Time Stamp (TS) and then adds a CRLF to the file and display).


Return to CtrlTerm home page.

Please share your ideas, comments and suggestions. Thanks!
-- Paul Breneman

This page sponsored by: TurboControl.com
Contact information on the home page for TurboControl.com