This is an old revision of the document!
How To assemble and connect the optocoupler.
With a multimeter it's easy to figure out if two of the wires are of the same phase, it's when you can mesure a resistance value between them (at the condition that it is a 4 wires stepper motor. As long as you have the 2 phases connected it's not a big issue if the rotation is inverted as you can change its direction in the file hardwarecfg.json with the obvious setting “invert”, one for each of the 3 motors.