But in my experience, I seldom use the output port to output the pulse directly, except to save the cost, because the frequency of the output pulse is limited and not high. Are you talking about a special position control unit? Then consider wiring. Each pin has a special definition, which is generally an NPN open-collector output. Pay special attention to the connection here. Generally, there are two kinds of power supplies, +24V or +5V. You can't make mistakes. You'll burn something. It is best to find this information to confirm.
I have a simple example at hand, for reference only, to see if it helps.
Pulse output driver
Male * * * terminal -+5v
clockwise
GND - 0V - GND
The inside of the pulse unit is usually an NPN transistor of open collector, and the inside of the driver side is usually an optocoupler. It's best to find the information to confirm it, so as not to connect it wrong and burn out the components.