C80prox Marklin Digital Control Program for PC's

worboys.id.au

C80prox Marklin Digital Control Program for PC's

C80prox

Marklin Digital Control Program for PC’s


C80proxMarklin Digital Control Program for PC’s

Table of Contents

Chapter Page

Contents 2

Introduction 3

Installing C80prox

Setting Up and Starting C80prox

Controlling Locomotives

Controlling Signals and Turnouts

Controlling Train Detectors

Other Commands

C80prox Sequence Editor

Direct Controller

Advanced Topics

Appendix A - Function Carriages 35

Appendix B - Interface Connections and Cabling 36

Appendix C – Sequence Command Summary 37

Version Control

Page 2 Version 1.1 October 16, 2003

3

4

12

15

17

19

23

26

30

39


C80proxMarklin Digital Control Program for PC’s

Introduction

C80prox is a model train layout control program for use with any digital model train

layout based on the Marklin digital system, whether 3 rail AC or 2 rail DC. Computer

interface to the digital system is made by the Marklin digital computer interface Part

No. 6050/6051 or by the Marklin Central Unit Part No. 6023. C80prox also supports

other Digital System using the similar interface to the Marklin Part Number.

Currently C80prox has three modes of operation:

• Terminal Mode: This allows individual commands to be sent to the Digital

Computer Interface to control locomotives, solenoids or train detector

modules.

• Direct Mode: Emulates Keyboards and C80/C80f modules. This mode allows

single keystroke or mouse control of locomotives, solenoid devices or train

detector modules.

• Sequence Control: Using the C80prox ‘language’, up to 3000 commands can

be used as a stored procedure. This mode of operation allows full automatic

control of the Digital System. Sequences may be saved/edited and recalled to

run over and over again. Chaining into other sequences is also possible,

effectively giving C80prox an unlimited number of command steps.

In addition, C80prox provides a simple text editor that allows you to create store

sequences, without the need to exit C80prox.

Installing C80prox

There are no special requirements for the installation of the C80prox program. The

minimum computer configuration needs to be:

RS-232 communication port (COM1)

PC-AT or equivalent IBM clone.

640k of base system memory

Floppy disk drive, 300k Minimum Requirement.

MS-DOS software version. Version 6. recommended.

In addition to the previous list, the operation of the C80prox program can be

enhanced by the addition of an additional RS232 communication port and a 100%

Microsoft compatible mouse as well as a Hard Disk for storage of Sequences. The

current size of C80prox is approximately 500k bytes with all options.

C80prox is usually supplied in a self-extracting archive format called c80vXXX.exe,

where XXX is the version number: i.e.: c80v749.exe is C80prox version 7.4.9. This

archive contains all the necessary files to run C80prox.

• Create a directory on your Hard Disk, ‘\train’ recommended.

C:\>md train.

Page 3 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

• Copy the Distribution file to this directory.

C:\>copy a:c80v749.exe \train

• Change directories to this directory

C:\>cd train

• Extract all files

C:\TRAIN>c80v749.exe

This example assumes that the distribution disk is loaded into Floppy Disk (A:) and

that installation will be made to the Hard Disk (C:).

For IBM compatible computers that don't have a hard disk drive, there is no special

installation procedure, as C80prox will run directly from a floppy disk, once the

archive has been extracted.

Setting Up and Starting C80prox

Setting operational parameters is performed using the SETPRO command.

C:\TRAIN>SetPro

To select the required option on the set up menu, type the highlighted letter of the

option you require to modify. The following menu will be displayed. Selection is

performed by choosing the first letter of the command or by clicking the mouse, if

attached, over the required line. By selecting any of these options, further menus

maybe displayed.

Fig 1. Initial Setup Page

Page 4 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Setting System Parameters

This option allows the user to view and/or change certain operational parameters.

Selection is made by clicking the appropriate line with the mouse or by entering the

highlighted character.

Fig 2. System Parameters

(I)ntercommand Pause:

This allows you to change the pause time between commands as they are sent to the

digital system computer interface. Most interfaces will work with this value set to 2.

This figure will need to be raised if commands set to the digital system interface are

lost due to design flaws in some earlier 6050 interfaces.

(N)umber of Solenoid Devices:

This figure tells how many solenoids are present on the layout. The maximum

solenoid address on the layout should be entered. When C80prox is exited, the

current status of the solenoids are saved to disk. When C80prox is re-entered, the

solenoids will be set to the previous condition. It is recommended that k83/84’s be

addressed in a contiguous range starting from address 0. There is a maximum of 64

k83/84’s units allowed on the Marklin digital system, giving a total of 256 bidirectional

or 512 single direction solenoid devices.

(C)lear Loop Counter (s88):

This parameter sets the number of times a s88 will be read and cleared if a contact is

still set. If after this number of reads, the contact is assumed to be still be engaged.

The digital interface should always clear the s88 using a value of 1, but if you

experience problems with a s88 unit, not engaged, but still reporting a contact set, a

higher figure may be necessary. A higher figure will slow the response to any s88

command.

Page 5 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

(T)rain Detector Modules (s88):

This parameter defines the number of s88 (Marklin Part 6088) units connected to the

interface. Valid range is 0 to 31, giving a total of 496 train detector contacts. Only 4

s88's are supported if you are using a 6023 interface.

(S)equence File Path:

This is the data directory that C80prox will attempt to find layout sequences (SEQ

files). It must be a valid DOS path name. After installation this is automatically set to

the path 'sequence\'. Refer to your DOS manual for a better understanding of DOS

path names.

(P)ort COM1 - COM4:

This parameter defines the communication port on the PC to which the digital

interface is connected. Most IBM PC's have at least 1 COM port, COM1. To use a

Microsoft or compatible serial mouse, 2 COM ports are required. This parameter must

not be set to the same COM port that the mouse is connected. COM3 and COM4 are

not supported due to differing standards on earlier PC’s, but may work in your

environment.

(M)onitor Type:

This parameter defines the type of monitor that is to be used with C80prox. This

parameter is toggled every time that the 'M' key is pressed. Set the parameter

accordingly to the type of monitor connected to your IBM PC. The parameter should

be set to Monochrome if you are using a laptop PC with a LCD screen. Valid types of

monitors are: Monochrome or Colour.

(E)ntry Mode:

This parameter determines the initial operation mode of C80prox. If set for 'Terminal

mode' then commands must be entered into the computer by the keyboard. If set for

'Direct mode', then the initial mode entered emulates a physical 6035 c80 unit as

well as multiple 6040 keyboards. Both modes of operation are still possible as this

parameter only sets the initial mode of operation.

(R)epeat Sensitivity:

This parameter defines to left mouse button repeat speed. Repeat sensitivity is used

when during scroll bar operations. If your mouse seems too responsive, then try

increasing this figure.

Function Keys

This feature allows the modification of the meaning of the function keys F1 TO F9.

F10 is reserved for internal use of the C80prox (emergency halt). To select the

required function key, press its corresponding number i.e.: (1, 2, 3, 4, 5, 6, 7, 8,

and 9). If a function key is not defined the message is displayed. A

special character '


C80proxMarklin Digital Control Program for PC’s

Locomotive Data Base.

Fig 3. Function Key Setup

This allows up to 200 Logical Locomotives to be defined. Each logical locomotive can

have up to 4 Physical Digital addresses attached to represent single/double/triple or

quadruple heading of locomotives using one command. C80prox will only control

locomotives that have been defined. Details that need to be entered for each

locomotive are: Logical Locomotive Number (1 to 200), Up to 4 Digital Addresses (1

to 80), Locomotive Description (33 characters), Default setting for auxiliary function

(on or off), Maximum speed (0 to 14), Acceleration and Braking Inertia. (0 to 99).

The inertia settings are used in conjunction with special commands to simulate either

acceleration or braking inertia.

Page 7 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Fig 4. Locomotive Data Base

In this screen dump, Locomotive 100 has been defined as a double header unit,

comprising of the locomotives with digital addresses 22 and 39. When locomotive

100 is used within C80prox, both 22 and 39 will be addressed as a single unit and

will perform all required functions. Locomotive 200 is a quadruple header unit.

Advanced Settings.

This menu option allows more advanced operational setting to be adjusted.

Fig 5. Advanced Settings

Page 8 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

(N)ulLoco Address:

This defines an unused digital address that does not exist on the current layout. This

null address is used as a internally by C80prox so as to release controlled

locomotives. After the computer interface releases digital addresses, other

C80/C80f’s may control the same locomotive. Possible range is: 0 to 80. If 0 is

selected, then C80prox will attempt to find an appropriate NulLoco Address.

(M)aximum Reverse Speed:

This parameter defines the maximum speed that locomotive can be reversed at. If

you reverse a locomotive at too greater speed, the internal digital components MAY

be destroyed. If is usually safe to leave this figure set for 5.

(C)ommunications:

Determines if commands are sent to the Computer Interface or not. This parameter

MUST be set to Enabled for communications to take place.

(S)equence Colour Scheme:

Defines the colour that a running sequence is displayed in. The requested colour will

be shown.

(A)ctive System:

Defines the currently active system. Future implementations may include other

Digital Control Systems. Current valid system types are:

Marklin 6050/51 or Compatible

• Intellibox P50 mode

(B)its:

This parameter should always be set to a '2' unless you have an older style digital

interface and defines the number of communication stop bits that are sent to the

interface. The parameter is toggled everytime the 'B' key is pressed. Most digital

interfaces work with this parameter set to '2 - Normal' but a few older digital

interfaces will only work set to '1 - Special'.

(D)elay Time (s88):

Defines the time that C80prox will wait for a s88 to complete its download. This

figure will need to be raised on systems that incorporate an 486 or above processor.

The general rule when setting this figure is the lower the better.

(I)gnore Setting Solenoids:

During startup of C80prox, solenoid devices are set according the last known/stored

value. By ignoring these settings, set to Yes, the defined solenoids will not be

physically set to the value store. This MAY result in the graphical representation and

the physical state of solenoid devices to be different. It is highly recommended that

this setting is not changed from its default ‘No’ setting.

Page 9 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Unlock Security Codes

C80prox is not a shareware program. You need to register and purchase your copy.

As distributed, C80prox will only work in a demonstration mode. In this format,

C80prox is freely distributable. When you decide to purchase/register your copy, you

need to contact the author via the method shown in the C80prox demo startup

screen. This option displays your systems Security Signature as well as enabling you

the enter your unlock codes once your copy of C80prox has been registered.

ESCape to DOS

Fig 6. Security / Unlock Codes

This option will exit back to the DOS prompt, saving changes that have been made.

The option of saving or aborting changes to the configuration will be given at this

stage.

Page 10 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Fig 7. Exit to DOS

Page 11 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Controlling Locomotives

The following commands can be used in Terminal Mode to control locomotives that

have a c80, c81, c90 or equivalent digital locomotive decoder installed. They may

also be used when creating and running a sequence via the C80prox Editor. Up to

200 locomotives combinations can be defined either as single, double, triple or

quadruple heading.

Locomotive Control

This command will start, stop or reverse a locomotive. The general format of this

command is:

l {ll} g {ss}

where {ll} is the loco number (1 to 200) and {ss} is the required speed of the

locomotive (0 to 15). The speed of the locomotive is defined as:

speed 0 - stop see 's' command

1-14 - move at speed 1-14

15 - reverse locomotive see 'r' command

Auxiliary function is manipulated by the 'f', 'fe' and 'fd' commands.

Accelerate Locomotive

This command will accelerate a locomotive with inertia. The general format of this

command is:

l {ll} a {ss}

where {ll} is the locomotive number (1 to 200) and {ss} is the final speed that the

locomotive will obtain (0 to 14). The rate of acceleration of each locomotive is

defined in set up but can be modified by the 'sa' command. If {ss} is not specified,

the locomotive will be accelerated to its maximum defined speed.

Brake Locomotive

This command will decelerate (brake) a locomotive with inertia. The general format

of this command is:

l {ll} b {ss}

where {ll} is the locomotive number (1 to 200) and {ss} is the final speed that the

locomotive will obtain (0 to 14). The rate of braking inertia is defined in set up but

can be modified by the 'sb' command. If {ss} is not specified, the locomotive will be

decelerated to a stop.

Reversing a Locomotive

This command is used to reverse a locomotive. The general format of this command

is:

Page 12 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

r {ll}

where {ll} is the locomotive number (1 to 200). The status of the auxiliary function

is unchanged. The locomotive will continue at it's previous speed but in reverse. It is

advised, however, not to reverse moving locomotives as the digital decoder can be

damaged. If the speed of the locomotive is greater than speed '5' then this command

will terminate with a bad status, and the locomotive is not reversed.

Stopping a Locomotive

This command is used to stop a locomotive. The general format of this command is:

s {ll}

where {ll} is the locomotive number (1 to 200). The status of the auxiliary function

is unchanged. The locomotive will stop with no braking inertia.

Auxiliary Functions

These commands are used to change the auxiliary function of any locomotive. The

general format is:

f {ll} e

f {ll} d

f {ll}

where {ll} is the locomotive number (1 to 200). The 'fe' command will enable the

auxiliary function of the locomotive, independent of its current status. The 'fd' with

disable the auxiliary function of the locomotive , independent of its current status.

The 'f' command will toggle the status of the auxiliary function of the locomotive.

Operating Function Carriages

This command will operate digital function carriages (ie: 4999 Dome Vista Car or

4998 Dance Car). The general format of this command is:

f {aa} c {cc}

where {aa} is the carriage address (1 to 200) and {cc} is a number representing a

combination of possible functions as defined below.

{cc} Function {cc} Function

0 All Off 8 F4

1 F1 9 F4, F1

2 F2 10 F4, F2

3 F2, F1 11 F4, F2, F1

4 F3 12 F4, F3

5 F3, F1 13 F4, F3, F1

6 F3, F2 14 F4, F3, F2

7 F3, F2, F1 15 All On

Page 13 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Certain combinations of functions may be invalid. See function carriage

documentation for possible valid combinations. Appendix 'A' contains documentation

for Marklin carriages. This command is also used to operate locomotive decoders that

have the 4 additional functions built in.

Setting Locomotive Maximum Speed

This command is used to set the maximum speed for each defined locomotive. The

general format is:

s {ll} m {ss}

where {ll} is the locomotive number (1 to 200) and {ss} is the maximum speed that

the locomotive will travel at (0 to 14). If set for '0' then the locomotive can never be

moved. A locomotives initial maximum speed is assigned using set up but can be

modified by the 'sm' command.

Setting Acceleration and Braking Inertia

These commands are used to set the rate of acceleration for each locomotive. The

general format is:

s {ll} a {vv}

s {ll} b {vv}

where {ll} is the locomotive number and {vv} is the inertia value (1 to 99). The

default inertia value for each locomotive is assigned using set up. The 'sa' is used to

set the acceleration inertia, while the 'sb' command is used to set the braking

inertia. The larger the inertia value, the longer it will take for the locomotive to

acquire the new speed.

Displaying Locomotive Status

This command is used to display the current status of all defined locomotives.

Information that is displayed includes, locomotive number, digital addresses, main

auxiliary function status, description, maximum speed, acceleration and braking

inertia and current speed. The general format is:

ls

Locomotives controlled by any attached Control 80 style controller may have

incorrect values displayed.

Page 14 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Controlling Signals and Turnouts

These commands are used to control hardware modules connected to the Marklin

digital system. They include commands to control k83, K84 and k87 solenoid

modules. They can be used either in Terminal Mode or when creating and running a

sequence using the C80prox Editor.

Solenoid Control

These commands will change the direction of a set of points or change a signal from

red to green. The general format of these commands are:

m {sss} r {tt}

m {sss} g {tt}

m {sss}

where {sss} is any valid solenoid address in the range (1 to 256). The 'mr'

command is used to change points to a 'branch' condition or a signal to 'stop'. The

'mg' command is used to change points to a 'main line' condition or a signal to

'proceed'. If the 'm' command is used, then the status of the selected solenoid will

be reversed. If {tt} is specified, the solenoid will be activated for {tt} deciseconds.

The {tt} parameter need only be supplied for use with uncoupler tracks. Valid range

of {tt} is 1 to 99. (9.9 seconds).

Displaying Solenoid Status

This command displays the current status for all defined solenoids. The general

format of this command is:

ms

After the current session of C80prox is finished, solenoid status' are saved to an

external DOS file. When C80prox is entered again, the solenoids are set according to

these saved values. Solenoids controlled by an attached keyboard or memory unit

may have an incorrect value.

Solenoid Routes

The following commands can be used to group solenoid commands together into one

command. They are used to sequentially set multiple solenoids or turnouts to a

defined condition. Routes are saved when C80prox is exited and restored when

C80prox is re-entered. The only commands that will work in a route are the solenoid

commands 'mg' and 'mr' and 'x' commands. Up to 200 routes may be defined in

this manner.

Listing Solenoid Routes

This command will display all of the defined solenoid routes currently set. It's general

format is:

lm

Page 15 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Editing a Solenoid Route

This command allows you to enter, delete or modify a route. It's general format is:

e m {nn}

where {nn} is the route to edit in the range (0 to 199). The C80prox editor will be

entered to allow modification of the requested route. There is no need to save the

route from within the editor before exiting the editor unless you want to save the

route as a sequence (.SEQ) file.

Executing a Solenoid Route

This command is used to execute a defined route. Its general format is:

x {mm}

where {mm} is the route number (0 to 199). Commands contained within the route

will be performed sequentially. As already specified, the only commands that are

valid with a route are the 'mr', 'mg' and 'x' commands. If the 'x' command is

encountered, the currently executing route will terminate and the specified route will

commence from the first line.

Page 16 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Controlling Train Detectors

The following commands are used to read train detector modules (Marklin Part No.

6088). They can be used in Terminal Mode and also used when creating and

running a sequence using the C80prox Editor. They include commands to read s88

contact modules (s88).

Read S88 Detector Module (TDM)

These commands will read a train detector module and wait until a train has been

detected or is not detected. Their general format is:

r {mm} k {kk}

k {kk}

r {mm} w {kk}

w {kk}

where {mm} is a valid module number (1 to 31) and {kk} is a contact number in

the range (1 to 16) that exists on that module. To interrupt this wait, the ESC key

can be pressed. This will cause a layout sequence to stop running, and return you to

TERMINAL MODE. Before the module is read, its contents is cleared so any past

detection’s will be lost. After the module is read, its current values will be erased.

The 'k' command will read a relative contact number from 1 to 496. Contacts 1-16

being on the first s88 module, 17-32 on the second etc. These commands will erase

the contents of the defined s88 module. The 'rw' and 'w' commands perform exactly

the same functions as the 'rk' and 'k' commands, except they will wait until a train

is NOT detected on the defined contact.

Reading a TDM and Storing Results

This command will read a s88 module and store the status of the 16 contacts in

program flags. The general format is:

r m {mm}

where {mm} is the module number (1 to 31). Program flags 0 to 16 are used. The

s88 module is not erased. See advanced section for program flag information.

Program flag '0' is set if an error was encountered reading the specified module.

Clearing a TDM

This command will attempt to clear a TDM. Its general format is:

c m {mm}

where {mm} is the module number (1 to 31). The contents of the s88 module

specified is erased. A contact on a module cannot be cleared if the contact is

engaged.

Displaying a TDM Contents

This command displays the current status of contacts attached to a s88 module. The

Page 17 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

general format is:

d m {mm}

where {mm} is the module number (1 to 31). The display will continually update

until an ESC key is pressed. The contents of the module will be erased after each

read. If {mm} is not specified, all defined TDM's will be displayed.

Page 18 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Other Commands

Most of these commands can be used in Terminal Mode or used when creating and

running a sequence using the C80prox Editor.

Sleep Function

This command will sleep for the specified number of seconds. The general format of

this command is:

z {tt}

p {tt}

p w

where {tt} is the number of seconds to sleep (1 to 99). When used in a layout

sequence, the sleep command can be used to wait a few seconds before the next

command is issued. The sleep function can be interrupted by pressing the ESC key.

Control will then pass back to TERMINAL MODE. The 'p' command functions the

same as the 'z' command except that {tt} defines the number of 1/10th second

intervals to sleep. The 'pw' command will pause and wait for any key to be pressed

before continuing.

Goto Function

This command is used to start a layout sequence from the specified label. The

general format of this command is:

g {ll}

where {ll} is a valid label within the layout sequence. If {ll} is not specified in

TERMINAL MODE, execution will start at the first statement in the sequence. While a

sequence is running, there are two keys that can be pressed. These keys are

• 'F10 - emergency stop'

• 'ESC - quit to terminal mode'

A statement label must be used as a argument to a 'g' command. Statement labels

are defined by placing a ':' after a numeric label between 1 and 1000. An example of

this style of branching is as follows:

1: 10:

2: ..

3: ..

4: ..

5: g 10

Branching Randomly Within a Sequence

This command is used as a random multi-way goto function. The general format of

this command is:

g r {b}

Page 19 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

where {b} is any value (1 to 99). Consider the following example:

1: g r 3

2: g 5

3: g 15

4: g 25

When the above is executed, a random number will be generated between 1 and 3. A

branch forward by this random number of steps will be taken. The statements at

these locations should be a 'g' command, as in the above example, but may be any

other valid command.

Go Forward or Backward with a Sequence

Two instructions exist to allow relative jumping in a sequence. Their format is:

g f {cc}

g b {cc}

where {cc} is the number of program steps to jump forward, 'gf' command, or jump

back, 'gb' command. ie:

1: ! this is line 1 of a sequence

2: g f 2

3: ...

4: l 80 g 8


C80proxMarklin Digital Control Program for PC’s

Commenting a Sequence

This command is used to comment a sequence. Its general format is:

! this is a comment and is ignored

The '!' must be the first character on a line. The '*' character is a synonym for the

'!' character.

Quitting from a Sequence and from C80prox

This command is used to quit from a running sequence or to leave C80prox and

return to DOS. The general format is:

q, ex

These commands are used in Terminal Mode to exit C80prox. Solenoid status' and

routes are saved to external files. They are also used within a sequence to end that

sequence, in which case control will pass back to TERMINAL MODE.

Displaying available Sequences

This command is used to display layout sequences on the current disk. The general

format of this command is:

di

Loading a Sequence

This command is used to load a layout sequence from disk. The general format of the

command is:

l

A DOS filename is required to be entered at the 'filename' prompt. This filename

must be a valid DOS filename. Layout sequences are denoted on a DOS 'dir' by

having a extension of '.SEQ'. After the sequence has been loaded into memory, it

may be changed via the C80prox editor or run by using the 'g' command.

Entering the C80prox Editor

This command is used to enter the C80prox editor. The general format of this

command is as follows:

e

See C80prox editor for description of the editor commands.

Help

This command will return simplified help to the screen. The general format of this

command is:

Page 21 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

?

To return to C80prox from any page of help, press the ESC key.

Emergency Stop

This command will toggle the operating environment from STOP to START or from

START to STOP. The general format of this command is:

F10 or \

The new operating environment will be displayed. When in a STOP condition, the LED

on the central unit will be extinguished. No commands can be sent to the interface

until this condition is reversed. The '\' can be used in a sequence to generate an

emergency stop.

Direct Control

This command allows easy control of locomotives and solenoid devices. The general

format of this command is:

dc

See DIRECT CONTROLLER section for 'dc' commands.

Changing the Default Sequence Directory

This command is used to change the default sequence directory that the sequence

files are stored. Its general format is:

cd

The current DOS pathname for the sequence directory is displayed. A new pathname

may be entered. If a [Enter] is pressed in response to the new pathname, no change

is performed.

Page 22 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

C80prox Editor Command Set

The following commands are supported in the C80prox editor. They are used to

modify, add and delete lines in a layout sequence. On the left of the C80prox editor

screen, the layout sequence will be displayed starting from line 1. C80prox editor

commands will act upon the currently selected line which is highlighted. The C80prox

editor will display as many lines as possible on either side of the current line. The

editor has 3 modes of operation identified by the , ,

prompts on the bottom status line. Commands may be entered in upper or lower

case. If a mouse is connected to the computer, it can be used as a positioning tool

within the editor and to access the standard pull down menus along the top of the

screen.

Selecting the Current Editor Line

These keys are used to change the currently selected line. The general format of

these commands are:

Home Up

End Dn, [Enter]

g Pg Up

Pg Dn

When entered in mode, the current line is changed depending on the key

used. The 'g' key will ask for the line number to select and position the pointer to

that line. The 'Home' key will position the pointer to the top of the sequence and the

'End' key will position the pointer to the end of the sequence. The 'Dn' and [Enter]

keys will increment the pointer by 1, whilst the 'Up' key will decrement the line

pointer by 1. The keys 'Pg Dn' and 'Pg Up' will increment and decrement the line

pointer by 20 lines respectively. The right hand scroll bars can allow fast movement

around the sequence by placing the mouse cursor over an appropriate part of the

scroll bar and clicking the left button.

Inserting New Lines

The general format of the insert command is:

Ins

The C80prox editor will change into mode. New commands will be entered

after the currently selected line. C80prox editor mode is exited by typing a

single [Enter] on a new line.

Deleting a Line

The general format of the delete command is:

Del, Y

The currently selected line will be deleted. All following lines will be shuffled upwards.

The Y is used to be compatible with some PC based word processors.

Page 23 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Replacing a Line

The general format of the replace command is:

r

When selected, mode is entered. The currently selected line can be

replaced with the new command. If a [Enter] is entered as the new command, no

replacement takes place.

Clearing Sequence Memory

The general format of this command is:

n

It is used to clear the sequence memory. There will be no lines left in the sequence.

A warning will be given before the sequence will be cleared.

Leaving the C80prox Editor.

The general format of this command is:

ESC

This command is used to leave EDIT mode to return to TERMINAL MODE. If the

current sequence has not been saved to a disk file, you will be warned that it has not

been saved.

C80prox Editor Help.

This command will display EDITOR specific help. Its format is:

?

Help is also available by clicking the left mouse button on the Help heading found

on the pull down menu bar at the top of the screen.

Saving and Loading a Layout Sequence

Sequences can be saved to an external DOS file or loaded from a DOS file by using

the following commands.

a

s

l

The 's' command will perform a immediate write to the filename shown on the status

line. The 'a' command will write the file to a specified filename. This filename must

be a valid DOS filename. The 'l' command is used to load a previous saved layout

sequence from disk.

Page 24 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

The 'n', 'a', 's', 'l' and 'esc' can also be found on the pull down menu bar under the

File heading. This is accessed either by click the left mouse button on the File menu

or by using the ALT + F key sequence.

Printing a Sequence to a Printer

A sequence can be printer by selecting the print command from the 'File' pull down

menu bar , or by using the 'p' print command. A range of sequence line numbers

can be given so partial printing of the sequence is possible.

Finding Text within a Sequence

To find a specified string of characters within a sequence, the following commands

are used.

'f'

'e'

The 'f' command with search for a specified string, that must be entered, whilst the

'e' command will repeat the last search.

The 'f' and 'e' can also be found on the pull down menu bar under the 'Search'

heading. This is accessed either by clicking the left mouse button on the Search

menu or by using the ALT + S key sequence.

Page 25 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Direct Controller

Direct Controller is entered by using the 'dc' command from TERMINAL MODE. Direct

control allows single character commands to be entered to control all aspects of the

Marklin digital system. A mouse can be used as an alternative to all commands,

however, some commands can only be accessed by the use of the mouse. This

requires the positioning of the mouse cursor over a selected part of the screen and

pressing the left mouse button.

Shown below is the screen that is displayed when you enter direct controller.

Fig 8. C80prox Direct Mode Screen

Available direct control commands can be categorised into 3 major groups:

• Locomotive Control Commands (bottom portion of screen)

• Solenoid Control Commands (Turnouts/Signals and Uncouplers, top portion

of screen)

• General Commands. (bottom command line and embedded control buttons)

Locomotive Commands

Commands for Locomotives are performed on the currently displayed locomotive in

the Locomotive Status Window.

Reversing Locomotives.

Page 26 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

A locomotive may be reversed by clicking the mouse on the < Reverse Locomotive >

Button. The Button will change colour whilst the locomotive is being reversed.

Keyboard Command is ‘r’.

Stopping Locomotives.

Locomotives may be stopped by clicking the mouse on the [ STOP ] button that is

positioned just to the right of the locomotive speed bar or by click on the first speed

bar indent. Keyboard Command is ‘s’.

Auxiliary Functions.

Auxiliary functions may be turned on or off by clicking the mouse on the < Auxiliary

Function > button or the [ ] Main check box. The current status of the auxiliary

function is reversed. If the function has been enabled, the [ ] Main check box will be

checked. The four additional functions found on some decoders may be toggled by

clicking the mouse on the [ ] f1, [ ] f2, [ ] f3 or [ ] f4 check boxes. These check

boxes will be checked if the appropriate function is enabled. Keyboard commands are

‘f’ for main function and ‘ to ‘ for the additional functions.

Increasing and Decreasing Locomotive Speed.

The currently displayed locomotives speed may be varied by clicking the mouse on

the left or right hand arrow that is positioned next to the locomotive speed bar. The

speed of the locomotive will be decreased or increased in steps of 1. The speed bar

has 15 distinct settings (0 to 14) and an immediate change of speed may be made

by clicking on the appropriate position on the speed bar, noting however, that there

will be no automatic acceleration or deceleration of the locomotive using its stored

inertia values. If the locomotive maximum speed is reached, it current speed will

flash. Keyboard commands are: ‘+’ or ‘=‘ to increase the speed by 1, ‘-’ or ‘_’ to

decrease the speed by 1.

Selecting a Different Locomotive Number.

There are many methods to select the default locomotive. By clicking on the

Locomotive Description field of the Locomotive Status window a selection box of

locomotives will be displayed. Using the mouse, you may transverse the displayed

locomotives until the correct number is found. The mouse can be used to select or

cancel from this operation. Keyboard commands are: ‘n’ to display the selection box

and TAB, arrow keys to transverse the selection box.

Locomotives can also be selected by using the scroll bar on the left side of the

Functions Box. By using the mouse, you can move up or down in the list of

locomotives. The up or down arrow will navigate to the next or previous locomotive

in the list. Keyboard commands are Up Arrow or Down Arrow.

Below the < Reverse Locomotive > button is displayed six buttons depicting the last

six locomotives that have been accessed by direct controller. By clicking the mouse

on any of these buttons, the selected locomotive will become the active locomotive.

If there are less than six locomotives defined, then some of these buttons will not be

activated. There is no keyboard commands that allow access to these locomotives.

Page 27 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Locomotives can also be selected by name. The < Search > and < aGain> buttons

are used to located a string of characters within the locomotive data base. The <

Search > button will display a dialogue box requesting the character string to search

for, whilst the < aGain> button will perform the locate using the last used search

string. If there is no last search string, the < aGain > button will behave the same as

the < Search > button. Keyboard commands are: ALT + S for searching and ALT +

G for performing the search again.

Locomotive Status

A complete list of locomotive status’s can be displayed by clicking on the View

Locos button on the bottom line of the display. This will display the identical

information as the ‘ls’ command that can be issued from terminal mode.

Solenoid Commands

Commands for Solenoid Devices are performed on the group of 128 addresses that

are shown in the Solenoid status screen of the Direct Controller.

Changing Solenoid Status

To toggle any displayed solenoid address from red to green or from green to red,

position the mouse cursor over the required solenoid address in the top half of the

screen (1 to 128, 129 to 256) and click the mouse.

The displayed solenoid addresses in the 'dc' window may also be changed by either

pressing the keyboard keys 1 to 0 or by clicking the mouse when the mouse cursor

is positioned over the required solenoid address.

The Left and Right keys are used to select the next or previous 10 solenoid

devices. The mouse can emulate these keys by positioning the mouse cursor over

the appropriate arrows that are positioned near to this display.

Selecting more than 128 solenoid devices.

To select a different range of solenoid addresses, either use the keyboard and type

ALT + M or position the mouse cursor over < More > button and click the mouse.

This command will toggle the display between 1 - 128 and 129 - 256.

Solenoid Routes

Solenoid routes are used in direct mode by pressing 'x' or by positioning and

clicking the mouse over 'eXecute' on the status line. This displays a list of available

routes. This list is navigated by either pressing the Up and Down arrow keys and

pressing [Enter] when the correct route is displayed. The ESC key is used to exit

this display if no action is required. The route can also be run by positioning and

clicking the mouse cursor on the required route. The mouse can also be used to ESC

from the list by clicking on < Cancel >. Additional pages are displayed by clicking on

< PgUp > or < PgDn >.

Leaving Direct Controller

To leave Direct Controller use the close down button located at the top left hand side

Page 28 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

of the screen ie: [*]. The equivalent keyboard command is the ESC key.

Direct Controller Help

Help may be obtained at anytime by selecting the help ? button on the bottom

status line. The equivalent keyboard command is the ‘?’ key.

Processing Terminal Commands

Most terminal commands can be processed by selecting the Terminal button on the

bottom status line. A dialogue box will be displayed so a valid terminal command can

be entered and processed. Keyboard equivalent is the ‘t’ key.

Redrawing the Direct Controller Screen

If the direct controller screen becomes corrupted, it may be redrawn by clicking on

the very top line of the screen. The keyboard equivalent is the ‘u’ key.

Displaying Flag Status

Flags and registers can be displayed by clicking on the flaGs button of the bottom

status line. The keyboard equivalent is the ‘g’ key. See the ‘fs’ command.

Displaying Track Detector Modules.

The current status of all train detector modules can be obtained by clicking on tDms

on the bottom status line or by using the keyboard command ‘d’. See the ‘dm’

command.

Reinitialising a 6023 Controller

To attempt to reinitialise a 6023 controller, click on the < Reset > button that is

found in the Commands portion of the Locomotive Status screen. The keyboard

equivalent of this command is the ‘I’ key. This button will only be displayed and the

‘I’ command is only valid if a 6023 controller has been defined in setpro.

Emergency Stop

A emergency stop is accessed 3 ways. By pressing the '\' or 'F10' function key or by

clicking the mouse on the [*] button found at the top of the locomotive area.

Page 29 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Advanced Topics

Registers

C80prox contains 60 arithmetic registers set up as 20 groups, (0 to 19). Each group

of registers contain a 'a' and 'b'. Only 1 register pair can be active at a time. This

register pair is pointed to by the register pointer. Both registers can be loaded with

data, incremented, decremented and tested using the flags as previously described.

a {r} = {v}

b {r} = {v}

These 2 commands will stored the required data {v} into the register {r}. Each

command does not affect the other register in the group. The register pointer is

changed to register pair {r}, and these registers become the currently active group.

a {r} + {v}

b {r} + {v}

a {r} - {v}

b {r} - {v}

These commands will increment {+} or decrement {-} register {r} by a value {v}.

Each command does not affect the other register in the group. The register pointer is

changed to register group {r} and these registers become the currently select active

group. The register number {r} must be specified, but if {v} is not, 1 is assumed.

r = {r}

This command will change the register pointer to {r}. Register pairs {r} will then

become the currently active pair. Note: Flags 17 and 18, as discussed above, will

always reflect the currently active register pair. The range of values that can be

stored in registers is from 0 to 999.

Flags

C80prox has 100 semaphore flags (20 system, 80 user). These flags are either set

'1' or not set '0'. C80prox contains specific instructions on setting, resetting,

toggling and testing these flags. i.e.:

Command Example Meaning

s f 67 set flag 67 (make flag 67 a '1')

r f 89 reset flag 67 (make flag 89 a '0')

t f 76 toggle current status of flag 76

c 32 f 34 copy flag 32 to flag 34

t 99 g 12 test flag 99 and if set goto label 12 in the current sequence

t 99 s 13 test flag 99 and if set gosub to label 13 in the current

sequence

n 99 g 12 test flag 99 and if NOT set goto label 12 in the current

sequence

n 99 s 13 test flag 99 and if NOT set gosub to label 13 in the current

sequence

fs display the current setting of all flags

Page 30 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

System Flags

Contained within these 100 flags, the first twenty, 0 to 19, should not be used for

setting, resetting, toggling or being copied to. They can however be copied and

tested, using the 'cf' and 'tg' commands.

Flag Meaning

0 Set if error condition was detected on the last S88 read

1 – 16 Result of Last S88 read. If Flag 0 set, then these settings maybe in

error.

17 Set if the currently active a & b register set are NOT equal

18 Set if the currently active a register is NOT zero

19 Set if the last clear S88 module command detected that at least 1

contact is still active

Indirect Flag

A special indirect flag 100 is used to indirectly access any of the other flags (0 to

99). The contents of the currently active 'a' register is used as the actual flag

number. ie: if the currently active 'a' register contains the value 42, then the

following commands are equivalent:

s f 100

s f 42

Multiple Heading of Locomotives

C80prox allows the definition of up to 200 locomotive consists. Each logical

locomotive number (1 to 200) can be assigned up to 4 different physical digital

addresses. When controlling this logical locomotive, all associated digital addresses

will be addressed and classified into one unit. For example: Logical Locomotive #137

has the three physical digital addresses, 17, 18 and 19 set.

Locomotive Number Addr1 Addr2 Addr3 Addr4

137 17 18 19

Locomotive 137 has been set up as a triple header consist. Digital addresses 17, 18

and 19 have been linked together. When C80prox controls locomotive #137, then

the physical locomotives 17, 18 and 19, will act accordingly.

Other logical locomotives can still be defined using the address 17, 18 or 19, either

as single, double or quad heading consists. Individual digital addresses may be

defined in any number of logical locomotives.

You set up single/double/triple or quad header locomotives by using the c80prox set

up program ‘SetPro’. Redefinition’s can be made from within C80prox or sequence.

There are 8 commands to define or redefine multiple header locomotives.

m {l} a {a} i

m {l} b {a} i

Page 31 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

m {l} c {a} i

m {l} d {a} i

where {l} is the logical locomotive (1 to 200) and {a} is the digital address (0 to

80). If the digital address of 0 is used, the requested address is deleted. The ‘i’

command is used the insert a new locomotive digital address into the list and should

only be used when inserting. Examples:

Using Logical Locomotive #137. It is currently defines as having addresses 18, 19

and 20 attached to it.

Command Loco #1 (a) Loco #2 (b Loco #3 (c Loco #4 (d

Initial Setting 18 19 20

M137c17 18 19 17

M137b0 18 17

M137b19i 18 19 17

M137a20i 20 18 19 17

Other special Locomotive Address

C80prox will always remember which locomotive that was last used by it. If

locomotive number of '0' is used, then this last used locomotive number will be

controlled. The 'ls' command will highlight which of the defined locomotives is the

last locomotive used.

l17g8

l0g14

In this example. locomotive 17 will be started to speed 8, then speed 14. Note: The

numeral '0' does not need to be specified. In any locomotive command, if the

locomotive number is omitted, then '0' will be used.

Indirect Solenoid Address

C80prox allows the use of indirect solenoid device addresses. The solenoid number

that will be controlled is defined by the currently active 'a' register. When the 'a'

register is loaded with the solenoid number, solenoid address '257' is used to control

this defined solenoid. ie:

a6=13

m257g

In this example, solenoid 13 will be set to a green condition.

Transmitting Data Direct to Interface

C80prox allows the user to send specific commands to the digital interface. A

complete understanding of the programming of the digital interface is required to

effectively use this command. Be warned that certain sequences of this command

can cause damage to certain digital components. It should be used with extreme

caution. It is used in very advanced programming techniques. The command is the

Page 32 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

'tx' command and is used as follows:

tx {aaa}

where {aaa} is the decimal character that is to be sent to the digital interface. ie:

tx 186

will transmit character 186 to the digital system interface.

Further Decision Making Instruction

The following command can be used to make decisions based on the contents of the

currently selected register pair. The general format is:

ds

This instruction will decrement the currently selected A register, then if the A register

is non zero proceed to the next instruction in the sequence. If after the register is

decremented the result is zero, the next instruction is skipped, the sequence passing

to the current line + 2. ie:

10:

a3=3

ds

g 10

q

In this example, the loop 10: --> g 10 will be performed 3 times.

Advanced Reading of TDM's

An instruction exists that allows the reading of all defined s88 TDM's. Special flags

have been incorporated into the C80prox program. These flags are numbered 1001

to 1496. They represent the 496 possible contacts that can be connected to the

Marklin digital system. The general format of this command is:

rm0

When the 'rm0' command is issued, all defined s88 modules (See set up

procedures), will download their contents. The current status of any of the defined

contacts can be tested using the semaphore flag instruction 'tg' as discussed at the

beginning of this advanced section. The possible flag range therefore for the 'tg'

command is expanded to include flags 1001 to 1496.

Alternate Configuration File

An alternate configuration file can be used by selecting the "/c:" switch on the

command line when C80prox or Setpro is invoked:

ie: C:\TRAIN>c80prox /c:myconfg

C:\TRAIN>setpro /c:myconfg

Page 33 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

will invoke c80prox or setpro using the configuration found in myconfg file. The "/c:"

switch must be the last item on the command line. The setpro program also uses this

switch to build and edit this alternate configuration. If the "/c:" switch is not

specified, c80prox and setpro will default to the standard configuration file, "c80pro".

The DOS extension of ".INI" does not need to be entered.

Locomotive Speed Mapping

The Marklin Motorola Digital System defines 15 physical speed settings, 0 to 14.

C80prox gives you the ability to modify the speed settings for locomotives when

under computer control. By editing the DOS file ‘c80speed.ini’ in the main C80prox

directory this can be achieved. The format of this file is as follows:

Addr1,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14

Addr2,s1,s2,s3,s4,s5,s6,s7,s8,s9,s19,s11,s12,s13,s14

Each line in the ‘c80speed.ini’ file MUST contain exactly 15 entries. The first entry is

the Digital Address of the locomotive and the remaining 14 entries define the speed

mapping for that address. You cannot map speed 0. Example

Line 1: 63,3,3,3,4,5,6,7,8,9,10,11,12,12,12

Here locomotive address 63 will have the following speed map:

0 = 0, 1= 3, 2 = 3, 3 = 3, 4 = 4, 5 = 5, 6 =6, 7 = 7, 8 = 8, 9 = 9, 10 = 10, 11 =

11, 12 = 12, 13 = 12

and 14 = 12.

Page 34 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Appendix A

Marklin Part No. 4999 Digital Vista Dome Car with Functions

The digital vista dome car is equipped with a permanent built-in function module. It

can be operated from the C80prox program using the address "10", with the "fc"

command. The following function can be switched by remote control.

Function Meaning

F1 Waiter moves forward

F2 Waiter moves in reverse

F3 Turn table lamps on/off

F4 Turn compartment ceiling lights on/off

These functions can be activated either when the car is moving or standing still, as

long as it is being operated on the Digital system.

Marklin Part No. 4998 Digital Dance Car with Functions

The digital dance car is equipped with a permanent built-in function module. It can

be operated from the C80prox program using the address "20", with the "fc"

command. The following function can be switched by remote control.

Function Meaning

F1 Turn ceiling lights on/off

F2 Couples start/stop to whirl around the dance floor

F3 Start/Stop Music

Latin Rock

Boogie

Tango

Tales from the Vienna Woods (Waltz)

Rock ‘n’ Roll

Aura Lee

F4 Select next piece of music

These functions can be activated either when the car is moving or standing still, as

long as it is being operated on the Digital system.

Page 35 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Appendix B

Cabling Requirements for use with C80prox

The following cable should be constructed to connect the IBM PC or compatible

system with the digital computer interface.

605x DIN Signal Name IBM DB 9F IBM DB 25F

1 Receive Data 3 2

2 Not Used

3 Ground/Common 5 7

4 Transmit Data 2 3

5 Ready/Busy 8 5

There are 4 encoding switches on the rear of the Interface. These must be set for

correct use with a IBM PC or compatible. Switches 1 & 2 are up and Switches 3 & 4

are down.

Page 36 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Appendix C

Sequence Command Summary

Locomotive Commands

Command Desciption

l g Control

l a Accelerate

l b Brake

r Reverse

s Stop

f e Auxiliary Function Enable

f d Auxiliary Fucntion Disable

f c Operate Function Carriages

s m Set maximum speed

s a Set acceleration inertia

s b Set braking inertia

m a Build a Multi Header Loco

m b Build a Multi Header Loco

m c Build a Multi Header Loco

m d Build a Multi Header Loco

Solenoid Controls

Command Description

m Toggle Solenoid

m g Force solenoid to green

m r Force solenoid to red

x Execute Solenoid Macro

Train Detectors

Command Description

r k Wait for train detected

k Wait for train detected

r w Wait for train NOT detected

w Wait for train NOT detected

r m Read and store s88 module

c m Clear a s88 module

Page 37 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Other Commands

Command Description

z Sleep

p Sleep

p w Wait for key press

g Goto

g r Goto Random

g f Go forward

g b Go back

g d Go direct to statement line

g s Go subroutine

r t Return from subroutine

! Comment

q Quit sequence

a = Set A register

b = Set B register

a + Increment A register

a - Decrement A register

b + Increment B register

b - Decrement B register

r = Change register pair

s f Set flag

r f Reset flag

t f Toggle flag

t g Test flag and goto Label

t s Test flag and go subroutine

n g Test flag and if NOT set goto Label

n s Test flag and if NOT set go subroutine

t x Transmit directly to interface

d s Decrement A register and skip if not zero

Page 38 Version 1.1 October 16, 2003


C80proxMarklin Digital Control Program for PC’s

Version Control

Date Version Author Description

8 th September 2003 1.0 Peter Worboys Initial Word Document Version

16 th October 2003 1.1 Peter Worboys PDF Version and minor typographical errors corrected

Page 39 Version 1.1 October 16, 2003

More magazines by this user
Similar magazines