Well I think your problem mus be the wiring or the optocoupler itself. You can perform the following tests:
- Test the device (unconnected):
a) Use a multimeter in the semiconductor test option (set the knob to the diode symbol) and measure with it the forward voltage across the LED (red probe to pin 1 and black probe to pin 2 of the opto). It MUST display between 1.0 and 1.6V (It is typically 1.25, see vishay datasheets). If you have something near 0V the opto's LED is short-circuited (burned up) and it's because the low resistor value (I use a 220 ohm resistor to this kind of circuit).
b) If the LED is still alive, test the photo-transistor: With the multimeter knob in the semiconductor test option (set the knob to the diode symbol) measure the voltage across the output transistor (red probe to pin 4, black probe to pin 3) in two times: first with the four pins unconnected multimeter MUST display no measure (normally 'OL' = open loop or '1 .' = measure too high). Second, measure as the first but applying the 5V through the 220 ohm resistor to pin 1 and connect pin 2 to ground (pins 3 and 4 unconnected). Multimeter MUST display 0.1V to 0.4 (typically 0.25 according the vishay datasheet). If this is correct then step 2.
- Test the wiring: It's very simple. If step 2 works then the input wiring is ok. Test the output wiring with a short-circuit between pins 3 and 4 with everything connected (no multimeter needed) and the servo drive MUST react. If no, there is your problem.
Hope it helps