If it has a tps(throttle position sensor)that could be malfunctioning.It tells the computer what position the throttle blade is in and how much air is entering the engine so that computer can provide the proper amount of fuel for every driving condition.If its malfunctioning and telling the computer that 20% of air is entering when 60% is truly what's coming into the engine,the computer is only gonna provide enough fuel to match 20% worth of air instead of 60%.Its also possible that the timing chain or belt has jumped timing.This means the fuel and spark sequences aren't gonna match up to provide fuel and spark ignition at the correct time so the engine loses all power.Depending on how your throttle cable attaches to the throttle body,its possible that the throttle cable may be loose and out of adjustment.If the accelerator is controlled electronically instead of by a throttle cable,the actuator or motor may be suspect.A clogged fuel filter or weak fuel pump can also cause your issues
Thanks.took it to garage and they put it on machine 3 times but couldn't find anything wrong
Could also be a clogged fuel filter, injectors or a bad fuel pump.
is it a petrol or diesel engine?
Have a peugeot 307 and today when stopped car and then tried to set off engine running but no power to accelerator. Had to switch off and on again and rev for car to drive.kept doing it when slowed down. Engine still running but no power