FAQFAQ SearchSearch MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

 
Creating 160 baud ADX v.tutorial

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    TunerPro User Forum Forum Index -> ScannerPro Beta Discussion
 
Six_Shooter



Joined: 06 May 2007
Posts: 590

PostPosted: Sun May 11, 2008 2:09 pm    Post subject: Creating 160 baud ADX v.tutorial Reply with quote

Since I have now gone through the trouble of creating an ADX file from scratch, I thought I would post how this was done to help out other people.

This is what works for the 160 Baud data stream. The 8192 baud data stream differs.

You will need a few things before you get started.

One thing that is a must is a disassembly of the data stream that you will be working with.
You can find this information on www.moates.net, click on "File uploads and down loads" at the bottom of the left menu. You will be given instructions on how to access "fileman".
Follow the instructions, and once you have accessed the file area, browse to "data stream definitions". In that list you will find "ALDLstuff.zip".
Download this file and unzip it. In this you will find many, many data stream definitions. There is a word document to help you find the definition that you need for you application.
If the files don't automatically open, you can open them with notepad.

Read and understand Marks page on Hexidecimal, found here: http://tunerpro.net/tutorials/UnderstandingHex.htm

Now that you have the data stream definition, we can move on.

Open Scanner Pro.



Now click on "File" and then "New Definition". Alternately you can use the short cut of "Ctrl+N".



This will bring up the "Edit ADX" screen.



Skip to "Commands" and click on "add new item". This will bring up a box with a few selections. Click on "Listen for 160 Baud data" then click "ok"
You will need to give this a "Unique ID" Choose something, can be a number, a word, what ever you like.





You will then need to enter information on the "ADX Header data" screen. Add the Authors name (you), what version you are working on, and if you like a short description that pertains to the new adx.
Enter "4800" for baud, this is what is needed for the 160 baud data stream.
Check the RS232 Echo
Now click on the down arrows beside "Connection Command" and "Monitor Command", choose "listen for 160 data pack" for both.



Save your progress, by clicking on "Save As...", browse to a location to save it, and enter a name for your new adx.



I know you want to get to the Dashboard, but that will have to wait for now, we need to create a list of values and bits to use in the dashboard.

Click on "Values" then on "Add new item". This will bring up a value edit screen, and where it can be tricky or fun, depending on your outlook.



This is where you will need to refer to the ALDL data stream information that I told you to retrieve earlier.

In this list you will see "word", this is the byte at which the information for the parameter is sent down the datastream. The order repeats over and over.



Start by defining what you are going to display, by deleting "new item" and entering in your item in that box, such as "RPM" or "Engine Speed".
Give this item an "Unique ID", I usually use the byte number, to keep things simple.
Now you have to define the "Packet offset (Hex)". This is the byte number, converted to a Hexidecimal character.

In the 7747 data stream this is byte number 8. Now if you go to a straight conversion of the decimal 8 to hexidecimal, you will get 08, or "0x08". The packet offsets do not work this way in Scanner Pro,
you will end up with the wrong byte addressed to this parameter and the data output will not make sense.
You have to offset the byte number by -1, since the first byte or word of decimal "1" will actually be hexidecimal 00 or "0x00". Byte or "word" 2 will be 01 or 0x01, etc.



You will also need to add in the conversion, luckily the conversion needed is usually defined in the data stream definition. To add in the conversion, click on the "conversion tab" and then the "set" box which will open a new work box. For RPM in the $42 data stream this calculation is N*25, or another way to write it is "X*25".
Scanner Pro will tell you if what you enter looks like a valid conversion or not.



Continue on in the values until you have everything that you will want to display.



Next we will move onto "bitmasks" or "flags". These are values with a simple "on" and "off" function. These are a bit tricky, and took me a while longer to figure out how to define than the other byte values.

These are shown in the data stream definition within the bytes.



Start by entering in the item that is to be displayed, one example is the "Closed Loop" flag.



Again a unique ID is needed.

In the '7747 data stream, the "Closed Loop" flag is contained in byte "15", or "0x0E" in hex. But there's more to this than just entering the "Packet offset".

We have to come up with something to display when the value is "true" or "on". In this case I chose "closed", then we need to display a "false" or "off" value, in this case I chose "open".



Now we need to assign an operation to make this flag function.

This is where it gets a bit interesting, but is very simple once you realize there's a pattern to this.

Each bit has a set hex value, and this repeats for every bitmask bit in the data stream.

Here is the chart:

bit# hex
0 - 0x01
1 - 0x02
2 - 0x04
3 - 0x08
4 - 0x10
5 - 0x20
6 - 0x40
7 - 0x80

From the data stream definition you will see that the closed loop flag is bit 7, and referring to the above chart, that makes it's hex value 0x80.

Enter the same value for both "operand" and "result to test".



Now that you have defined the values and bitmasks, you can now create a dashboard to display the data stream. Refer to this thread started by Sil on creating a dashboard: http://tunerpro.net/forum/viewtopic.php?t=518

Have fun, and remember to share the adx files you come up with.



Once I create an 8192 baud ADX I'll make a tutorial for that as well, the above has worked for me for 160 baud $42 data stream, and as always, this information is provided as is, and I will not be responsible for you destroying your engine, damaging your car,
spontaneous human combustion, developing the horns of a devil, random optical drive ejects, batteries not included, some assembly IS required, additional parts and information not provided is the sole responsibility of the developer and will not be provided
here within, consult your physician before using this tutorial, some results may vary, good luck.
Back to top
View user's profile Send private message
 

Display posts from previous:   
View previous topic :: View next topic  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    TunerPro User Forum Forum Index -> ScannerPro Beta Discussion All times are GMT - 9 Hours
 
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 


Powered by phpBB © 2001, 2002 phpBB Group
RedSquare theme 1.0.3 © DoubleJ(Jan Jaap)