Fan assignment to tool, no thermocouple?

I use Heater 2 for chamber on the duet wifi and connect Fans to P2 output.

Can I do that when I turn on heating the fan switches on immediately and when turn off heating the fan shuts down.?
But i need to do this on the P2 fan output, so that I can restrict the speed ,,F250,,

I tried different combinations like ,,M106 P2 H2,, ,,M563 P2 D2 H2 F2,, and others. I tried to assign but fan no react.

The correct command is M106 P2 H2 Tnn where nn is the temperature at which you want the fan to turn on. You can also add an S parameter to limit the fan speed, although for thermostatic fans the firmware enforces a minimum S0.5.