Modern engine has O2 sensors (Lambda sensor) to control the emission from the engine. If you have problem with this and get an engine alarm it could be very difficult to solve. In cars from about 2000 and later there is an OBD system. With that you can communicate with the with the car's onboard computer.
It could be several different problems that cause this. But the most common is that the O2 sensors (Lambda sond) have to be replaced, they only have limited lifetime, about 100000 kilometers.
There are a lot of other information you can get from this OBD system also.
If you want to know more about OBD analyze you have some information here:
Here I have done some investigation with the OBD reader. After connected the OBD hardware to the connector in the car I started up the app Torque Lite that I have installed in my mobile telephone.
From here I can read a lot of data from the ECU box that controls the engine. I have here started a log of selected data from the engine when I drive the car and stored the data in the telephone. Later when home I transfer that data to my PC and put it in a Excel sheet and draw this graph:(click on the image to get a full resolution photo in a new window)
What you see here are the rpm, speed and air mass that flow into the engine and the Fuel trim from bank 1 and 2, the x-axis is time.
When the engine has warmed up it goes into a closed loop, that's when the ECU box start to control the fuel against the emission. What it shows are the compensation in % of the default values (1 gram fuel to 14 gram air mass) it regulate the fuel with. You see how the red and blue line regulate the fuel inlet after the signal from O2 sensors, speed and rpm of the engine. This is very good to know when you do a troubleshooting in your engine. Bank 1 and 2 are the row of cylinders on a V6 engine, bank 1 is were the cylinder number one is, in my case the passenger side, steering to the left.
Sometimes I use the app OBD Car Doctor:
There are a lot of others apps too, see the list above. But I'm new to this so I don't know yet which is best, and it also depend what kind of mailfunction you have.