This is where the BIN Hackers and definition junkies discuss the inner workings of the EEC code and hardware. General tuning questions do not go here. Only technical/hardware-specific/code questions and discussions belong here.

Moderators: EDS50, cgrey8, 2Shaker, Jon 94GT

Post Reply
JLyons
Gear Head
Posts: 55
Joined: Sun Nov 27, 2011 9:45 pm

Changing a QH Tune Through a Program

Post by JLyons » Sun Nov 27, 2011 9:50 pm

Is it possible to build a program through VB or C# that allows you to select which tune to use in QH? I would like to have a CarPC with a front end that I can switch my tunes by just clicking a button. I am a fairly competent programmer and was wondering if this has been done before? If so, how did you go about it? Thanks for any help,

Josh

User avatar
cgrey8
Administrator
Posts: 11304
Joined: Fri Jun 24, 2005 5:54 am
Location: Acworth, Ga (Metro Atlanta)
Contact:

Re: Changing a QH Tune Through a Program

Post by cgrey8 » Sun Nov 27, 2011 10:11 pm

I don't know that it's been done, but it's relatively easy to do. Writing a C# or VB program to just change the tune position in the QH shouldn't be a difficult thing to do at all...maybe an afternoon project. The QH's command documentation is published somewhere on the Moates website. If you don't find it, contact Craig for the document that lists the ASCII commands that tell the QH what mode to be in, what tune position to be in, and a whole slew of other crap necessary to do everything the QH can do. If I remember, it's an Excel spreadsheet of commands with comments.
...Always Somethin'

89 Ranger Supercab, 331 w/GT40p heads, ported Explorer lower, Crane Powermax 2020 cam, FMS Explorer (GT40p) headers, aftermarket T5 'Z-Spec', GUFB, Moates QuarterHorse tuned using BE&EA

Member V8-Ranger.com

JLyons
Gear Head
Posts: 55
Joined: Sun Nov 27, 2011 9:45 pm

Re: Changing a QH Tune Through a Program

Post by JLyons » Mon Nov 28, 2011 12:07 pm

Okay awesome I'll take a look around the qh site. Thanks.
408 Cleveland, Shorty Headers,
T-5, 3V CHI Header/Intake Combo,
LC-1, BE 2012, EEC Analyzer
EEC-IV (A9L)
62 lb/hr Injectors
Cam: 242/248@.50 .600 Lift L/C 110
Pro-M 30# MAF

JLyons
Gear Head
Posts: 55
Joined: Sun Nov 27, 2011 9:45 pm

Re: Changing a QH Tune Through a Program

Post by JLyons » Thu Dec 01, 2011 7:26 pm

Figured it out with the help of Dave from moates. You basically just set up a serial connection to whatever port the QH is installed on. You send commands based on the protocals by Moates. The kicker is you have to send everything in Hex. So to read the mode and position of the tune currently selected you would send:

String (The english version) - H (Saying to check EEProm) R (Saying to read from QH) 3 (Saying to Read 3 bytes) 0100 (Saying to read from this address) and a checksum (A no carry addition of the previous message.

Hex (What you actually send to the computer) - 48 57 03 01 00 9e

48 - H, 57 - W, 03 - Bytes to Read, 01 00 - Memory address, 9e - Checksum

Hope this helps someone.

v/r

Josh
408 Cleveland, Shorty Headers,
T-5, 3V CHI Header/Intake Combo,
LC-1, BE 2012, EEC Analyzer
EEC-IV (A9L)
62 lb/hr Injectors
Cam: 242/248@.50 .600 Lift L/C 110
Pro-M 30# MAF

User avatar
cgrey8
Administrator
Posts: 11304
Joined: Fri Jun 24, 2005 5:54 am
Location: Acworth, Ga (Metro Atlanta)
Contact:

Re: Changing a QH Tune Through a Program

Post by cgrey8 » Thu Dec 01, 2011 7:40 pm

Also note that if you do deal with the tune selection, the tunes, as defined in BE do not have a 1-to-1 relationship with the tune position defined by the Moates documentation. Clint did this so that "Mode1 Tune1" would be the same as "Mode2 Tune1". Using the Moates documentation, they aren't. The tune numbers get shifted around a bit thus Mode1 Tune1 is actually Tune5 in Mode2 or something similar like that.

Also I think Tunes start counting at 0 in the Moates documentation, not at 1. To the average BE user, they never see that craziness. But as a communications developer, you'll have to be aware of it so it'll make sense why when YOUR program commands Tune 1, you actually get some other tune you didn't expect if the tune was loaded using BE.
...Always Somethin'

89 Ranger Supercab, 331 w/GT40p heads, ported Explorer lower, Crane Powermax 2020 cam, FMS Explorer (GT40p) headers, aftermarket T5 'Z-Spec', GUFB, Moates QuarterHorse tuned using BE&EA

Member V8-Ranger.com

JLyons
Gear Head
Posts: 55
Joined: Sun Nov 27, 2011 9:45 pm

Re: Changing a QH Tune Through a Program

Post by JLyons » Thu Dec 01, 2011 7:49 pm

Exactly...I noticed that. I had BE up and changed the tunes. Then read the memory using my program and was like what is going on lol. Took me a few changes to notice the pattern. Thanks for the heads up!
408 Cleveland, Shorty Headers,
T-5, 3V CHI Header/Intake Combo,
LC-1, BE 2012, EEC Analyzer
EEC-IV (A9L)
62 lb/hr Injectors
Cam: 242/248@.50 .600 Lift L/C 110
Pro-M 30# MAF

decipha

Re: Changing a QH Tune Through a Program

Post by decipha » Fri Dec 02, 2011 1:05 am

its typical for a lot of programmers to begin at 0, in some instances it makes sense to, in others it doen't, at least not to me, afaik i think im the only one that starts off sequences at 1

Maglin
Gear Head
Posts: 4
Joined: Mon Jan 16, 2012 6:45 pm

Re: Changing a QH Tune Through a Program

Post by Maglin » Thu Jan 19, 2012 8:25 pm

Subscribed.

I really like this idea. You could even take it a step further if you already have to use a serial protocol. If you made it for a smartphone (droid, iPhone) and also give the ability to datalog I think you would be hitting on something not explored yet. You could even sale it for say $10 on the market or app store and make a little cash for your efforts. I would get it for the droid if it was available. Since they both have USB It would be an easy hook up. Then you could log and change tunes with the very item that is in your pocket most the times. I used to use a Palm to log back in the day with my DSM long before smartphones where abundant. I'm interested to see where this goes.
Jeremiah
1985 Mustang LX Hatch
- 351 roller w/ TFTW Heads / Large cam / TF R Intake / 39# Injectors / C&L MAS / Long Tube headers / Tremic 3550 TKO II / 3.55 gears / 5 lug / 4 wheel cobra brakes / 18" Boyd F22's

vristang
Tuning Addict
Posts: 919
Joined: Wed Sep 14, 2005 1:40 pm
Location: Seattle Wa
Contact:

Re: Changing a QH Tune Through a Program

Post by vristang » Sat Jan 21, 2012 12:15 pm

Any functionality via an iphone would be cool.
Even if it was just the ability to view/log AFR...
90 GT - In storage, waiting for an engine... probably 351w based and EEC-V for CoP.
87 LX N/A 2.3 - CZAJL & EDIS
http://tunexchange.mustang-tech.org/ - RIP
http://www.SeattleBlueOvals.com - My Local Site

If we knew what we were doing, we wouldn’t call it research, would we? - Albert Einstein

mpaton
BIN Hacker
Posts: 381
Joined: Mon Jun 23, 2008 1:39 pm

Re: Changing a QH Tune Through a Program

Post by mpaton » Mon Mar 16, 2015 7:36 pm

decipha wrote:its typical for a lot of programmers to begin at 0, in some instances it makes sense to, in others it doen't, at least not to me, afaik i think im the only one that starts off sequences at 1
So at heart you're really a FORTRAN programmer

decipha

Re: Changing a QH Tune Through a Program

Post by decipha » Tue Mar 17, 2015 10:20 am

busted! :lol:

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests