Spent all day working the ground issue to no avail.
I have three power districts powered by two Lionel 180 watt power bricks and one tap (track 2) of the Z4000. Each power source is connected to a Legacy Powermaster then to a common ground under the table. The Turnout machines are powered by the 14VAC tap on the Z4000 with a separate ground.
As long as I keep the ground for the turnouts separate from the power district ground the track voltage and turnout machines along with Z-Stuff dwarf lights connected through 1008 relays to the turnout machines work just fine. Only the non-derail does not work since it needs a common ground between the switch machines and track ground.
Just to be sure about the Z4000 I disconnected the 14VAC wires, then shorted ground between the 14VAV tap and track 2 directly on the transformer (ie before the powermasters). The Z4000 acted just fine. As soon as I ran a wire from the 14VAC ground tap on the transformer under the table and connected to ground after the powermasters, track 2 of the Z4000 goes to 12 amps at about 1.2 VAC.
As I said earlier I did have the non-derail working on my previous layout. The only change I made was to switch a new legacy powermaster for an TPC400 that was previously connected to the Z4000.
Joe