Not an easy task. But control of turntables is really needed, imho.
Yes I agree, same applies to a transfer table/traverser ![]()
I’ve added a backlog entry on the roadmap, so we can note all these.
Do you have a turntable? If so, which model and controller?
A lot of (märkin probably other also) turntables work by pressing a button that starts turning it left or a button that starts turing it right and it stops automaticly because of the hardware and they often have output contacts that give feedback on the position
I think a good implementation for this would be an ui that allows to create a turntable with a custom ammount of steps. eachs step can be asigned to a feedback signal input or set as not conected/unused actualy things like the Märkin 72941 (dont know how its called) work exactly the same.
But because of a lot fo speciality between manufacturers a small database of turntables would be needed. In some turntables without feedback a setting for turntime would be probably enought to avoid colisiosns. There also are full digital controllers for turntables(example märklin 7687 ) but i dont know how the comunication works. my assumption according to the button overlay sticker that is included. That normal turnout addresses are interprated as functions like go left or go to track 12. this would need anoter full data base or some option for users to insert the informations into the custom UI if avivable.
It might be too early to talk about specific solutions and models. But anyway.
I think the turntable in Traintastic is an abstraction layer. How specific models are interfaced is a middle-tier, preferably Lua-scripting, I guess.
So what is needed.
-
An entity in the layout designer, actually two, one for turntable and one for traverser.
The properies of this object might be something like an array of tracks, each with its own set of properties. And also a definition of outputs. Bitwise using several “turnouts” or an output IMM, with aspects, or something else? And a definition of inputs. State? (moving,stationary) track? Current location etc. -
The actually connection with hardware, the signaling, is done with lua-scripts, if possible.
Perhaps new methods/functions needs to be there in Lua for this to work. Callbacks? -
The specific hardware. Naturally.
Just my €0.02
My current idea is to use the “driver model”, this is also used for (Smart) Boosters in Traintastic, we can then have a generic/abstract turntable control interface with a driver that translates it to the correct commands. This will make it easy to support many different types. The driver can also specify what is supported, e.g. step_ccw, step_cw, rotate_180, select_track etc.
@Goofy I like the Lua idea, that can be handled by a “Lua driver”, with specific functions and callbacks, that will enable users to built their own driver if needed. ![]()
For all well known commercial models it would be nice to have a proper driver.
Its nice to discuss this a bit and gather some details about different types of control, that makes implementing it in the future easier ![]()
A bit background on the booster driver:
- A generic booster object
- Each booster has a type property that determines the driver to use.
A booster driver:
- Has its own set of properties for that specific driver:
- Reports to the generic booster which values are available, so called feature flags.
- Is responsible for the communication with the booster, usually via an interface.
Currently there are two booster drivers, a thrid one (YaMoRC YD7403) is developed, but I need to test is, but that requires new firmware from the vendor. (The new firmware will support event driver operation via LocoNet.)
i looked a llittle bit in how other software depicts turntables and its nearly impossible to depict an variable turnout(diffrent amount of tracks) on a tile based layout without creating giant tiles.
I think the best prectice would be something like creating an 3x3 tile for control/visualization and a for the tracks a type of Portal Connection could be used. Something in the direction of an end of track object that theoreticly teleports onto the turntable.
I think both options are possible, a basic NxN tile + some connector tiles will work.
A resizable turntable tile could work too. 1x1 gives 8 connections (4 edges, 4 corners), 2x2 gives 12 connections, 3x3 gives 16 connection etc.
An example drawing:
Even if a turntable has 48 positions, most people only use a few, so you only need to specify for each connection what the track number is.
If someone uses all 48 tracks, you’ll need a 11x11 tile, but I don’t think that is a big issue, you also need a lot of board space for all the tracks anyway.
It’s nice to talk about this and gather some ideas ![]()
