Skip to main content

I have been wanting a graphical means of controlling switches for several years, but hadn't been able to really find anything I could afford and liked.  I'm really an amateur programmer, it's more of a hobby than anything else.  I'm pretty good with Visual Basic for Applications (VBA) which is part of Excel and I've dabbled on and off trying to figure out the serial control of trains with TMCC, but had no luck before.  A year or so ago I purchased eTCC from Harvy Ackermans, and have been using it quite a bit.  It's a great program packed with functionality at a very good price, I recommend it.  I contacted him about a graphic interface for switch control, and through our correspondence and his program I was inspired to give it another shot.  Finally, EUREKA!

Below are some screen shots of the program, it is also attached.  It should work with Excel 2007 and newer, and may work with older versions, but I've only tested in Excel 2016.  It isn't thoroughly tested, and certainly has some bugs in it.  If you'd like to give it a try, please read the Instructions on the "Engine List" tab first.  I'd really like to know your thoughts on how it works for you and ideas for improvement.  I don't have any plans to ever sell this, I just enjoy building it as another aspect of the hobby.  For me, it's like wiring, scenery, or a locomotive upgrade.

Some of the features:

- Basic engine control, with a few additional shortcut keys
- Multi-train / throttle control
- Record and play scenarios and routes
- Graphical controls of switches (with command control switches or SC2)
- Graphical control of track power blocks (with BPC)
- Basic accessory control (with ASC2)
- Ability to upload new trackplan, add and move switch and block controls
- Use of WiFi module to remotely program and read sensor tracks
- Serial port / RS232 based train detection to trigger automation of switches, whistles, bells, and accessories

If you have any problems getting setup or using it, please feel free to drop me a note and I'd be glad to help.  Also, if anyone wants more information about how I finally got it to work in Excel/VBA so they can give it a go, I'd be happy to share what I've learned.

Attachments

Videos (1)
Yard Master Demo
Files (1)
Last edited by Burl
Original Post

Replies sorted oldest to newest

It's a "GUI" using objects and VBA code in Excel.  It communicates with the layout via the serial port to the command base.  It's just Excel makes creating the GUI much easier than building it all out from scratch using vb.net or other language.  The main thing is the VBA code to do the communication.  It is stand alone, and doesn't need eTCC or anything other than Excel to run.

Last edited by Burl

Good point on the com port!  I hard coded it and forgot then to put it in the setup.  Will do that and post a revision.

The missing picture is my trackplan.  When I added the feature for people to upload their own, it doesn't save it with Excel it seems, it needs it in the location where the Excel file is saved.  I did not know that until I tried to figure out why you had that error.  My track plan pic is attached here, and I'll edit the original post with it added as well.  John, thanks for giving this a try, I really appreciate the feedback!!

Burl

Attachments

Images (1)
  • Bare CSG Skeleton Map
Last edited by Burl

The version attached to this post has a place on the "Engine Setup" section to select a COM port.  If one doesn't work, just try another.  I'll try to get a better way to confirm function in time, but I'm not sure of a good way at the moment. Please keep the feedback coming.

Attachments

Last edited by Burl

Here's a new version with these changes:

- Swapped out the slider throttle control for just a "speed" indicator as I couldn't get it to work reliably.
- Engine controls now sync the speeds.  When you adjust one, it adjusts across them all.
- Exposing the "Block Power" controls, which are still under development.
- Exposing the Accessory controls which work with an ASC2.
- Switched to .xlsb file format to save a little on file size.
- The trackplan picture now saves as part of the Excel file, no need to have it saved separately.

All feedback and questions are welcomed!

Attachments

Last edited by Burl

The version attached here has these improvements:

- Functioning block controls
- Improved throttle operation
- Fixed bug that locked up program after around 50 commands

I'm anxious for folks to give it a try and let me know how it works.  The more folks that use it, the more robust it will be.  Next is making a go at train detection, either with RFID or current sensors.  I expect the latter as the programming I think will be simpler and won't require any modification to engines and cars.

All feedback and thoughts are welcome!

Attachments

The version attached here has now been well tested and bugs fixed.  The train detection works with serial ports and relays, and the BPC block control works well now too.  If anyone is interested in giving it a try, just drop me a note.  Some features are easy to customize, others require some coding.  I'd be glad to help anyone wanting to set it up.

Attachments

The latest update below now works with the LCS WiFi module to remotely program sensor tracks.  I've also leveraged the train detection to drive automation of switches, whistles, bells, and accessories. To use the WiFi feature, it requires installing a reference to Ostrosoft Winsock dll.  Note this will only work with a desktop/laptop version of Excel, not cloud based versions nor free "reader" type versions.  If anyone would like more information, just drop me a note.  I'm glad to share with anyone interested.

Attachments

Last edited by Burl

@Burl, could this file be used to give someone on the internet control of the layout? I guess I was specifically thinking of dropping an internet connection between the sheet and the layout, rather than just sharing control of my screen with them like TeamViewer. It would be cool to let my friends out of state drive trains with me in the room driving my own locomotive.

I know there would likely be security risks involved but would it be possible?

I think it's possible.  It would require a major rewrite of this program to leverage the WiFi module instead of the serial connection (the only thing on WiFi now are the sensor tracks in this program).  I use the WiFi module in WPS mode, which links it via your wireless router and gives it an IP address (v. using Access Point mode which is just between it and local devices).  If you use WPS and capture the IP address with your router's config webpage, then I think anyone could do it using the current LCS app.  I think you could use eTCC as I've described as well if you don't want to go the iPad route (just no GUI).  Does that make sense?  I do think TeamViewer would be an easier path though.

I  think I'm closed to finished on this, I can't think of anything more I want to do with automation given the size of my layout (too small for real train detection driven automatic operations).  The attached version has sensor track reading capability for engine number, name, water and fuel levels.  If anyone has interest in the details, please just let me know.

BillYo, I also figured out a little more of the WiFi, so your desire of remote control is now alot easier than I thought.  You could use this for remote control via the internet, but a few of the features may not be available.  I'd need to add/rewrite some code, but not as much as I first thought.

Attachments

Images (1)
  • mceclip0
Files (1)
Last edited by Burl

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.
×
×