Hi there.
A few days ago, I wanted to connect a Marklin K-track 2170/2270 3way turnout to my Ecos command station and to have Rocrail control it.
I did a search for installing/connecting a 3-way turnout but I did not come across much help, so I would like to share the information I gained when trying to hookup my 3-way turnout to the ESU Ecos and operate it with Rocrail.
Before I install a turnout on my layout I check that the solenoids work. I did this with the 3way turnout by using an analog transformer and connecting the yellow wire to the yellow port on the transformer and then touching the blue wires one at a time to the brown port on the transformer, everything working just fine.
Here was my first error/assumption (never assume … ass out of u and me) The current or length of the pulse (I’m no electrical engineer so correct me if I’m wrong) but whatever the difference is, just because the solenoid works on an analog transformer does NOT mean it will work once connected to the DCC system. One of the two solenoids work in one direction, but would not work in the other direction with DCC power.
After doing some digging, I found out that in the Ecos CS when you select a 3way turnout as an accessory the Ecos automatically reserves the next digital address for the second solenoid of the 3way turnout. I understood that with the 3way icon pointing up, the first solenoid is the RH turnout and the automatic selection of the second solenoid is for the LH turnout. There is no where to select or modify this.

I also read somewhere that you should only select one of the first 3 numbers (i.e. addresses) within the 4 number group.
Example in group 1 choose address 1, 2 or 3 but not 4.
In group 2 choose address 5, 6 or 7 but not 8 and so on.
From my understanding this is because of the Ecos selecting the second address automatically, and if you select address 4, on a k83 the address 5 is not on that same k83.
I believe this is if you’re using the k83 or other decoders that work in address groups of 4 numbers.
See here in this image.

I could not find the order of the addresses on the k83, so by trial and error I found out which plugs belong to which address. The rotation is counter clockwise starting in the bottom LH corner.

I added a 3way accessory on my Ecos, gave it the address 5, believing address 6 would be for the second solenoid, which it was thankfully. And then I jumped right into Rocrail and proceeded to setup a 3way turnout.
I added a 3way turnout in my track plan and under the “interface” tab I was pleased to see that the section halfway down where you can add the second address was not greyed out, so I could put in two addresses for the 3way turn out.
I was all set and ready to do a few clicks on Rocrail and maybe I would need to move the wires around in the k 83 a bit until I got the correct sequence. Well, after a few hours of clicking in RocRail, selecting the invert boxes and then deselecting invert boxes, moving wires from one plug to another, moving the plugs to different addresses on the k83 and changing the addresses in Rocrail, trying a different k83, and after testing and re-testing the 3way turnout by turning off the DCC power and connecting the turnout wires to the analog transformer, to ensure that the turnout was indeed working. Which it was NOT working 100% correctly, but I assumed it was working correctly since it was working with an analog transformer (if I’m going to use an accessory in DCC, then I must use DCC power to test it.)
The turnout did move 3 out of the 4 options (Right turn, straight, Left turn, straight. The last straight was not working)
I was getting movement some of the times that I clicked in Rocrail, it just never agreed with the representation in the Ecos nor the physical position of the 3way turnout.
Time to stop the setup for the night and do some more research. I still didn’t find that much about connecting a 3way turnout to an Ecos and Rocrail, but I came across this old post from 2015
Wiring Marklin 3way turnoutin this post biedmatt writes;
“
Perhaps the best way to visualize the 5214 three way switch is to think of it as two separate switches (left and right) placed one atop the other. The two blue wires on one side make that set of points to straight or turned and the same for the blue pair of wires on the other side. You will need two separate switchpilot outputs to operate it. But I would think you could configure the controller and switch pilot so pressing the "straight" icon on the ECoS will cause both separate points to transfer to the straight position or route, ie: one icon selection generates two switchpilot outputs. Or you could identify which blue wire from each side sets the points to straight and connect both blues to the same output of the switchpilot. Then when you select the straight route, both switches will transfer to straight.”With this mulling over in my mind all night long

I saw a new way to approach the problem. So the next day, once I had the opportunity to head down to the train room again, I decided to get the 3way turnout to work in the Ecos first and then connect it to Rocrail.
1st I added a Right Hand turnout as an accessory and gave it address 5

2nd I added a Left Hand turnout as an accessory and gave it address 6

I plugged the two 3way solenoids into the k83, the RH out into port address 5 and LH into port address 6.
Then I tested it. And I found out that it was not working for the Left hand solenoid on the return to straight. It was stuck. I used some Isopropanol alcohol and electrical contact spray cleaner to clean it up and get the solenoid moving freely.
Now, when I clicked on either the RH or LH accessory the physical 3way switch moved in the proper direction.
Next I added the 3way accessory used the same address as the RH turnout and hoped that the software would automatically select the next sequenced address for the second address, and it did as advertised.
I was able to click and select either RH turn, LH turn or straight on the Ecos 3way turnout icon, and this moved the physical 3way turnout to the selected position.
As they say, I was off and running. Now to figure out why Rocrail was not in agreement with the Ecos and the real position of the physical 3way turnout. What I was getting is RH turn in Rocrail would be LH on the Ecos and on the real turnout, LH in Rocrail would be RH on the Ecos and the real turnout, but straight would be straight for all 3.
I tried cycling the 2 invert boxes again under the “interface” tab, not expecting that to fix the issue because the invert, as far as I understand it is the same as swapping the plugs around in the k83, and since that was working 100% from the Ecos the problem was the synchronizing between Ecos and Rocrail.
And this is where my other assumption came in.
Since in Ecos the RH part of the 3way is address 5 and the LH part is automatically given as address 6, I assumed that top address in the Rocrail interface tab should be address 5, since it is the RH turn.
So with nothing to lose, and no other options I swapped the addresses around in Rocrail.

That did it, the problem is solved.

Rocrail controls the 3way turnout via the Ecos, all three are in agreement.
In the following pictures you can follow the sequence of addresses and commands that Rocrail sends to cycle the 3way turnout.
from the 3way being straight a click on the icon causes to right to turn

next click on the icon, the right returns to straight followed by the left going to turn

one more click and the left returns to straight.

I hope this will be helpful to anyone having problems connecting a 3way turnout.
I think the same idea works with a double slip switch, just use two RH or two LH turnouts back to back and one address apart.