OBD Mode of operation

Mode of operation
Here is a simple introduction to the OBD communication protocol according to ISO 15031:
Mode $01 is used to indicate what powertrain information is available to the scan tool.
Mode $02 displays Freeze Frame data.
Mode $03 lists the emission-related diagnostic trouble codes stored. It displays exact numeric, 4 digit codes identifying the faults.
Mode $04 is used to clear emission-related diagnostic information, including clearing the stored pending or confirmed DTCs and Freeze Frame data.
Mode $05 displays the oxygen sensor monitor screen and the test results gathered about the oxygen sensor.
There are 10 numbers available for diagnostics:
$01 Rich-to-Lean O2 sensor threshold voltage
$02 Lean-to-Rich O2 sensor threshold voltage
$03 Low sensor voltage threshold for switch time measurement
$04 High sensor voltage threshold for switch time measurement
$05 Rich-to-Lean switch time in ms
$06 Lean-to Rich switch time in ms
$07 Minimum voltage for test
$08 Maximum voltage for test
$09 Time between voltage transitions in ms
Mode $06 is a request for on-board monitoring test results for continuously and non-continuously monitored system. There are typically a minimum value, a maximum value, and a current value for each non-continuous monitor.
Mode $07 is a request for emission-related diagnostic trouble codes retrieved during current or last completed driving cycle. It enables the OBD scanners to obtain "pending" diagnostic trouble codes detected during current or last completed driving cycle for emission-related components/systems. This is used by technicians after vehicle repair, and after clearing diagnostic information to see test results after a single driving cycle to determine if the repair has fixed the problem.
Mode $08 enables the off-board test device to control the operation of an on-board system, test, or component.
Mode $09 is used to pull vehicle information, such as:
VIN (Vehicle Identification Number): Vehicle ID