Building a railcab en

By Blokker_1999 on Thursday 17 January 2013 20:09 - Comments (5)
Category: CabConnect, Views: 4.469

Something new, a blog post in English. I have doubted for a while if I should even write these, but in the end I’m going through with it anyway.

I have been a railway enthusiast for a long time and been playing rail simulators on the computer for years now. Already logged more than 800 hours on Railworks. In 2011, for our open days, I already made a connection between Railworks and a real train cab. And ever since I have been dreaming of having my own cab at home.

A big project that I have finally been able to start. My thanks go out to an NPO that helped me acquire some essential parts. Unfortunately due to the route we have taken, I cannot (yet) show any images of the cab itself. But in the following weeks, while working on the cab, I will make some posts about progress made and solutions created for the problems I come across.

One of the biggest issues is interfacing with the game logic itself. While a way has been figured out to send commands to the game there is yet no simple solution to read out current control states from the game itself. The raildriver interface used to send commands towards the game is only able to read out the speed.

Railworks is using LUA to make some of the game logic work. Every locomotive has its own engine script and this can be used since it contains a function that gets executed on every drawn frame. While the scripting language is undocumented, it is known that a function exists to read out control values. It then becomes easy to save those values into a file on every frame drawn and do readout in the interface software.
Unfortunately there is no automated way of doing this. And given the amount of locomotives around it would be a big task to figure out the available controls and change the scripting files by hand. Furthermore, any update of the game, or any integrity check by steam would revert any change made to the engine scripts. Therefore, one of my first tasks on the software level is to write an app to help me with that.

In order to add to the scripts we first need to know what valid controls are available for a locomotive. While there are no such lists available on the internet I quickly learned that the game holds the information in a retrievable way. Each vehicle has a compressed xml file detailing, among other things, the cab layout (if it is a locomotive) and other aspects of the vehicle. Inside this xml file we find more details about the controls, including the needed names. Fortunately, Railworks delivers the necessary tool to deflate these files back into xml files with a tool called serz.exe. Afterwards it becomes easy to run through the xml document and select the correct nodes. Currently, work is underway to do just that.

I am also working on the hardware side of the project. The cabling mess has already started. Control surfaces will not be directly connected to the computer, but will run through a buffer that is optically isolated from the digital IO and non-optical for the analog output (gauges). Biggest question marks here are the brakes since both the controls and the gauges on the equipment I have are pneumatic. I am considering building them that way and installing a small compressor in the cab. But I will finish the electrical side before I start thinking about a world I know nothing about.

Volgende: UPS (koerier) Failed 02-'13 UPS (koerier) Failed
Volgende: An app for that. 01-'13 An app for that.


By Tweakers user BeefHazard, Thursday 17 January 2013 20:22

Ziet er strak uit. Veel plezier met patchen!

Looks tight! Wish you good luck with patching!

By Tweakers user Blokker_1999, Thursday 17 January 2013 20:25

btw, those wondering about the white lose wires, those were just placed for a quick test.

By Tweakers user naftebakje, Friday 18 January 2013 10:08

There are indeed rather small compessors and pressue detectors that are quite easy to implement and understand, so it is certainly possible.
Consider the noise and quality though, the smaller and cheaper you go, the more problems you'll have. A silent compressor is used a lot for airbrushing and so but is rather big.

By Tweakers user Blokker_1999, Friday 18 January 2013 11:08

Problem with airbrush compressors is that they do not have enough pressure. I need a minimum of 6 bar

By Tweakers user Case-study, Friday 18 January 2013 15:03

May i suggest a 12 volt compressor used by 4WD enthousiasts to reinflate the tyres getting back onto the road after deflating them in loose sand?
I reccomend a T-max, which can be picked up/delivered for around €110 and might even sound like a train compressor (if built under the cab and/or in a soundproofing box (contact me for a sound sample if you want)
oh, and it easily reaches 10 bar if you don't shut it off in time O-)

[Comment edited on Friday 18 January 2013 15:19]

Comments are closed