SSM Initialization code in VB, How?

User topics relating to software that logs data from ECUs

Moderator: Freon

SSM Initialization code in VB, How?

Postby Navybluesubaru » Wed Dec 28, 2005 4:46 pm

I have been searching and searching for days now and have found very little regarding what I am trying to do. I have seen other program such as ECUexplorer and cdvma's new logger program. What I am trying to do is sync up with the ECU via SSM, but I cannot find the instructions anywhere. I am also going to write my program in Visual Basic 6.0. While many/most wont have any source code for me to look at or use, If you could just help me by telling me the procedure for the syncronizing up and I can figure out how to code it in VB.

For obd2 I have read stuff like 5 baud send 0x33 blah blah but I cant do that with my mscommctrl, the baud wont go that low. I am looking for a SSM specific set of instructions. Does anybody know where I can find this information?

Thanks in advance,
Jeff C
Navybluesubaru
 
Posts: 52
Joined: Wed Dec 28, 2005 4:19 pm
Location: Jacksonville

Postby wheelerjb » Thu Dec 29, 2005 10:04 am

I'm the same boat as you, and maybe this will help.

http://www.multiplex-engineering.com/tech/manual/

Atleast I think it is a start
wheelerjb
 
Posts: 10
Joined: Tue Dec 20, 2005 2:11 pm

here is the protocol

Postby cboles » Thu Dec 29, 2005 10:21 am

cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Postby wheelerjb » Thu Dec 29, 2005 12:47 pm

MONEY!! you sir, are a genius.
wheelerjb
 
Posts: 10
Joined: Tue Dec 20, 2005 2:11 pm

Postby Navybluesubaru » Tue Jan 03, 2006 12:47 pm

So how might one initialize a connection with the ecu? And is this possible with a typical MSComm32 port interface? I plan on using visual basic 6. Thanks for the help so far, its something to work with.

Jeff
Navybluesubaru
 
Posts: 52
Joined: Wed Dec 28, 2005 4:19 pm
Location: Jacksonville

Postby cdvma » Tue Jan 03, 2006 1:38 pm

Just open the serial port at the right baud rate with the usual 8 bit communication and, yea, thats about it. Did you read the document posted by cboles at all?
cdvma
 
Posts: 86
Joined: Tue Jan 04, 2005 9:18 pm
Location: Roch. Inst. of Tech.

Postby Navybluesubaru » Wed Jan 04, 2006 6:17 am

Yes I read through it. Nothing specified exactly how to "sync up" with it or if it was even required. Im sure you are aware of what must be done with a standard obd2 which is a real headache to perform IMO. I figured that SSM had something similar but if all you have to do is just "Open the port" then thats easy enough.

I saw the document and where it shows what to send and how to format what you get back into something more relavent like rpm, manifold pressure, etc. I am now only going to have small problems sending those goofy hex strings over the port; is there an exact way to do it or what? Just send it as a text string literally? I think I have some sample code that format it properly but i'm going to have to look kinda hard to re-find it.

Jeff
Navybluesubaru
 
Posts: 52
Joined: Wed Dec 28, 2005 4:19 pm
Location: Jacksonville

Re: SSM Initialization code in VB, How?

Postby Nemis » Wed Jan 04, 2006 11:05 am

Navybluesubaru wrote:I have been searching and searching for days now and have found very little regarding what I am trying to do. I have seen other program such as ECUexplorer and cdvma's new logger program. What I am trying to do is sync up with the ECU via SSM, but I cannot find the instructions anywhere.


???


if visual basic not too different to qbasic :
http://forums.openecu.org/viewtopic.php ... ight=basic
Nemis
 
Posts: 66
Joined: Thu Dec 30, 2004 3:58 am
Location: italy

Postby Navybluesubaru » Thu Jan 05, 2006 9:02 am

QBasic code and vb code are not similar enough for me to use that. Glancing at it I dont recognize very much. Despite both being basic I dont really see a similarity.

btw I think i've got what I was looking for, i'll keep everybody posted to my findings when I test out the software in a few days.

Jeff
Navybluesubaru
 
Posts: 52
Joined: Wed Dec 28, 2005 4:19 pm
Location: Jacksonville

Postby cdvma » Thu Jan 05, 2006 9:17 am

Navybluesubaru wrote:I am now only going to have small problems sending those goofy hex strings over the port; is there an exact way to do it or what? Just send it as a text string literally?


No, you send the actual "goofy" hex values down the line.
cdvma
 
Posts: 86
Joined: Tue Jan 04, 2005 9:18 pm
Location: Roch. Inst. of Tech.

Postby Navybluesubaru » Thu Jan 05, 2006 10:30 am

So for example....

To initialize the Ecu send this:
"0x80 0x10 0xF0 0x01 0xBF 0x40" just exactly like that?

And to probe for Coolant temp:
"0x80 0x10 0xF0 0x04 0xA8 0x000008 0x34"

Here are my questions:
1. Must you send the "0x" that is before each set of characters?
2. Must you send probe data such as coolant in full length i.e. 0x000008 or can you just send P0x008?

I am starting to grasp the whole ssm thing and i'm reading the document by brendan stewart but it is a bit vauge in some areas.

Jeff
Navybluesubaru
 
Posts: 52
Joined: Wed Dec 28, 2005 4:19 pm
Location: Jacksonville

Postby cdvma » Thu Jan 05, 2006 5:53 pm

:shock:

The "0x" means that the number is expressed as hexidecimal. So 0xFF is hex for 255 and 0x0A is hex for 10 ect ect ect ect.

Each hex letter is represented by four bits. Two hex characters is 8 bits which is one byte. By saying send 0x000008 it means send three bytes - two zeros and one 8.

Just for reference, these are common ways of showing hex and binary:

Decimal:
254

Hex:
0xFE
FEh

Binary:
11111110b

I could tell you to send
"0x80 0x10 0xF0 0x04 0xA8 0x000008 0x34"
or I could say send
"0x8010F004A800000834"
and it would be the same exact thing because you are only sending one byte at a time anyway. Do not try and print what you are sending without converting it to ascii because it will appear as goop. Most of the stuff is either unprintable characters or extended ascii.
cdvma
 
Posts: 86
Joined: Tue Jan 04, 2005 9:18 pm
Location: Roch. Inst. of Tech.

Postby Navybluesubaru » Thu Jan 05, 2006 7:30 pm

So what kind of output will the SSM ecu actually recognize?

1. 0x80 0x10 0xF0 0x04 0xA8 0x00 0x00 0x08 0x34
2. 0x80 0x10 0xF0 0x04 0xA8 0x000008 0x34
3. 0x80 10 F0 04 A8 000008 34
4. 0x8010F004A800000834
5. 0x8010F004A80834

I am pretty positive 1 would work, and I hope that 2 could work as well. The further down you go in the list, you can see that it obviously gets more efficient due to less characters being sent. Notice the difference between 4 and 5 is just the reduction of the 4 "0"s that would ordinarally go as the beginning of the "000008".

As of right now my program outputs in format #1.

Jeff
Navybluesubaru
 
Posts: 52
Joined: Wed Dec 28, 2005 4:19 pm
Location: Jacksonville

Postby cboles » Thu Jan 05, 2006 7:46 pm

I think the semantics are confusing you. We are not talking about ASCII text here... the ECU talks to you over the serial port using binary encoded numbers. In fact this is all your computer ever deals with internally. We most often talk about these in "human terms" using hexidecimal notation or some such, but in the end there is only one way to send these numbers down the wire, and only one way the ECU will respond in kind. Computers represent numbers internally using a binary coding scheme. I can say to send 0x33 (hexidecimal), or 51 (decimal) or 00110011 (binary) out the serial port, and in each case I am saying to send the same single byte value out the port. Which in the case of a serial port, it sends these bits out one at a time on the wire using a special chip called a UART, which relieves your software from dealing with such low-level details. Make sense?
cboles
Site Admin
 
Posts: 1233
Joined: Wed Dec 29, 2004 5:45 pm
Location: Seattle, WA

Postby Navybluesubaru » Thu Jan 05, 2006 9:02 pm

I am already aware of how computers work. I already knew that the data is ultimately converted into 1's and 0's to be sent. What I want to know is when the ECU converts the stuff comming in, does it care if the spaces are in there? It will convert the spaces back into something, even if they are an ascii concept. Also, how does my Comm control have any idea whether or not i genuinely want to send "0x1C" just like that, or if I want it to know that its a hex string? It doesnt really have any idea that the C is supposed to be hex so it will just send the ascii letter "C" in binary code rather than realize it is actually HEX for the DEC of "12".

Perhaps somewhere in microsoft documentation they state something that expresses how the MSComm32 control interprets data. Im guessing it sees ascii. I guess i'll have to play around with it and try different ways of sending it out. Nobody else has used VB6 to make a logger so how would anybody else have a clue about the output method used in the mscomm32 control?

Jeff
Navybluesubaru
 
Posts: 52
Joined: Wed Dec 28, 2005 4:19 pm
Location: Jacksonville

Next

Return to Data Logging Software

Who is online

Users browsing this forum: No registered users and 8 guests