Jump to content
 

DCC Computer Control


Luke Palmer
 Share

Recommended Posts

Has anyone here ever used Coding on a Windows Laptop to control Locos, points & accessories on their 00 gauge model railway layout?

I’m starting to get into coding and wondered whether I could incorporate it into my layout.  

 

No no worries if not it was just a thought I had,

Luke

Link to post
Share on other sites

Lots of us do it - butbwe use commercial or open source programmes to achieve the control - feel free to write your own but I would suggest that you will find that the time involved in cooking your own will quickly show you why we chose not to :)

 

the makn commercial programmes are

itrain

railroad and co

 

opensource

 

JMRI

RocRail (but requires paid support for some elements)

 

 

  • Agree 4
Link to post
Share on other sites

The big issue writing your own control system is firstly you have to write interface code so you can control an existing command station , depending on the system this can be quite complex 

 

then once you have control of the system you need to decide what functionality you need , again. This results in significant  code 

 

all in all a big task  

  • Thanks 1
Link to post
Share on other sites

  • RMweb Gold

Try looking at JMRI written in Java.  It's free and has an integration with Python/Jython which allows you to use their scheduler/interface to program as much as you want.  You MAY find that the amount of "programming" necessary using their own Logix approach will be all you need.  I have some Python but mainly my full interlocking uses their Logix.  Happy to bore you as much as you want on the subject!

  • Thanks 1
Link to post
Share on other sites

Hi,

 

I use JMRI for various tasks on model railways including electronic mimic panels. I write Jython scripts where JMRI doesn't do exactly what I want. JMRI also provides support for DIY model railway electronics such as DCC++ (Arduino based DCC Command station) and MERG CBUS (a layout control bus).

 

Regards

 

Nick

  • Agree 1
  • Thanks 1
Link to post
Share on other sites

On 21/03/2019 at 16:54, Luke Palmer said:

Has anyone here ever used Coding on a Windows Laptop to control Locos, points & accessories on their 00 gauge model railway layout?

 

A few years back I wrote a program to send commands to a Hornby Elite DCC controller. IIRC it was a bit tedious figuring out how to form the XpressNet commands but, after that, it was straightforward.

 

...R

  • Thanks 1
Link to post
Share on other sites

  • RMweb Gold

I used RailRoad and Co to write software control panels for WFRM layouts. It's very powerful but unless you are going for full automation I would choose another option, WFRM started using RR&Co when it was fairly cheap - not the case nowadays.

 

I wouldn't bother writing your own software, theres a lot to signal systems which JMRI or RailRoad and Co "just do" which could take you a long time to code - I've developed software for donkeys years and decided my time would be better spent elsewhere so I developed MILF instead (do not google this), basically a train describer for use over IP networks.

 

 

  • Thanks 1
Link to post
Share on other sites

  • RMweb Gold
On 21/03/2019 at 16:54, Luke Palmer said:

Has anyone here ever used Coding on a Windows Laptop to control Locos, points & accessories on their 00 gauge model railway layout?

 

It very much depends what you mean by "Coding", in particular what language you are talking about.

 

It is possible to write programs in C, C++, Pascal and so on to control a microcontroller such as an Arduino which can in turn produce DCC signals.

 

It is also possible, although unnecessarily tortuous, to produce DCC signals out of the end of a serial port, but you would need a custom hardware driver like PortIO or GPIO to bypass the HAL in any modern version of Windows.

 

If you were to buy a Sprog DCC computer Interface, you can control that with an API which is currently in development.

 

For points, signals and accessories, there are a number of USB relay cards available which would let you control these with your own custom software, not using DCC but just serial on / off commands.

 

Al.

Edited by Alister_G
update
  • Thanks 1
Link to post
Share on other sites

I have spent most of the evening trying to get a PI configured as a DHCP server & WAP so I can connect it to our club's PowerCab to provide access to WiThrottle.

That has taken me most of the evening, admittedly hampered by a bottle of red & some drams of single malt.

I have not got the wifi network visible yet. I am troubleshooting this bit.

 

It just goes to show how much effort is required to achieve your goal. If you can make use of someone else's work then I would do this.

  • Thanks 1
Link to post
Share on other sites

9 hours ago, Pete the Elaner said:

I have spent most of the evening trying to get a PI configured as a DHCP server & WAP so I can connect it to our club's PowerCab to provide access to WiThrottle.

That has taken me most of the evening, admittedly hampered by a bottle of red & some drams of single malt.

I have not got the wifi network visible yet. I am troubleshooting this bit.

 

It just goes to show how much effort is required to achieve your goal. If you can make use of someone else's work then I would do this.

 

I assume there is a reason why you didn't use Steve Todd's downloadable PI image ?    Download the file, put it on SD card, boot PI with SD card.   Result will be a PI with WiFi Access Point, DHCP serving, running JMRI, with WiThrottle and Webserver started, automatically detecting the PowerCab.....

 

https://mstevetodd.com/jmri-raspberrypi-access-point

 

- Nigel

 

  • Like 1
  • Thanks 1
Link to post
Share on other sites

On 30/03/2019 at 09:58, Nigelcliffe said:

 

I assume there is a reason why you didn't use Steve Todd's downloadable PI image ?    Download the file, put it on SD card, boot PI with SD card.   Result will be a PI with WiFi Access Point, DHCP serving, running JMRI, with WiThrottle and Webserver started, automatically detecting the PowerCab.....

 

https://mstevetodd.com/jmri-raspberrypi-access-point

 

- Nigel

 

Because I didn't know about it :D

Thanks. I'll give it a try.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...