Command ‘l’ – get last obd-ii loop time, Command ‘v’ – get vehicle vin number – Innovate Motorsports OT-2 SDK User Manual

Page 26

Advertising
background image

26

Command ‘l’ – Get Last OBD-II Loop Time

Sent:

1 byte
{

U8 Cmd;

// ‘l’

}


Responds:

2 bytes
{

U16 Time;

// Time in mS of last OBD-II thread
// ‘loop’, or 0 if not connected

}


Notes:

When you enter Setup Mode, the thread which polls the ECU
for values to send out via MTS keeps running. Each time the
thread has grabbed all the PIDs requested, it tracks time.
This command gets the last time measured. We use this to
intelligently configure the device. For example, our
preference may be to grab RPM + VSS, but if we set that
configuration and the loop is too slow for our purposes
(ISO 9141 perhaps?) we might degrade to RPM only. The
measurement is just one iteration, and will vary from cycle
to cycle, but it gives an approximation of performance for
the current configuration.

Command ‘v’ – Get Vehicle VIN number

Sent:

1 byte
{

U8 Cmd;

// ‘v’

}


Responds:

18 bytes
{

U8 Count;

// char count (norm. 17)
// or 0xFF for failure

U8 Vin[17];

// Vehicle VIN

}


Notes:

Not all vehicles support this mode 9 info type (2), but if
the vehicle does, it is a nice way to make your software
vehicle specific aware.

Advertising