I second the 'good long drive' as an effective manner of getting a pass on the exam. Also, it is very easy to check your EGR valve--apply vacuum to the valve and if the truck sputters and dies, the valve is fine. You can buy a vacuum for this sort of test for about 10-15 at any auto-parts store.

Also, check the EGR modulator. It is a little valve/filter that costs about $35 and could be the source of your issues. It was the source of mine. I went from a high NOX to ultra-low emissions. Good stuff.

mike v.