Interesting...

The photo is almost good enough - but I can't quite make out the marking on the mid opto - it looks like the one on the right - a 6N137, but I can't quite squint hard enough to read the markings. If it is, then I'd be convinced that all three opto devices are inputs (the 137's being the Pulse/Dir inputs and rated at 10MHz, the CT185 being the cheaper/slower ENABLE input. I can't see any other opto devices. What gives me pause for thought are the 4 SMD diodes next to these (I'd expect 3, for input protection to the optos). Which begs the question, where are the ALM outputs connected??

Can you check visually the 4-pin opto (https://datasheet.lcsc.com/szlcsc/CT...T1_C191836.pdf) - if pin 1&2 head towards the green connector then this is the ENABLE input, which is what I expect. The alternative is the middle opto (who's number I can't read) is not a 6n137 but instead a two-channel opto for the slower DIR/ENA inputs.

If the 4-pin device pins 1/2 do head to the green connector then my worry is that the ALM outputs are not opto-isolated but an open-drain output from the DSP. If this is the case then I'd be very cautious of how to connect these.

If the 4-pin device pins 3/4, instead, head to the green connector then the link above describes the characteristics of the output switching capability.

The data sheet for the driver does suggest the alarm output is derived from the encoder/position error detection.