my mercedes when i am driving after 45minutes the engine switch off automatically on 2006 Mercedes-Benz S350

what should i do?

Asked by for the 2006 Mercedes-Benz S350
seek a diag and est from a mech that works on mbz. poss crank sensor isssue. have codes scanned to start with
thank you i will check
could have a bad pcm
1 more answer , 1 more comment
have it scan tested for codes
i already have scanned its appear many error codes, i delete then appears again when the engine stop working