Page: SDL: FAQ - Connecting 6021
Last update: 2010-09-25
Connecting to 6021/IB / Verbindung zur 6021/IB (2010-09-25)
6020/6021 and IB-serial
This simple program can control digital model railway systems compatible to the 6050-syntax using the serial port of an Apple Macintosh. Locomotives, function models and accessories. Apple’s standard serial port was the RS.422 (8-pin) instead of the PC-world's RS.232 (9-pin). After the release of the first iMac and G3 blue/white this serial port was no longer implemented by Apple. Macs of today have only USB as their standard serial interface.
DecoderSnake is a little tool to program modern MFX-/FX-decoders using older CUs (6021, IB), published by Mafi for the first time on 2007-04-28.
The Digital Interface 6050 / 6051 has its own serial port (DIN 8-pin) and is shipped with a cable RS.232-to-Digital-Interface-6051. Our beta-tester Carsten Bansemer reported a succesfully connection via a DB9-DB25 converter to this cable to connect an old 68k-Mac using a Mac-modem-serial cable. We have tested that installation succesfully: this way is the easiest and simplest one for setting up a stable connection.
Other digital controlling devices (for example the IB) have built in a RS.232 modem-serial port. A connection to the Mac is then possible with a standard Mac-modem-cable.
To make this program work on (actual) Macs you need a serial port for your Macintosh, built-in or supplied by an USB-to-serial converter. These converters can be divided into two groups:
- USB-to-RS.422 (old Mac-like, Mini DIN-8)
- USB-to-RS.232 (PC-like, usually DB9)
The mini-iDock (New Motion / Pekingstone; http://www.pekingstone.de/) is an example we have tested succesfully under MacOS 9, but it has no MacOS-X support (like a similiar device by Belkin http://www.belkin.com/). Keyspan (http://www.keyspan.com/) has developed an USB-to-RS.422 converter which will work under MacOS-X (UniversalBinary) and under MacOS 9. If you need RS.422 ports on modern Macs, we recommend to use the Keyspan converter(s). Of course you can use an older Macintosh with built-in serial ports. MacOS-X 10.2.6 was able to recognize the mini-iDock in classic-mode, but on MacOS-X 10.3 or newer even this will no longer work. An additional alternative are third-party built-in serial ports replacing the internal modem (by GeeThree, for G3/G4-Macs), but this wasn't tested by us.
Keyspan (http://www.keyspan.com/) has also developed USB-to-RS.232 (high-speed) converter(s) which will work under MacOS-X (UniversalBinary) and under MacOS 9. This gives you the opportunity to have a PC-like DB9 port on your Mac which will be more suitable for modern tasks (for connecting your Palm for example). In this case you can connect the originally RS.232-to-Digital-Interface-6051-cable directly to the converter (or a standard PC DB9-DB9 cable to connect the IB to the converter).
There are (intended for PCs) several USB-to-RS.232 converters available by different manufacturers around the world. Most of these (USB 1.1) converters depend on Prolific's converter design PL-2303 (http://tech.prolific.com.tw/). For the PL2303 there is a MacOS-X driver available, which was tested succesfully by us under MacOS-X 10.3.4 or newer and under MacOS 9, too. (our example: USB-to-RS.232 converter 12881 by Vivanco (http://www.vivanco.com/), sold at MediaMarkt in Germany in 2003, MacOS-X driver by Prolific from http://theapotek.com/teknotes/archives/000014.html, driver version 1.0.6). The driver version 1.2.0 for MacOS 9 failed working in our environment for unknown reason (driver found: http://www.pc-addons.co.uk/ftp/USB232/pl2303.sit). You can get newer drivers from Viewcon (http://www.viewcon.net/) for both MacOS-X (driver version 1.0.8) and MacOS 9 (driver version 1.3.0b2) which will work properly. You can use these drivers for MacOS 9 or MacOS 10.3.4.
As of Feb. 2007: Prolific has published new drivers for MacOS 9, driver version 1.3.6b1 and MacOS-X (UniversalBinary), driver version 1.2.1r2. We recommend to use these drivers for 10.4.8 up to 10.5.x. Even older converters will work with them.
As of Aug. 2007: There is an OpenSource driver available (MacOS-X, UB): osx-pl2303-0.3.1-10.4-universal.dmg at http://sourceforge.net/project/showfiles.php?group_id=157692
As of Sept. 2010: Prolific has published new drivers for MacOS-X (i386), driver version 1.4.0. We recommend to use these drivers for 10.6.1 or newer systems! Even older converters will work with them. It can be assumed that actually sold converters are using Prolific's chip even today. For help on "Lion" see this Blog since July 2011: http://xbsd.nl/2011/07/pl2303-serial-usb-on-osx-lion.html
If you don't want to use the easy way mentioned above, the next hardware you will need is a suitable cable to connect the RS.422 to Digital-Interface 6051. There are several sources on the internet to retrieve informations on how to patch the cable:
See the following sources:
- PICTs out of the MacOS-Systemextension “Apple Modem Modul” using ResEdit
- manual of the 6051-Digital-Interface
- http://home.arcor.de/f.heitkamp/mp/Bardioc/Seite13/index-13.html (was originally: http://members.tripod.com/~Bardioc/Seite13/index-13.html )
- my publication “Digitale Modelleisenbahnsteuerung mit TurboPascal” (1995) (out of print)
Your model railway and digital device:
You will need at least the following model railway digital components:
- Digital controlling device with built-in serial port (for example the IB)
- or Digital Control Unit 6021 & Digital Interface 6051
- locomotive(s) with Digital-deocders built in
- model railway tracks connected to the controlling device
Working examples tested by us ...
- first make all connections, then turn on the digital controlling device.
- if the program cannot control the digital controlling device then make a reset at the digital controlling device by pressing (in most of the cases) STOP & GO simultaneously for 2 seconds and then restart the program (please read the manual of your controlling device).
- if the digital controlling device refuses to accept commands from the Mac then disconnect and reconnect the serial cable and relaunch the program.
- under certain conditions (iBook / mini-iDock) it will be better to dis- and reconnect the USB-to-serial converter to make the Mac to recognize the serial port.
- the program cannot control any locomotive / function-model which is already under control by another (hardware-) digital controlling device (depending on the kind of your hardware).
- be sure to have a clean connection between locomotives and railway tracks.
- last but not least: is the cable correct?
- the program might cause a system breakdown if there is no serial port present. So it is necessary that no other applications are performing file activities while this program is running. Otherwise loss of data may occur!
- the program will definitively cause a system breakdown if the serial port is removed on runtime or the programs starts up using a serial port defined in the preferences file which is not / no longer present.
- using the wrong serial port (for example: the internal modem) will confuse the control panel "Modem" and will cause trouble when starting an Internet connection.
- balloon help is implemented, reserve enough memory for the program in the Finder to avoid problems.
- we have implemented an "unlimited" number of independend control windows. In fact the operation system will not allow more than 255 popup menus for each program. So we recommend a limit of 60 open windows at the same time (you can set your own limit in the Preferences-window).
- we have implemented a vehicle table, where individual locomotives can be defined and can be selected to control them in a control window. It is difficult to double-click the locomotive entry near the locomotive’s name and address. Use the area rigth from the check-boxes in the same line to activate the whole entry. Then you can double-click the entry, bringing this locomotive in a control window to front. The same effect will take place by using Cmd-J.
- being connected to an Intellibox, a total system halt may occur if the STOP button of the external device(s) is pressed while the program is still sending data to the IB. This will not occur while being connected to a Mrkl6051. Perhaps disabling CTS flow control will solve this problem.
- the IB must be configured to "Interface->Computer->PC" (and not to "Interface->Computer->Mac"). Same goes for the Mrkl6051-Interface: setting must remain like for conventional PCs (keep the default settings).