Content-Type: multipart/related; start=; boundary=----------Y8sU7yoPmlRplEH9zL6Ph0 Content-Location: http://www.marklin.com/tech/digital1/components/6051.html Subject: =?utf-8?Q?M=C3=A4rklin=20Trains:?= MIME-Version: 1.0 ------------Y8sU7yoPmlRplEH9zL6Ph0 Content-Disposition: inline; filename=6051.html Content-Type: text/html; name=6051.html Content-ID: Content-Location: http://www.marklin.com/tech/digital1/components/6051.html Content-Transfer-Encoding: Quoted-Printable



Retail StoreLocator™
(Where to Buy)


3D""
 

Product Data
Bank Search



New Items

=

American Prototypes

Systems and Software


Sc= ales


H0

Z

MAXI/1 Gauge


= Getting Started


H0 St= arter Sets

H0 Track E= xtension Sets

Digital Sta= rter Sets

Z Gauge Starter Sets<= /SPAN>

Z Gauge Track Extensio= n Sets

1 Gauge Starter Se= ts

3D""


DELTA / Digital
Multi-train Control



<= span CLASS=3D"menu_white">Märklin Club / Digital Club
=


Märklin
Catalo= g



Technical
= Resource Center



= Shows/
Events/
Special Projects



How to
Become a Dealer



140 Years
of Märklin
<= /SPAN>


=
TRC >> Märklin Digital Interface

The Märklin Digital Interface is the link between a computer and the Märklin system. Using serial interface connections, the computer can send commands to the interface, thereby simulating all the functions of the Control 80F and Keyboard units. Therefore, any computer with a serial interface can be used to control all locomotives, as well as solenoid-operated accessories (switches, signals, etc.). Two types of Interfaces have been available: 1) the 6051 Interface attaches to any of the digital systems, and 2) the 6023 Interface which is built into the Central Control-i Unit which came with early Digital Starter Sets and was also sold separately.

The computer can (via the Interface) receive and evaluate data from switching contacts such as contact tracks, circuit tracks, and reed switches as shown below. This is accomplished by incorporating s88 Decoders into the layout. In all, up to 80 engines, 256 switches, and a maximum of 496 track detectors can be controlled or monitored with the Interface. The Interface plugs into the right side of the Control Unit or a Control 80f unit. If Control 80f units are also attached, care must be taken to insure that engine addresses do not conflict between the two units. The computer plugs into the right side of the Interface unit with the 6 prong plug provided with the Interface. The computer user needs to construct a cable that will be compatible with the interface signal or purchase a ready made cable through their dealer. Serial connections use five wires to transmit data: 1) the "TD" line which carries data from the Interface to the computer, 2) the "RD" line which carries data from the computer to the Interface, 3) the "CTS" line that acts as a controller from the Interface telling the computer when it is ready to receive more data, 4) the "RTS" line that acts as a controller from the computer telling the Interface that it is ready for more data, and 5) the "GND" for the ground line. The other end of the cable needs to be compatible to the computer being used.

Interface / Computer Pin Connections
Pin at Interface Signal Commodore C-64 Macintosh 9 pin Macintosh 8 pin IBM 9 pin * IBM 25 pin* Apple II
1 RD M 5 3 3 2 2
2 CTS D 6 1 7 4 4
3 GND N 3 4 5 7 7
4 TD B & C 9 5 2 3 3
5 RTS L 7 2 8 5 20
* the IBM computer needs additional pin connections (bridge 6-8-20 on the DB 25 connector and bridge pins 1-4-6 on the DB 9 connector)

Most will use an RS232 plug. Whatever the case, find the proper pin configurations in your computer manual and wire the cable correctly. If things don't work, it is usually because the RD and the TD lines are crossed, reverse them and try the system again.


6051 Interface

There are 4 encoding switches on the rear of the 6051 Interface. These must be set according to the transmission requirements of the particular computer. This should always be done when power to the Interface is OFF. The first three switches can be set for positive or negative logic (up is negative logic). The fourth switch sets the transmission level for TTL or RS232 (up is TTL, down is RS232). Switch #1 is for the RD signal, #2 is for TD, and #3 is CTS. The newer 6023 Interface does not need switches. With most computers, switches 1, 2 and 3 are up, while #4 is down, but when using the Macintosh, all switches are up.


Look at the "commands" page for commands and instructions to use when programming the computer to run the trains. Remember, the trains will not send addresses of the engines to the computer, they only send the data that a train has passed a particular point on the layout. Control of the train can be accomplished without the s88 decoders. Some computers have graphic capability that when coupled with a mouse offer programming options that are extremely powerful. It is possible to show graphic displays on the computer screen of layouts with switches, signals, uncoupling tracks, etc. These can be programmed in such a way that the switches and signals are controlled by the computer's mouse simply by selecting a button on the screen and then clicking the mouse button.

6023 Interface

The Central Control-i Unit (Märklin No. 6023) is no longer offered, but it offered some expanded interface commands and had the drawback of only allowing the connection of three s88 decoders. The communication modes included both ASCII mode and terminal mode (Binary Mode). When first initializing the interface in the Central Control-i Unit, the default mode will be the ASCII mode. This can be changed by pressing the "stop," "go" and function "off" keys simultaneously at the control unit and then letting go of the "stop" and "go" buttons first, then the function "off" button last. This resets the interface to the binary mode as in the 6051 interface.

With the interface in the Central Control-i Unit, control of trains can be transferred between the computer and the control unit. If an engine number is called up on the Central Control-i Unit, that same number can be called by the computer at which time, the LED on the control panel will go off and the computer will take control of the train. Likewise, control of an engine can be taken from the computer by the Central Control-i Unit.

TRC >> COMPUTER CONNECTIONS AND LOGIC IBM 25 pin RS232 type connector on PC & XT*

All IBM computers will follow this logic on the Interface DIP switch settings:
switch 1--up
switch 2--up
switch 3--down
switch 4--down

The command to open the serial port from a BASIC program is:
OPEN "COM1:2400,N,8,2,CS10000,DS" AS #1

or older interface units without CTS and RTS monitoring use:
OPEN "COM1:2400,N,8,2,RS,CS,DS,CD" AS #1
MACINTOSH

Macintosh 8 pin DIN and DB 9 pin serial type connector on all Macintosh computers

Macintosh computers will follow this logic on the Interface DIP switch settings:
switch 1--up
switch 2--up
switch 3--up
switch 4--up


The command to open the serial port for output from a BASIC program is:
OPEN "COM1:2400,N,8,2" FOR OUTPUT AS #1

The command to open the serial port for input from a BASIC program is:
OPEN "COM1:2400,N,8,2" FOR INPUT AS #2

APPLE II

25 pin RS232 type connector

Apple II computers will follow this logic on the Interface DIP switch settings:
switch 1--up
switch 2--up
switch 3--up
switch 4--up

The command to open the serial port for output and input from an Applesoft program is not given as a single statement. The operating system on the Apple II is not friendly with outgoing and incoming data, it will always set the 8th bit high. This makes it necessary to POKE data directly into memory and PEEK data from memory when sending and receiving with the Apple II.

With the 6051 Interface, don't connect pin #2 at the Interface plug. With all Apple II programs you might try the following switch settings if the ones above don't work.

switch 1--up
switch 2--up
switch 3--down
switch 4--down

COMMODORE

24 pin serial type connector on Commodore 64, 128 and VIC 20

All Commodore 64, 128 and VIC 20 computers will follow this logic:
switch 1--up
switch 2--up
switch 3--up
switch 4--down

Sometimes these other configurations will work with the Commodore:
switch 1--up
switch 2--up
switch 3--down
switch 4--down

switch 1--down
switch 2--down
switch 3--up
switch 4--up

The command to open the serial port from a BASIC program is:

OPEN 2,2,0,CHR$(138)+CHR$(0)
RADIO SHACK

All Radio Shack computers will follow this logic on the Interface DIP switch settings:
switch 1 up
switch 2 up
switch 3 up
switch 4 down

This computer will work sometimes with all switch settings in the up position.

The command to open the serial port for output from a BASIC program is:

OPEN "COM:68N2D"FOR OUTPUT AS 1

The command to open the serial port for input from a BASIC program is:

OPEN "COM:68N2D"FOR INPUT AS 2



 
------------Y8sU7yoPmlRplEH9zL6Ph0 =
Where to Buy | = Product Data Bank = | = New Items | = Scales : HO : Z : MAXI/1 Gauge | = Getting Started
DELTA / Digital Multi-train Con= trol | = Märklin Club / Digital Club| = Märklin Catalog
Technical Resource Center | = Shows / Events | = How to Become a Dealer | = 140 Years of Märklin

© 2000 to Märklin, Inc. All rights reserved.
Privacy Statement