How to Request Mode 3 ALDL Data Using TunerPro RT
How to Request Mode 3 ALDL Data Using TunerPro RT
Remember Me?
Forum Home New Posts FAQ Calendar Forum Actions Quick Links Advanced Search
Forum Fuel Injection TunerPro Tuning Talk How to Request Mode 3 ALDL Data Using TunerPro RT
Hello
If this is your first visit, be sure to check out the FAQ. If you'd like to post messages please create an account. To start viewing messages, select
the forum that you want to visit from the selection below.
Results 1 to 1 of 1
02-10-2014 #1
84Elky
How to Request Mode 3 ALDL Data Using TunerPro RT
Fuel Injected!
EDIT ----
Have been asked a couple of times why this document was created. It's because I could not find
anywhere the details of how to do all of this. There were bits and pieces in many places, so I decided to
pull it all together in one place so it might help someone trying to do the same thing.
================================================== =============
Join Date: Jul 2012
Location: Montgomery, AL
Posts: 204
This documentation uses the AUJP $8D code mask in all of its examples, but the same logic applies to all
other code masks. All references to TunerPro (TP) are to v5.
Mode Byte
This is the Mode Number (0 to 10) defining the diagnostic task the ECM is to
perform
Data Bytes
Individual data bytes requested in the reply, or the address of the first requested
data byte in a series of bytes (requested data bytes do not have to be provided
for some Modes)
Checksum Byte
The last byte to be transmitted is the Checksum Byte. The Checksum Byte is the
two’s complement of the sum of all bytes transmitted. It is calculated as:
As noted above, some Mode requests require Data Byte information to be transmitted after the Mode
Byte and before the Checksum Byte, and that’s the case for Mode 3.
Mode 3 Summary
ALDL Mode 3 allows up to 8 bytes of data to be requested from the ECM and to be reported in each TP
log sample. The data requested can be from any variable used by the code mask running on the ECM.
The purpose of using Mode 3 might be to gain a better understanding of values taken-on by variables, or
bit flags within a variable, during code mask execution.
With Mode 3, the variables requested do not have to be in the hard-coded Mode 1 DDS although they
can be. Using Mode 3 to request the value of 1 to 8 variables is a much simpler process than trying to do
this under Mode 1 if the data variables are not in the DDS.
All the work to request and receive Mode 3 data is done by modifying the TP ADX Definition file. Here’s a
summary of what needs to be done:
1. The hex addresses of the up to 8 variables to be requested must be determined
2. Three (3) “Commands” must be created:
1. a Transmit (or Send) Command to request the data
2. a Receive (or Reply) Command to wait for, receive and process the data
3. a Macro Command that incorporates the Transmit and Receive Commands for
use by TP
3. The header file “Monitor Command” selection must be changed to reflect the newly-created
Macro Command that requests and waits for the Mode 3 data
4. Values and Bit Masks need to be defined for any variables requested so they can be logged
5. Optionally, any defined Values and Bit Masks can be added to an “Item List View” if these
items are to be visible during a Mode 3 TP session
Data addresses
3 addresses for 6 bytes of requested data:
All Commands must have a unique Title and ID. A “Baud Rate” of ‘0’ in the Transmit (Send) Command
specifies using the default rate of the ECM (8192 Baud for the 1227730).
“Body Size” = 6 is the sum of “Payload Size” (3) and “Payload Offset” (3)
Also note according to Magnus at TP, it is technically correct in this example to use ‘7’ for the Body Size.
This adds 1 byte for the returned Checksum byte that is not accounted for when using Body Size = ‘6’.
However, TP sample rate frequency tests indicate that samples are provided to TP by the ECM much
faster when omitting the Checksum byte from the Body Size (see Post #12 at: http://www.gearhead-
efi.com/Fuel-Inj...3-ALDL-Command). Fortunately, TP flushes all receive buffers after each receipt, so
this is not an issue. If you feel uncomfortable not including the Checksum byte count, or are not worried
about sample frequency, then by all means include it. Either way is acceptable.
Macro Command
Now that the Transmit and Receive Commands have been created, the Macro Command can be created.
This is called a “Macro” Command because it is the Command used by TP to execute the Transmit and
Receive Commands together. Below is the Mode 3 Macro Command:
This Macro Command merely instructs TP to first use the “Mode 3 Send” Command and then use the
“Mode 3 Reply” Command (both previously created), to request and receive the Mode 3 data. The “Macro
Repeat Count” of 1 is the default and should not be changed.
Below is the default $8D ADX file Header window. Note it is requesting Mode 1 data by virtue of the
“Monitor Command” drop down box showing “Mode 1 ALDL Dump Request Macro”. This is the Macro
Command that causes Mode data to be requested, received and logged:
After changing the “Monitor Command” to request Mode 3 data, the Title of the Mode 3 Macro (“Mode 3
Macro” in this example) must be visible. Below is the header after selecting “Mode 3 Macro” for “Monitor
Command”.
In this example, there are 3 variables (TP “Values”). There are also 3 TP “Bit Masks” within one of the
Values (L0045) we want to see. So the following Values were created under the “Values” list:
Variable Unique ID Packet Offset
L00A4 3 2
L0045 2 1
L00A2 1 0
What’s important here is the “Packet Offset” assigned to each variable. This represents the order in
which the data were requested in the Data addresses portion of the Transmit String (see above).
Remember we requested the data in the following order:
0x00 0xA2 0x00 0x45 0x00 0xA4
This means:
0x00A2 = Packet Offset 0
0x0045 = Packet Offset 1
0x00A4 = Packet Offset 2
The first data byte address requested is always Packet Offset ‘0’ as shown below for 0x00A2:
The Packet Offset is also important if Bit Masks will be needed from one or more of the Values. In this
example 0x0045 is a byte with 8 bit flags, and we want to report the on/off state of some of those flags.
With that in mind, 3 Bit Masks were created to provide the needed information:
L0045 b3 = In MAP AE
L0045 b6 = TPS AE Limiting
L0045 b7 = In TPS AE
Each Bit Mask requires a “Packet Offset”. This is merely the 0-based order of the variable in the returned
data. Data will be returned in the order requested. In our example, L0045 (0x0045) is Packet Offset
1, meaning it is the 2nd item in the data stream if counting 1-based, or the 1st item if 0-based.
Remember we requested the data in the following order:
0x00A2 = Offset 0
0x0045 = Offset 1
0x00A2 = Offset 2
This is important, because if the incorrect Packet Offset is used in defining the Bit Masks, data will not be
reported correctly in the Log File.
Below is the Bit Mask definition for L0045 b3 = In MAP AE. Note that “Packet Offset” = 1 is used. The
“Bitwise Operation” is always “Bitwise AND” and the following “Operand” and “Result to Test” fields
indicate the bit to be reported in the Log File (0x08 here indicating bit 3=In MAP AE). The “Display on
TRUE” and “Display on FALSE” indicate what you want to be reported in the Log File and/or in the
optional Item List View.
Mode Byte
The Mode Byte is simply the desired ECM operation Mode Number.
Data Bytes
Individual data bytes requested, or the address of the first requested data byte
in a series of bytes (data bytes are not required for all Modes)
Checksum Byte
The last byte to be transmitted is the checksum byte. The Checksum Byte is the
two’s complement of the sum of all bytes transmitted. It is calculated as:
As noted above, some Mode requests require additional information to be transmitted after the Mode
Byte and before the Checksum Byte. Below is a description of the requirements for each Mode:
Mode 0 - (Normal Mode) is used by diagnostic equipment attached to the ALDL port to stop
any communication on the data line. This would include in-car systems such as a body
(suspension) computer and dash board modules which retrieve data from the ECM constantly
over the diagnostic line. This communication must be stopped for the diagnostic equipment
to accesses data from the ECM consistently at full speed.
Mode 1 - is used to retrieve diagnostic data (the DDS) from the ECM. Each code mask has a
different set of data in its DDS. In Mode 1, the diagnostic equipment or ALDL device (ie – TP)
sends the Mode 1 commands over the data line and the ECM replies with bytes of data. The
number of bytes returned is dependent on the ECM and the code mask running on the ECM
(code mask $8D running on the 1227730 ECM returns 66 bytes):
1 byte = the Message ID (0xF4 for $8D)
1 byte = the length of the message being transmitted by the ECM/received by
TP
1 byte = the Mode Number
63 Data bytes = the DDS = the values of those bytes at the time the data
sample is taken. It is the value of these bytes that are reported in alphabetical
order in each sample of a TP log file. These DDS bytes are hard-coded in the
code mask and cannot be changed without modifying the code mask program
code with a hex editor. How to do that is beyond the scope of this
documentation.
Mode 2 - is used to request 64 bytes of memory from the ECM starting at a specified
address. The most significant byte (MSB) of the desired memory start address and least
significant byte (LSB) is transmitted after the mode 2 byte to tell the ECM at which address
to start the memory dump. The ECM will then reply with the mode 2 Command Set and the
desired 64 bytes of data.
Mode 3 – is used to request up to 8 defined addresses (bytes of data). The eight desired
addresses are transmitted after the mode 3 command. These addresses are transmitted with
the most significant byte first followed by the least significant byte. The ECM will then reply
with the mode 3 Command Set and the desired 1 to 8 bytes of data. These addresses can be
any addresses in the whole system including registers, RAM, and ROM.
Mode 4 is a controller mode where the user may change engine fuel, spark, and other engine
parameters. It is primarily used for GM development and debugging.
Mode 10 - is used to clear any trouble codes the ECM has stored. A trouble code is a code
stored in the ECM memory when it detects a fault or error in any of its sensor readings. This
is commonly seen by the end user as a “service engine soon” light on the dash board. The
ECM code masks generally have 64 trouble codes stored in 8 bytes, with each bit
representing a trouble code. A mode 10 Command Set can be transmitted to the ECM to
clear all stored trouble codes.
Attached Images
Send.JPG (62.0 KB, 152 views)
Reply.JPG (66.3 KB, 138 views)
Macro.JPG (66.7 KB, 140 views)
Default Mode 1 Header.JPG (74.3 KB, 138 views)
Mode 3 Header.JPG (76.0 KB, 134 views)
Values.JPG (65.2 KB, 138 views)
In MAP AE Bit Mask.JPG (58.3 KB, 137 views)
Item List View.JPG (54.4 KB, 139 views)
Similar Threads
Still getting to know tunerpro. 1992 lt1 First data log Replies: 27
By Leviathancj7 in forum TunerPro Tuning Talk Last Post: 09-29-2013, 01:43 AM
getting started with tunerpro and aldl cable for dummies. Replies: 8
By one92rs in forum TunerPro Tuning Talk Last Post: 11-25-2012, 02:27 AM
$8d ECU Diagnostic Data Stream Returned in Mode 1 by ECM guy Replies: 0
By EagleMark in forum Fuel Injection Writeups Articles and How to New and Old Last Post: 12-09-2011, 07:55 PM
All times are GMT +3. The time now is 01:24 PM.