Is the 24V AC or DC?
If 0.5 sec is the on and off total time, how long will the solenoid stay energised in each cycle?
What are the solenoid inductance and coil resistance values?
Have you considered how many on/off cycles the solenoid is rated for?
Any transistor will be much faster than the solenoid so transistor speed is likely not a consideration.
What is the current and voltage signal output from the PLC?
Solenoid is 24v DC and coil resistance is 4 ohm and Command 24v DC Coming from PLC
and Solenoid is on for 20 second
I've used the transistor F9540N but operates with a lag
I suspect the lag was due to the current build-up time in the inductance of the solenoid, or to mechanical inertia; not so much the transistor. Can you post a link to the circuit you used?