Sending commands

Discuss anything tuning related.

Moderators: Mangus, robertisaar, dex

Post Reply
sstraw
Posts: 2
Joined: Thu Jan 27, 2011 1:04 pm

Sending commands

Post by sstraw »

New TunerPro user. I don't do tuning, but got a cable so I could do some diagnostics on a 1995 GMC K/2500 7.4L

I'd like to issue a command to open the EGR valve to 'x' (while at idle), to verify that it is operational. I've absolutely no clue how to accomplish this - I've got it that I need to use the ADX Editor to tweak the "commands" and add a send command, but there's this magic byte string and nowhere do I know where to find the information I'd need to send.

Next though, I have no idea how I'd actually ISSUE the configured command.

Suggestions?
User avatar
Mangus
TunerPro Author
Posts: 1926
Joined: Wed Mar 19, 2003 1:49 pm

Post by Mangus »

This requires that you send a ALDL Mode 4 message, however, I don't know if EGR is one of the parameters that can modified. You might do a Net search on:

ALDL "Mode 4"

and see what comes up.
***************************************
TunerPro Author
1989 Trans Am
User avatar
Mangus
TunerPro Author
Posts: 1926
Joined: Wed Mar 19, 2003 1:49 pm

Post by Mangus »

For instance, here's some info on Mode 4 for 1227749 ECMs. Most of it is common to all P4 ECMs, but some may not be.

5.6.2.5 Mode 4 Input Message (ALDL Tester Request)
· ID
· MESSAGE LENGTH (2N + 11 + 85)
· MODE 4
· DISCRETE OUTPUT ENABLE CONTROL WORD *
· DISCRETE OUTPUT STATE WORD *
· MODE CONTROL ENABLE WORD *
· MODE CONTROL STATE WORD *
· PWM OUTPUT ENABLE CONTROL WORD *
· PWM OUTPUT DUTY CYCLE *
· FUNCTION MODIFICATION CONTROL WORD*
· IAC DESIRED POSITION/IDLE RPM *
· DESIRED A/F RATIO *
· SPARK ABSOLUTE/DELTA MODIFICATION *
· START ADDRESS HIGH
· START ADDRESS LOW
· -
· -
· ADDRESS N HIGH
· ADDRESS N LOW
· CHECK SUM
Where N is the number of data bytes requested (0 to 8). See "Mode 4 - ECM Function
Modification Mode Table".
The ECM will respond with the following message:
· ID
· MESSAGE LENGTH = 85 + N + 1 (N = 0 to 8)
· MODE = $04 Hex.
· ADDRESS 1 CONTENTS
· -
· -
· ADDRESS N CONTENTS
· CHECK SUM
The Function Modifications will have immediate response (next applicable program loop), and
will override the normal operation of the Outputs.
6.2.5.1 MODE 4 - ECM FUNCTION MODIFICATION MODE TABLE
1. Discrete Output Enable Control Word
Bit 0 = Check engine Light Control
Bit 1 = Fan Control
Bit 2 = Not Used
Bit 3 = Not Used
Bit 4 = Not Used
1 = Control enabled
0 = Control disabled
2. Discrete Output State Word
Bit 0 = Check Engine Light: 1 = On, 0 = Off
Bit 1 = Fan: 1 = On, 0 = Off
Bit 2 = Not Used
Bit 3 = Not Used
Bit 4 = Not Used
3. Mode Control Enable Word
Bit 0 = Fuel Closed Loop (C/L)
Bit 1 = Idle Air Control (IAC) C/L
Bit 2 = Not Used
Bit 3 = Spark Back-up (Does Not Force Fuel Backup)
Bit 4 = Block Learn Memory (BLM) Reset, (see Note 1)
Bit 5 = IAC Motor Reset, (See Note 2)
Bit 6 = Clear Malfunction Codes, (See Note 1)
Bit 7 = Fuel Back-up (COP 2 not toggled, also forces Spark Backup)
1= Select Function or feature
0 = Deselect
Note 1: Block Learn Memory Reset and Malfunction Code clearing can only occur
during the first pass through the Mode 4 logic.
Note 2: IAC Motor Reset can occur at any time while in Mode 4 logic, however, it can
only occur once
4. Mode Control State Word
Bit 0 = Fuel C/L: I = C/L, 0 = Not C/L
Bit I = IAC C/L: 1 = C/L, 0 = Not C/L
Bit 2 = Not Used
Bit 3 = Not Used
Bit 4 = Not Used
5. PWM Output Control Enable Word
Bit 0 = EGR Output
Bit 1 = A/C Output
Bit 2 = TCC Output
Bit 3 = Not Used
Bit 4 = Not Used
Bit 5 = Not Used
Bit 6 = Not Used
Bit 7 = Waste Gate
6. PWM Output Duty Cycle (0 - 100%)
7. Function Modification Control Word
Bit 0 = IAC Modification: 1 = Selected
Bit 1 = IAC: 0 = Position; 1 = RPM
Bit 2 = A/F Modification: 1 = Selected
Bit 3 = Spark Modification: 1 = Selected
Bit 4 = Spark: 0 = A8S; 1= Delta
Bit 5 = Spark: 0 = ADV; 1 = RTD
Bit 6 = Not Used
Bit 7 = Not Used
8.IAC Desired Position/Idle RPM
IAC Position (0 - 255) or RPM (0 - 3200)
9. Desired A/F Ratio
Open Loop A/F (0.0 - 25.5, N = A/F * 10)
10. Spark Absolute/Delta Modification (0 - 90 deg.)
***************************************
TunerPro Author
1989 Trans Am
sstraw
Posts: 2
Joined: Thu Jan 27, 2011 1:04 pm

Post by sstraw »

Mangus wrote:This requires that you send a ALDL Mode 4 message, however, I don't know if EGR is one of the parameters that can modified.
Well, let's say I figure out the specific byte sequence to send - how do I go about executing that in TunerPro? I've seen the command/macro editing stuff - I had to hack a definition to insert some delays (but there's a subsequent definition which resolved that). Let's say I get a byte sequence set up, how does one say "use it" ? I get the impression that various commands are tied to the UI in TunerPro, but that I can't define a new button or choose commands (unless I piggyback them on another).

On the plus side, I'm an old-school programmer (Assembler, C/C++), so hex and bitmasks aren't alien - it's just having an idea how to utilize the tool and make sure I'm not sending garbage to the ECU.

Is the checksum a simple "sum to zero"?
robertisaar
Author of Defs
Posts: 962
Joined: Sat Feb 21, 2009 3:18 pm
Location: Camden, MI

Post by robertisaar »

IMO, it would just be easier to apply +12V and a ground to the valve to get the same results.

i've done so with the 3-tower digital EGR setup with good results
Post Reply