What model driver are you trying to control.
Signaling methods are many and varied, and some may not even have enable inputs that work.
Without reference to the specifications of the specific model, it is rather hard to guess.
What you have shown will operate the opto correctly.
Current flows through the 220ohm. Opto is on. No current it is off.
Measure the voltage across the resistor. You will see 2.5-3v or so when on.
Nothing when off.
PS.
As legendboy did not identify the model, I did not assume anything about the resistor.
I'll add to this, as the resistor is internal.
Voltage across terminal > 3v or so. It is ON.
0-0.8v. it is OFF
Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.