Removing filament from printer

When I want to remove my filament from the printer, I manual set the temperature to 240 degree Celsius (PLA), and roll back the spool in my AMS.

Is there a way to do this automatic ?

Did you try this:

I will try it, .
thank you