Innovate Motorsports OT-2 SDK User Manual

Page 34

Advertising
background image

34

Now that we understand ‘Normalized PIDs’ and ‘Priority’, let’s look at the response to
the ‘Get Configuration’ (‘c’) command again:

Responds: 36 bytes

{

U8 Channels;

// Number of channels (16 max)

U8 Protocol;

// OBD-II protocol

// 0 = automatic

// 1 = can

// 2 = pwm

// 3 = vpw

// 4 = kwp

// 5 = iso

U16 NormPid[16]; // Table of ‘normalized’ PIDs

// to scan

U16 Flags;

// Priority flags

}


The first value, ‘Channels’, is both the number of MTS Aux Channels that will be
generated and the number of Normalized PIDs that will be scanned (it is a one to one
relationship).

‘Protocol’ controls how the ECU will be communicated with. If you do not know what
these mean, best to leave it on automatic!

‘NormPid’ is a table of Normalized PIDs. These are the items that will be polled for each
channel. So, if ‘Channels’ is set to 2, the first two entries will be used, ‘Channels’ at 16,
all entries will be used.

It is your responsibility to make sure that the normalized PID selected can be supported
by the ECU (yes, a little ugly). However, if you select a ‘bad’ Normalized PID, do not
worry, the firmware will skip it and just return 0 for that channel in the MTS Data Packet.
You can inquire about the availability of a specific normalized PID using the ‘a’
command in Setup Mode. Or, by checking the PID masks returned by the ‘j’ command
(see Appendix B).

The ‘Flags’ field is where low priority can be selected. One bit per channel. A 1 = low
priority, a 0 = normal priority. Bit 0 controls the first channel (NormPid[0]), bit 1
controls the second channel (NormPid[1]), and so on.

In Setup Mode, the OBD-II scan thread keeps running, so if you only change channels or
priority, the ‘M’ (or ‘C’) command is very quick, with the MTS stream changing
immediately. If you change the protocol, the connection to the ECU will be terminated
and a new one attempted. This can take as much as 20 seconds.

Advertising