Trains.com

MTH DCS question

3801 views
7 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    April 2003
  • 305,205 posts
Posted by Anonymous on Tuesday, January 18, 2005 9:51 PM
Thanks for the responses.

Sending a computer command to the Command Base in TMCC with Visual Basic is as simple as:

MSCOMM1.OUTPUT = chr$ (254) & chr$ (0) & chr$ (156)

This activates horn1 sound on engine 1 by sending the 3 byte serial signal 254 0 156 in DEC (decimal) to the port on the Command Base

To activate the shutdown sequence for engine 1 use this command:

MSCOMM1.OUTPUT = chr$ (254) & chr$ (0) & chr$ (149)

254 is the decimal equivalent of the "OFE" first byte mentioned in the TMCC manual (which is in Octal), the tables shown in the TMCC manual are in binary! Very confusing at first, but simple once you get the hang of it.

The 3 byte codes can be calculated from the manual, but it is very time consuming.

Fortunately there is a much easier way:

When you send a command with the Cab1 remote the 3 byte command code is sent (reflected back) to the serial (DB9) port on the command base. These are easily read into a computer using Visual Basic and can be printed on the screen.

In summary the port on the command base can receive codes from a PC and will send them to the port when received from the Cab1 remote.

It would be interesting to see what would would happen if we hooked up a laptop to the DCS serial port and see if any codes pop up on the screen when the DCS remote is used.

I don't have a DCS system. If someone is willing, I could try to write a small VB program to read the port,and convert it to a small .exe file to run on your PC or laptop with a serial port.

email if interested:

rhahm@nycap.rr.com

Thanks for listening



  • Member since
    April 2003
  • 305,205 posts
Posted by Anonymous on Monday, January 17, 2005 2:01 PM
Since MTH can download new software through your computer to your controller I believe it is only a matter of time that MTH trains will interact with your personel computer.

Maybe the new tech company formed by Neil Y. and Lou K. will come up with some new versions of command control.
  • Member since
    April 2003
  • 305,205 posts
Posted by Anonymous on Monday, January 17, 2005 12:30 PM
Before DCS was released to the public, I saw it demonstrated at a local train meet. At that time, MTH Representatives were using laptop computers connected directly to the TIU's to control the trains.

Based on this, I know it is possible.

MTH has chosen not to publi***he codes, which has caused concern from some fronts.

I always wonder, if given the choice to make the decision again, Lionel would still publi***heir codes.
  • Member since
    February 2004
  • From: Rolesville, NC
  • 15,416 posts
Posted by ChiefEagles on Monday, January 17, 2005 12:20 PM
RWHahm, sounds like you are beginning to get there. Don't give up. You may come up with a new system for us to use. Work on the DCS thing as a lot of us are going that way now that it is out and running good.

 God bless TCA 05-58541   Benefactor Member of the NRA,  Member of the American Legion,   Retired Boss Hog of Roseyville Laugh,   KC&D QualifiedCowboy       

              

  • Member since
    December 2003
  • From: Austin, TX USA - Central Time Zone
  • 997 posts
Posted by Jim Duda on Monday, January 17, 2005 12:08 PM
You and Professor Feinberg need to hook up...he has been researching how to run his empire via a computer interface. I'm sure he will respond to your question. Search on Big_Boy_4005 and send him an e-mail...
Small Layouts are cool! Low post counts are even more cool! NO GRITS in my pot!!!
  • Member since
    April 2003
  • 305,205 posts
Posted by Anonymous on Sunday, January 16, 2005 9:16 PM
That's too bad. Thanks for the info.

The DCS system appears superior to TMCC and the engine choices seem much better and cheaper. I had hoped to give it a try but I want to have computer control and train detection.

I can send serial commands to the TMCC Command Base port with my laptop and VB6 professional. These are equivalent to all the commands on the Cab1.

The main problem is train detection. I use Hall sensors connected to a Basic Stamp 2 microprocessor which communicates (using the same serial port) with my laptop. Crude, but it works.

A little slow to respond though. For example if a VB program sends a command to stop an engine when it crosses the sensor the engine has moved up to a foot before it responds.
  • Member since
    December 2001
  • From: Upstate New York
  • 899 posts
Posted by nblum on Sunday, January 16, 2005 4:22 PM
No
Neil (not Besougloff or Young) :)
  • Member since
    April 2003
  • 305,205 posts
MTH DCS question
Posted by Anonymous on Sunday, January 16, 2005 4:11 PM
Can a PC using Visual Basic send codes to the TIU via the rs-232 port to send commands to the engines,accessories,and switches?

Join our Community!

Our community is FREE to join. To participate you must either login or register for an account.

Search the Community

FREE EMAIL NEWSLETTER

Get the Classic Toy Trains newsletter delivered to your inbox twice a month