HANDIG1 provides simple manual control of your Digital model railroad from the computer keyboard. It allows control of all loc and functiondecoders (of which 8 are visualised on the screen) and a range of switches (max 256). HANDIG1 also reads feedback encoders and displays the information on the screen. The use of HANDIG1 is straight-forward and it is excellent for testing the basic functions of your digital modelrailroad. The most frequently used controls need only a single keystroke.
HANDIG1 currently supports:
The file HANDIG25.ZIP is a ZIP archive to be unpacked with UNZIP or
PKUNZIP (recent version).
After unpacking you'll find the following files:
It is recommended to keep all files in the same (preferrably a separate) directory.
Note: HANDIG1 will create a 'profile' file called HANDIG.PRO in the current directory. This is to remember your last setup, which makes it possible to re-start without any commandline parameters. If you start HANDIG1 a next time all previous settings will be as before, but any commandline parameters may overwrite profile parameters.
The general idea of the parameters for HANDIG1 is to let you use your own modelrailroad system as descibed in its documentation. Therefore HANDIG1 does not force you to learn a different notation, even not the system-independent notation (numbering) used by DigiAPI, which is meant for programmers to build software which can be run with different systems.
The command syntax looks somewhat complicated, but most parameters are
optional and once you have set the profile correctly for your
modelrailroad (maybe with trial and error?), you can start HANDIG1 without
commandline parameters.
An alternative is to edit the profile, which uses
the same syntax.
HANDIG1 [port-spec] [switch-range] [contact-range]
port-spec: port assignment and protocol in format: xPy
x - Port number (1 for COM1, etc)
P - indicates this is a port specification
y - Number of the protocol being used.
The numbers are defined by DigiAPI, currently
supported by HANDIG1 (ic DigiAPI)
1 = Märklin Digital
2 = Lenz Digital Plus
4 = Märklin 6023 (TRAIN_ING)
11 = Trix Selectrix
18 = Uhlenbrock Intellibox
switch range: Specification of lowest and highest switch number in the
format xxS yyS
The specification of 'xx' and 'yy' is protocol dependent:
Marklin: lowest and highest switch (1..256)
Lenz: lowest and highest switch number (1..256)
Trix: lowest and highest switch decoder address (0..111)
IB: lowest and highest switch decoder address (1..256)
contact range: Specification of lowest and highest contact in the
format : xxC yyC
The specification of 'xx' and 'yy' is protocol dependent:
Marklin: lowest and highest number of attached S88
feedback unit (1..31)
Lenz: lowest and highest feedback encoder address (0..127)
Trix: lowest and highest feedback encoder address (0..111)
IB: lowest and highest feedback encoder address (1..31)
Two port specifications are accepted.
The first or only specification will be used for commands.
If this is the only port, it will also be used for feedback monitoring,
but if you specify a second port monitoring will take place over the second
port.
The switch and contact specifications come in pairs: the first for the
lower bound, the second for the upper bound.
For Märklin it is sufficient to specify only the number of S88's you
use, since always all S88's are read.
If a file HANDIG.PRO is present in the current directory, the settings of the profile will be processed first, and commandline parameters will override profile settings, see also Profile.
If no profile file is present and no commandline parameters are specified, HANDIG1 defaults to the equivalent of the commandline:
1P1 1P1 1S 256S 1C 4C
Besides top title and bottom lines with general information there are 3 distinctive display areas:
HANDIG1 is exclusively keyboard controlled (no support for mouse or other). The normal cursor is switched off, the currently highlighted or blinking field indicates which component is under control, being either a loc or functiondecoder, or an individual switch.
| Key | Action |
|---|---|
| Up, Down | Jump to line above/below current line |
| Left, Right | Jump to decoder or switch left or right of current switches: with roll over at end of line |
| Tab, Backtab | Jump to adjacent decoder or switch |
| Ins/Del |
|
| PgUp, PgDn |
|
| Ctrl-PgUp/PgDn | Change loc/function decoder-address up or down (for loc-decoders the speed must be zero). |
| Alt-PgUp/PgDn | Clear and redraw the complete screen |
| Home | Jump to first loc/function decoder or first switch |
| End | Jump to last loc/function decoder or last switch |
| Ctrl-Home |
|
| Ctrl-End |
|
| F1..F8 | Jump to (set cursor on) loc or function decoder 1..8 |
| F10, F12 | Terminate program (to be hit twice!) |
| Spacebar |
|
| 0..9 | Compose number of switch to select (after 'Enter'). A prompt message appears just below the switches. |
| F | Switch display of decoder type to Function decoder |
| G | Send 'GO' command even if not in STOP-state, useful after railroad short-circuit etc. |
| L | Switch display of decoder type to Loc decoder |
| BackSpace | When composing a switch number: erase the last entered switch digit |
| Esc | Send 'STOP' command (only when in GO-state) |
| Enter |
|
| (any other) | Beep for invalid key |
Note: Loc-speed changes show steps of about 7% of maximum speed. This corresponds to single step in most cases (14 speed steps decoder), but when a decoder is programmed for 28 steps, it will automatically take 2 steps.
Addresses in the first block are predefined as Loc decoders with addresses 10, 20, .. , 80, but both type and address can be changed. Changes will be saved in the file 'HANDIG.PRO' for next time. A decoder address can only be changed when speed is 0. Loc decoders with 1 auxiliary and 4 extra functions can be controlled by a combination of a Loc and a Function decoder field with the same address, or by altering the decoder type of the specific decoder field.
When you select the same address for decoders of the same type (loc or function), the display fields are 'coupled'. Changes of one decoder will be propagated to corresponding display fields. Uncoupling can only take place when speed is zero or all functions are OFF.
HANDIG1 uses a file HANDIG.PRO to read operational parameter at start, and to store these at termination to be used with the next run without the need to specify commandline parameters then. The profile contains the following information (in this sequence):
HANDIG1 is designed for system tests and on purpose kept simple. Although the underlying support routines are multi-tasking, HANDIG1 itself is a single task and issues commands in the sequence of the related keyboard action. The commands are queued for immediate execution (no delays), but with switch commands HANDIG1 waits approximately 100 msecs after a switch command before issuing the next command. Due to the buffering of keyboard input you may observe a delay between hitting a key and the execution of the related command, especially when using the typamatic feature of the keyboard (for example with Enter-key or Space-bar). So you'll understand that also a 'stop' command (Esc-key) will only be executed after all previous commands have completed!
HANDIG1 is a DOS-only program. It requires a VGA-screen (color preferred). The screen will be used in 34-lines mode, which allows up to 256 switches and 576 feedback contacts to be displayed.
HANDIG1 itself is free, but since it is based on a package DigiAPI (a programmers interface for Digital Model Railroads), the conditions of use of HANDIG1 are 'inherited' from DigiAPI. When you run HANDIG1 without a registration for DigiAPI you'll notice:
| Version | Date | Description |
|---|---|---|
| 0.2 | Sep 1994 |
|
| 0.3 | Oct 1994 |
|
| 0.4 | May 1995 | (multimedia support experiment) |
| 0.5 | Sep 1995 | (end of multimedia experiment) |
| 0.6 | Sep 1996 |
|
| 0.7 | Feb 1997 |
|
| 2.0 | Jul 1998 |
|
| 2.1 | Sep 1998 |
|
| 2.2 | Dec 1998 |
|
| 2.3 | Feb 1999 |
|
| 2.5 | Aug 2004 |
|
HANDIG1 is a sample of the use of the package DigiAPI for Märklin Digital, Lenz Digital Plus, Trix Selectrix and the Uhlenbrock Intellibox (limited). DigiAPI offers a combination of an Application Programming Interface and communication drivers to simplify program development for Digital Modelrailroads. DigiAPI has been tested with C applications only. It may work with other languages if the same (Pascal) calling convention is used. You'll probably find DigiAPI on the same place where you found HANDIG1.
Other useful utilities when you are developing programs yourself for Märklin Digital, EDiTS, Lenz Digital Plus, Trix Selectrix, Uhlenbrock Intellibox and DigiTrax Loconet may be:
Questions, remarks, appraisals and suggestions are welcome!
Please contact me by E-mail:
Rob Hamerling
homepage: http://www.robh.nl/.
Computer controlled modelrailroading is fun! Rob Hamerling.