Well, I got an oscilloscope, now I'm really frustrated, I was looking at the hal-oscilloscope first thinking where the ferror signal for joint_0 was starting to increase uncontrollably after 2500mm/min, so I borrowed an oscilloscope from my work and I just corroborate all my doubts about optocouplers, the images are only from channel A but the same is obtained for channel B.
Image 1. Schematic of the optocoupler circuit. Sorry R2->1k
Image 2. +A and -A signals polled directly at the encoder output, these are connected to +WHA and -WHA, 5V, speed 7000mm/min.
Image 3. Signal A probed optocoupler output "B119V EL3H7", 3.3V, speed 2500mm/min.
Image 4. Signal A probed optocoupler output "B119V EL3H7", 3.3V, speed 7000mm/min.
I have not tried with the other input pins that are connected to the "L247 M27" optocouplers but let's judge by the looks......
Ideas please......