EGR Problem

I’m at a loss and hope someone can make a suggestion. I have been trying off and on for 3 years to correction a problem with the Exhaust Gas Recirculation system. Here in Dallas we get a yearly inspection and if your check engine light is on, you don’t pass. I’ve replaced the EGR valve, solenoids and had is cleaned and shortly after all that expense, to date close to $1,500.00 overall, the waring light will come on again. I have 132,000 miles, still get great mileage, doesn’t burn oil; just been a great vehicle for me. Anyone have a suggestion on why this continues to be a problem. I have a great mechanic and he isn’t sure what to do. Thank everyone.

What is the exact code that is illuminating the check engine light?

After all this time I wasn’t able to remember the code and had to rescan. It PO400. Exhaust Gas Recirculation Flow Malfunction.

I should have also mentions that my scanner checked only 7 of the 8 Readiness Monitors. It skipped Catalyst.