how to check mass air flow sensor on 1999 Mazda B2500

I replaced maf sensor twice I can drive for awhile fine then it will cut power and miss for a few seconds then it's fine after awhile it will lose power and feel like it's running on 2 cyl. if I unplug maf sensor it will run fine except it won't idle at stop

Asked by for the 1999 Mazda B2500
1 answer
A professional grade scan tool is the only way to properly check an airflow meter. You get airflow in grams, altitude, engine size and there is a formula to calculate if the air flow meter is good or bad.
http://d-tips.com/Tools/toolBox/mafcalc.aspx