Skip to main content

I have read through several threads about different applications of using a computer to send TMCC commands to a command base. Here is my situation.

I recently bought a CAB1 and Command Base. The only reason for the purchase was to test a recent locomotive purchase, a 2-rail TMCC engine made by Weaver (2-rail TMCC, that’s a whole other topic). I don’t need to control a whole layout. I just want to set the engine to ENG 1, make it move forward a few inches, backward a few inches, ring the bell and blow the whistle. The loco is about 16 years old, I’m just checking that the electronics are alive.

Problem is, the CAB1 I purchased is dead in the water (extremely bad battery corrosion). Seller already refunded my money, so I’m sending it back in the mail tomorrow.

However, while I have it here, I have a laptop and a USB to Serial converter, so I figured I could just hook up to the Command Base and send a couple signals and be done.

I’m very well versed in JavaScript and VBA and Java, but no idea how to write in C (although I’m sure I’d pick it up quickly). Like I said, not trying for full functionality here.

Ideally I’d like to just enter a couple commands at the MS DOS Command Prompt, but no idea how to write serial out. I’ve read much about programs available, but I was hoping to just write a few lines of code. I read on one thread about some sample code in a drop box, but the post is 3 years old and the link is no longer there.

Hoping someone can point me in the right direction.

Original Post

Replies sorted oldest to newest

Jay,

Having done this myself over 20 years ago I can easily see why it's important, but its been so long that I can't remember where I stored the floppy disks that have my program on them.  Even if I did there's probably a 50/50 chance that they're unreadable after all these years.

At the risk of reinventing the wheel this thread contains a wealth of info on the general means for sending commands to TMCC, and Legacy, units (ignore the fact that the title focuses on the word "Arduino"):

https://ogrforum.com/...57#77875232662193957

You'll note within it that there are a number of different software programs and utilities referenced.  One of these may already be available from a forum member, or other source, to do what you want.  If not, the detail found in the thread should point you in the correct direction to write your own.

Keep us up to date on what you find.

Mike

Jay, I can help you if you want code samples, but if all you want to do is test the electronics of a TMCC engine the following might be easier than figuring out how to program your serial port:

1) Construct a few 3-byte TMCC commands (0xFE 0xXX 0xXX) using the Lionel command reference, either by hand or by a program you write in java. The basic code to do that is this:

byte 2 = deviceType | (deviceID >> 1); // Byte 2 is combination of type field and first 7 bit of TMCC address
byte 3 = (deviceID << 7) | (commandField << 5) | dataField; // Byte 3 is last bit of TMCC address, command field (2 bits), plus data field


2) Using a serial monitor program that can send hex data out the serial port, just type in those hex sequences and send to the command base.

Sorry I wasted everyone's time and my own. Thought this would be REALLY easy, but in the time I've spent trying to figure it out, I could have driven 90 minutes to the nearest hobby shop and done as GRJ suggested. Would have been a lot more fun, too,

I just wanted to be able to type something like

>echo jay > com3

except instead of sending the letters jay, send three letters (characters) corresponding to the binary information that needs to be sent to the Command Base (something like ■☺∟). No bueno.

I know the serial port is connected to the Command Base, because when I use a serial monitor app, I see a string of bits appear when I plug in the Command Base. But when I try to send 3 bytes to the Command Base, I get nothing. No red light flicker on Command Base, no indication anywhere that any communication is happening.

Not trying to rule the world here, just trying to blow the **** horn! Don't need a Java program (or C++ or whatever) with several classes and hundreds of lines of code.

Maybe the Command Base is as bad off as the CAB1 was, but I just can't see it. When I give power to the track with no Command Base, the loco sounds fine. When I give power to the track with the Command Base turned on, I get no sound (but I do have lights).

I've got a ton of papers to grade and a two tests to prepare for Monday, so I was really hoping this would be fun and quick and simple. No, no and no.

There is a ton of great info in that Arduino thread, just nothing that helped me.

Thanks for all the input.

Hello guys. Finally got ahold of a good little app called serialsend. Was able to send a command to set the loco to engine 2. Then was able to send signals for horn (whistle in this case), bell, and change directions. And this is all done from the command prompt, which is what I wanted to begin with, although not quite as simple as I had hoped for (the serialsend has far more capability than I actually need for this little test).

However, I can't get the loco to move. I've tried setting the absolute speed to 1, 3, 5, 10, 20 and even though the red light on the Command Base flashes, I get no response out of the loco. I don't think the drive train is locked up, because I don't even hear the motor trying. So suggestions there would be welcome. I'll try messing with relative speed rather than absolute speed later tonight to see if that makes a difference. There is a switch on the bottom of the loco to turn Cruise Control on and off; does this matter? (sorry, long time since I've had a TMCC/Railsounds loco)

The smoke unit works, but I haven't sent codes yet to turn it on and off (just flipped the switch under the loco).

Appreciate all the input. Will post a video later if I can get it to move.

Hi Jay - sorry for not responding to you earlier; I was preparing for my own class today!

I have a vague recollection that not all 3rd-party TMCC implementations respond to absolute commands.  The CAB-1 only sent relative commands, not absolute ones, so most people wouldn't notice until Legacy came along and enabled the CAB-2 to send out TMCC absolute speed commands.

If you're not wedded to the command prompt I like CoolTerm as a serial monitor; easy to use in hex or ascii mode.

Last edited by Professor Chaos

Here's a short video showing the operation. Very pleased that the RailSounds is still working great, and all the functionality I wanted tested fine. My audio is very low, but the loco audio is fine.

Before I put everything away, I tried to see if the TMCC signal and DCC signal (from my ESU ECOS system) would peacefully coexist... they do not. The whistle on the loco just blew non-stop!

So either I wire every district of the layout to toggle between TMCC and DCC, or I rip out the circuitry I just tested and replace with a DCC controller. Nice thing is, all the wiring is already done, including the tether between loco and tender. So if I go that route, it should go relatively smoothly.

I would like to play(?) with the two routines mentioned in a couple of the preceeding post. When I went to download the apps all sorts of "Bells and Whistles" went off from my internet protection routines. Has anyone that downloaded these routines experienced any adverse affects due to malicious software included with the downloaded software?

That's it for now!

When I bought the TMCC Cab1 and Command Base on the cheap, I really just wanted to see if all the electronics were still in good shape. That was side-tracked when I saw the corrosion in the Cab1. I really didn't want to buy another Cab1, so I was quickly trying to find a way to test the loco using only the Command Base before having to return it to the seller.

Before I put all of the electronics away, I was able to confirm that TMCC and DCC will not peacefully co-exist. So the TMCC electronics are coming out and getting replaced with and ESU Loksound.

The only other 2-rail TMCC locos that were also done around that time were the Weaver VO-1000, the Atlas FM Erie-Built, and Atlas GP-60. Not much there to build a fleet with.

I didn't mention on this thread, but very interesting story about this Weaver 2-rail TMCC locomotive that I was testing on. I actually owned this loco back around 2005. Sold it when I realized that 2-rail TMCC was not going anywhere. I've been watching auction sites for years trying to reacquire in DC, because I really liked the little loco. Finally found this at an auction last year and had the winning bid. When I got the item home and started removing old mailing labels from the box, I saw MY NAME on one of the labels. So this is actually the same exact loco I sold in 2005-ish.

Add Reply

Post

OGR Publishing, Inc., 1310 Eastside Centre Ct, Ste 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
Link copied to your clipboard.
×
×