Welcome to the forum   
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Share
Options
View
Go to last post in this topic Go to first unread post in this topic
Offline Martti Mäntylä  
#1 Posted : 13 March 2019 23:08:37(UTC)
Martti Mäntylä

Finland   
Joined: 15/11/2018(UTC)
Posts: 29
Location: Uusimaa, Helsinki
After having fun with k73 decoders in M-Gleis, I have spent some time thinking how to proceed with digital. In the end I decided to drop the CS3/CS3+ approach in lieu of an approach that I find more appealing and state-of-the-art.

After some browsing and reading I came to the realisation that I already had a quite capable central control unit in the shape of the track box that came along with my MS2. All I needed was some hardware to connect its CAN bus to a computer and run my stuff from there.

In the end, I bought the Startset 3 from CAN Digital Bahn. As to the control software, I narrowed my choices down to iTrain and Rocrail; I am a Mac user so some other alternatives were not attractive.

I have been very pleased with the quality of the pieces I received, although I still haven't got the correct feedback module. From the looks of the modules, one can tell that the makers are engineers, not marketing specialists, but they seem to know what they are doing.

I am particularly impressed at the points decoder WeichenChef 2.1. Each of its four outputs can be freely programmed to any protocol / address one can think of. Moreover, it can recognise the position of the switch / signal and report it back to the system bus. So, I can turn the switch or signal by hand, and all other components will receive a status message of the correct position. This is probably good from robustness angle.

As to iTrain and Rocrail, I have installed both on my MacBook and taken turns running them both. So far I haven't been able to really make a fair comparison because iTrain is quite limited without the feedbacks unlike Rocrail which has the useful feature that feedbacks can be simulated via the computer screen. So, I will try to keep an open mind until I get some more experience.

I must confess, though, that I am tilting towards Rocrail that seems offer more room for sophistication. I also managed to create a test track that iTrain cannot handle while Rocrail can. On a Mac, iTrain looks better, though.

In any case, both pieces of software work very well with CAN Digital Bahn devices. In the case of Rocrail, I found the mgbox library to be more stable than the officially recommended mcs2 library. In addition, mgbox handles mfx locomotives much better.

So far, I have been able to figure out how to make use of these new toys. Eventually, I will certainly face obstacles which require me to appeal for help from others. Please bear with me then.
- Martti M.
thanks 4 users liked this useful post by Martti Mäntylä
Offline Martti Mäntylä  
#2 Posted : 15 March 2019 22:26:49(UTC)
Martti Mäntylä

Finland   
Joined: 15/11/2018(UTC)
Posts: 29
Location: Uusimaa, Helsinki
Perhaps this is old news to this community, but I decided to share what I learned today. Perhaps it is useful to someone.

My CAN Digital Bahn feedback module has not arrived yet, so my progress has been temporarily halted. The pause nevertheless prompted me to get better prepared for the next steps.

Although I have a reasonable amount of M-track circuit tracks, I have hardly any contact tracks which would probably be better suited for a digital setup. Trying to get them from eBay at 6-7 € each would have been tedious, slow, and expensive, so I decided to try to make them myself.

Fortunately, from Stummis Modellbahnforum I found the entry

https://www.stummiforum.de/viewtopic.php?t=150711

which was bang on. My first try was not pretty, but it worked as intended. I went on to make five more.

I followed the recipe exactly except that I chose to remove the entire rail piece from the track before cutting it (with a manual metal saw), as I wanted to spare the track pieces from any unnecessary trauma. Moreover, instead of drilling a hole in the track, I simply routed the cable from the outer side of the rail. Those with power tools will probably do well by following the instructions to the letter. Anyway, I can testify that this method works as advertised.
- Martti M.
thanks 3 users liked this useful post by Martti Mäntylä
Offline Martti Mäntylä  
#3 Posted : 17 March 2019 20:29:10(UTC)
Martti Mäntylä

Finland   
Joined: 15/11/2018(UTC)
Posts: 29
Location: Uusimaa, Helsinki
Now that I wrote the previous entry (which perhaps was not such a great idea), I feel compelled to document for the benefit of mankind a small improvement to the method cited above.

Instead of inserting the connecting cable to the small hole at the top of the rail (which can easily go wrong), I stick it under the rail piece before I heat up the heat shrink. This attaches the cable snugly with the rail.

To route the cable, I use one of the small holes that M track have under the rails. I just need to lower the trackbed also at the frontside of the insulated rail piece to make room for the cable and widen the hole a bit with a small screwdriver. The result is very neat and the cable is nearly invisible.

I promise to return to proper digital stuff in subsequent posts.
- Martti M.
thanks 1 user liked this useful post by Martti Mäntylä
Offline Martti Mäntylä  
#4 Posted : 30 March 2019 23:13:42(UTC)
Martti Mäntylä

Finland   
Joined: 15/11/2018(UTC)
Posts: 29
Location: Uusimaa, Helsinki
My exploration into digital has continued. I received the missing feedback module (CAN Digital GleisReporter deLuxe) and tested it on an M track circuit with the self-made contact tracks. It all worked as expected, although just 8 feedbacks limited the range of automation quite a bit. I was nevertheless pleased with how easy the GleisReporter was to set up and use. An order for two or three further GleisReporter deLuxe units is imminent.

After the feedback experiment I launched another exploration on how far I gan get with M tracks. Specifically, I wanted to test how my turntable (Märklin 7186) could be incorporated to digital use.

As the first step, it was not difficult to figure out how to command the 7186 digitally; the figure below shows my test setup.



The setup uses two universal relays (Märklin 7245) commanded by a k83 unit (60830). One relay controls the clockwise vs. counterclockwise turning direction, the other the start / stop magnet. With the k83 device, this maps nicely to MS2 so that the left buttons command starting and stopping and right buttons the direction of motion. (The same could have achieved with a k84 unit, but I don't have any. Why buy one, when I have the bits that do the same thing?)

In Rocrail, one of the supported turntable controller models (accdec, https://wiki.rocrail.net/doku.php?id=tt-roco-en) matches reasonably well with this setup (although I was first baffled with the addressing mode used by accdec). So far, so good!

Unfortunately, it seems less obvious how to advance beyond this. One obstacle is that the start/stop mechanism of the 7186 is designed for the original use mode where the turntable moves only to the next position. In my test setup, I learned quickly that I must hit the "stop" key on MS2 to disengage the start/stop magnet as soon as the turntable starts to move to avoid power supply problems. This makes the turntable to stop at the next track position, just like the original analog controller. Rocrail can be configured to do the same; thus, the "next track" and "previous track" commands of the turntable can be made to work as intended. However, it is not clear how the others could be implemented.

Automatic use would of course require the integration of sensors for tracking the position of the turntable and the movement of locomotives. To test this realm, I created a small setup in Rocrail, shown below.



Unfortunately, I am still baffled about how the bridge sensors (fb11 and fb12 in the image) are supposed to work. In Rocrail simulation mode, they do not behave consistently. Sometimes they are ignored entirely, and sometimes just the "in" sensor (fb12) is observed, resulting in a "ghost train" in Rocrail nomenclature. Any insight into how to resolve this obstacle would be appreciated!

Otherwise, I can simulate the operation the turntable reasonably well within the limits of the underlying control functionality by clicking the appropriate sensor entities.

The next goal is to incorporate the turntable in higher levels of automation. I am still unsure how that should be done with the concepts of Rocrail. "Routes" don't seem to be the right concept, but neither do "tours" or "schedules". Is this where XML scripting is needed?
- Martti M.
thanks 1 user liked this useful post by Martti Mäntylä
Offline PeFu  
#5 Posted : 31 March 2019 07:09:36(UTC)
PeFu

Sweden   
Joined: 30/08/2002(UTC)
Posts: 594
Originally Posted by: Martti Mäntylä Go to Quoted Post
Now that I wrote the previous entry (which perhaps was not such a great idea), I feel compelled to document for the benefit of mankind a small improvement to the method cited above.

Instead of inserting the connecting cable to the small hole at the top of the rail (which can easily go wrong), I stick it under the rail piece before I heat up the heat shrink. This attaches the cable snugly with the rail.

To route the cable, I use one of the small holes that M track have under the rails. I just need to lower the trackbed also at the frontside of the insulated rail piece to make room for the cable and widen the hole a bit with a small screwdriver. The result is very neat and the cable is nearly invisible.

I promise to return to proper digital stuff in subsequent posts.



Using M tracks, as an alternative to making your own contact tracks, I would recommend the Littfinski current detection module:

https://www.ldt-infocent...doku.php?id=en:rm-gb-8-n

The Great Krok!
Inspired by Swiss railways (SBB/BLS/SOB), C and K track, CS2, TrainController Gold V9
thanks 1 user liked this useful post by PeFu
Offline Martti Mäntylä  
#6 Posted : 02 April 2019 20:53:34(UTC)
Martti Mäntylä

Finland   
Joined: 15/11/2018(UTC)
Posts: 29
Location: Uusimaa, Helsinki
Thanks for the tip, PeFu! I will investigate.

Meanwhile, I have made some progress with my 7186 experiment. I figured out how to implement the "goto track #" command that Rocrail automation uses in its work. All it took was to maintain the current position of the bridge in a global variable and write an XML macro for each target track position that moves the bridge to the desired position with "next track" and "previous track" commands directly supported my control setup. (Probably Rocrail has some sort of internal variable that stores the bridge position, but I haven't penetrated that deeply into its data model.) The current setup is shown below.



With this, I am getting closer to functionality that actually is useful. I don't mind clicking manually the bridge position sensors (sensors fb1 ... fb10) in the image. As locos won't move until I have clicked the appropriate sensor, this actually acts as a safety measure.

Unfortunately, I still haven't discovered a solution to the problem I am having with the bridge sensors fb11 (enter) and fb22 (in). Quite predictably, they work as expected every other time. That is, after Rocrail has driven a loco away from the bridge, the next attempt to drive back will fail because the bridge block does not respond to the sensors. When I back up the loco and try again, the operation works. Clearly, the bridge is left in some kind of unhealthy state after Rocrail has emptied it, a state which is fixed by the failing attempt. Any insight into this issue would be appreciated!

Another mystery that remains unresolved is to convince Rocrail that both ends of the bridge can be used. At the present, Rocrail treats the bridge as strictly one-way, so that locos can only enter and depart from the +-side of the block (from sensor fb11's side). Any hints on how to make Rocrail have a more relaxed attitude would also be appreciated.
- Martti M.
Offline Martti Mäntylä  
#7 Posted : 04 April 2019 00:30:09(UTC)
Martti Mäntylä

Finland   
Joined: 15/11/2018(UTC)
Posts: 29
Location: Uusimaa, Helsinki
I have made good progress with my 7186 experiment today, essentially bringing it to completion.

First, I figured out the root cause of the intermittently unresponsive bridge sensors. Very simply, I had left the tick mark for "embedded block" in the general settings of the turntable on, while still configuring elsewhere the turntable as having an external bridge block. Apparently in this confused situation Rocrail took turns between the two alternatives. After fixing this, the sensors work perfectly in simulation. Reminder to myself: read the fine manual!

This breakthrough enabled me to experiment with further levels of automation, such as sending locos from one block to another with a single command. In particular, I realised that Rocrail schedules make it possible to specify that locos leave the bridge from the opposite end (the minus side). This is of course critical to enable unlimited operations on the turntable.

The caveat is that my control model allows me only to move the +-side of the bridge to a desired track; I cannot move the bridge by specifying where I want to place the minus side. Thus I can only send locos out of the minus-side to tracks that have a companion at the opposite side of the turntable, i.e., tracks 0, 12, 24, and 36 in the figure of my previous post. This obviously limits the usefulness of, say, track 4 as an exit track. Nevertheless, I could get around this limitation by introducing "virtual tracks" only consisting of a (simulated) position sensor at the opposite side of each track that needs to be accessible from the minus side of the bridge.

The last bit that I haven't accomplished is figuring out how locos could enter the bridge from the minus side. Schedules can't achieve this, as it appears that one cannot specify the entry side of a block in a schedule. This facility - if possible at all - would enable every operation of the turntable to be performed in two ways, one or the other being better in terms of bridge movements needed. It seems nevertheless difficult to benefit from this flexibility unless by creating two variants of every schedule and leaving the choice to the user. So I may well leave this item unresolved: even with the present functionality, I can perform any manipulations that a turntable can do.

All in all, this was a fun and educational experiment. It turned out that Rocrail turntables are quite tricky to configure and it is easy to get it wrong. At the same time, the XML scripts and other features of Rocrail turned out to be well capable of creating quite general functionality on top of easily 50 years old unaltered hardware.

The experiment also helped me to make my choice between Rocrail and iTrain. In a tradeoff between more flexibility and tailorability against a smoother user interface, I prefer the first alternative. I cannot see how I could have achieved these results with iTrain.

Edited by user 07 April 2019 01:40:22(UTC)  | Reason: Not specified

- Martti M.
Offline Martti Mäntylä  
#8 Posted : 06 April 2019 01:29:24(UTC)
Martti Mäntylä

Finland   
Joined: 15/11/2018(UTC)
Posts: 29
Location: Uusimaa, Helsinki
I thought I had the 7186 experiment all figured out, but I didn't. It seems that this topic is becoming a kind of learning diary of how to make use of Rocrail's features. Perhaps there are other Rocrail noobs besides me, so I continue the story.

I was prompted to put more thought into this experiment after seeing Rocrail all the sudden move a loco on the bridge from the minus-end. So it can be done! Unfortunately, this phenomenon was difficult to replicate using the half automated mode. Clearly, I did not have the kind of control of the turntable that I was trying to achieve.

After experimenting with schedules a bit more, I came to the realisation that Rocrail needs the help of higher-level control defined outside the scope of the turntable itself. What should happen to a loco that enters the scene from one of the input tracks? How does the choice depend on whether the loco appears head first or tail first? Likewise, when a loco leaves the turntable, should it be reversed, or should it leave in the same orientation as it had on the storage tracks? The turntable itself cannot decide these matters.

At the end I decided to add four additional control buttons to the test scene as shown in the present test setup shown below.



On the right side of the picture with the entering tracks 0 and 4, two buttons control whether the loco should move directly to the storage tracks 16-26, or whether its orientation should be reversed before parking. In the case of the picture, loco BR 74 appears tail first on track 4, so if I want to park it in the same orientation, I select the "Through in" button and guide the loco to the target track by dragging and dropping. Alternatively, if I want to turn it around before parking, I select the "Revolve in" button instead. (Of course, in a real layout I imagine that these buttons would be replaced by some kind of higher-level control.) If I select neither, I let Rocrail to make a random choice. If I select both, all paths are blocked and the loco cannot move into the turntable.

Likewise, on the storage side on the left with tracks 16 to 26, the "Through out" and "Revolve out" buttons control whether a loco should leave a storage track and appear on an outward track in the same orientation it had or reversed.

The test setup also includes a "virtual track" 28 on the opposite side of track 4. As I explained in the previous post, this track serves only the purpose of making it possible to route locos from the minus end of the bridge to the opposite track. The physical device has no real tracks in the +-position, so the block 28 is taken out of play.

The picture actually shows a scenario where the virtual track has just been utilised. In this case, the BR 74 has been routed out of a storage track to track 4 with the "Through out" option in play. To achieve this, the +-side of the bridge has been moved to the virtual position 28, so that the minus side gives access to track 4 and the loco can move there preserving the orientation it had on the storage track.

For aditional flexibility, I could add virtual tracks for every physical track that does not have one (i.e., tracks 16, 18, 20, 22 and 26). This would nevertheless complicate the controlling of the setup considerably, so I have not tried to pursue this path any further.

So, there was still more to study in this experiment. This time, I better not claim it closed and out, as there may be still be further ideas that I haven't had yet.
- Martti M.
Offline Martti Mäntylä  
#9 Posted : 07 April 2019 01:20:15(UTC)
Martti Mäntylä

Finland   
Joined: 15/11/2018(UTC)
Posts: 29
Location: Uusimaa, Helsinki
Yet one more update on the 7186 experiment.

I came to the realisation that while controlling the behaviour of the turntable by enabling and disabling routes is the way to go, the scheme I had devised was still not expressive enough. Therefore, I replaced it with a more general scheme that controls directly access and departure routes of the bridge.



As shown in the figure, the control scheme consists of four "on/off" buttons arranged around the bridge block. Buttons "Enter +" and "Leave +" control whether locos are permitted to enter viz. leave the bridge from the "+" side. Buttons "Enter -" and "Leave -" control similarly the "-" side.

In the scenario of the picture, locos are permitted to enter from the "+" side and leave from the "-" side of the bridge. If I wanted to move BR 74 from track 24 to track 0 in its present orientation, I could drag and drop its image to Track 0. This would cause the "+" end of the bridge to be moved to track 24 so that BR 74 can enter it, after which it can leave the bridge to track 0 from the "-" end. Alternatively, I could first change the control buttons to enable entering from the "-" side and leaving from the "+" side, in which case less bridge movement would be needed. On the other hand, if I wanted to move BR 74 to track 0 in reversed orientation, I could enable either the "Enter+" and "Leave+" buttons, or the "Enter-" and "Leave-" buttons before dragging and dropping.

This scheme seems to cover all thinkable operations of the turntable except turning a loco around by driving it to the bridge, turning the bridge 180 degrees, and driving it back to the original track, this being an operation outside the scope of a single drag & drop. A sequence of two drag & drop operations will nevertheless achieve the desired effect.

After this, I contemplated briefly the idea of optimising the bridge movements a bit further.

At the present, the bridge moves one "next track" or "previous track" at a time; hence it stops at each intermediate position along the path towards the goal. My XML macros control this with appropriate timers.

Nominally, I could replace repeated stopping and starting with continuous bridge movement by engaging the start magnet just at the right moment to prevent the bridge from stopping at an intermediate track, as long as the engagement is short enough to avoid overburdening my power supply. This nevertheless proved to be impractical bordering impossible.

As I don't have real bridge position sensors (and have no plans to install them either), I would have to rely on timers. This is tricky not only because the speed of rotation is variable, but also because the actual geometry of the 7186 is more complex as it may seem at first sight.

Specifically, the device seems to be designed so that one can install two Märklin 7028 Lokschuppen on the tracks 16 .. 20 and 22 .. 26, respectively. To provide enough space for this, the angle between tracks 20 and 22 appears to be about 18 degrees, rather than the nominal 15 degrees. Hence the angle between tracks 12 and 16 is about 27 degrees, rather than 30 degrees, the angular distance between tracks 0 and 4.

(This also means that it is hopeless to try to connect tracks 16 .. 20 with outside tracks; they are alien to the regular M track geometry. Moreover, putting a Lokschuppen on, say, tracks 18, 20 and 22 will be a source of grief.)

This complexity is manageable if I let the bridge stop at each intermediate position, because I can select my timers for the worst case so that they err on the safe side. To enable continuous movement, I should nevertheless model the geometry exactly because there is no safe side to err. This is a mission I am willing to undertake only if someone agrees to pay for it on an hourly wage basis with no guarantee of a satisfactory outcome.

Edit: I checked the Märklin documentation on M track geometry to find that that the angle between tracks 20 and 22 is declared to be 17.5 degrees. I had never really internalised this, even though I thought I understood M track geometry,
- Martti M.
Users browsing this topic
OceanSpiders 2.0
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

| Powered by YAF.NET | YAF.NET © 2003-2019, Yet Another Forum.NET
This page was generated in 0.461 seconds.