unclean signal at the output of an optocoupler
The data sheet says: -


  The VCC supply to each optoisolator must be bypassed by a 0.1μF
  capacitor or larger. This can be either a ceramic or solid tantalum
  capacitor with good high frequency characteristic and should be
  connected as close as possible to the package VCC and GND pins of each
  device.


Is this the problem? Here's a picture showing the 100nF cap from the data sheet: -



For information the data sheet also says: -


  Enable Input – No pull up resistor required as the device has an
  internal pull up resistor.