0-10v PWM dimming problem

You need to use a PNP transistor, not an NPN.

Can you explain why just the NPN alone wouldn't work?

And the data sheet states "Please DO NOT connect "DIM-" to "-Vin".

Where else does it get connected?