View Single Post
Old 05-16-2005, 05:39 PM   #91
esteban2
Newbie
 
Join Date: Apr 2005
Posts: 15
Quote: Originally Posted by god_of_cpu
Post the log files for both the tester and your VB app. Also do you remember which line the assertion failures that your ignoring are happening on?

If your getting the same values over and over again, it probably means the main thread didn't start or stopped for some reason. Are you calling API_OBDII_Start before querying any packets? It could also mean there was an error reading the values from the ELM device. The logs should indicate this, but you can also catch this in your VB program by looking at the m_Flags member of the returned packet and seeing if it contains eOBDFlagError. You should never display a value if the packet flag indicates eOBDFlagError as it will be inaccurate.

You can also query values now with the CustomQuery call. This does not use the polling thread so it should ONLY be called before calling the Start function or after calling the stop function. It will block until it sends and recieves a response from the COM port, so you should not use this for displaying constantly updating values, but its easier to use for debugging purposes.


Code:
//We can also get any packet data in single shot mode simply by calling API_OBDII_CustomQuery //Well query for the voltage of an oxygen senor by sending mode 1, PID 0x14 if (g_Plugin.API_OBDII_CustomQuery(g_Plugin.m_lpUser, "01 14", &pktCustom)) { //Now process the packet //Oxygen Sensor Voltage = .005 * A int iOxyVoltage = (int) (0.005 * pkt.m_Data[0]); }

I also recieved my new ELM v2.0 chip in and SetTimeout function now works, but there was a bug with it so I should post a new version soon that should allow up to double the refresh rate with the v2.0 chips.

Also post your VB source file and I'll talke a look at it.

Hi!!!!



I need your help please!!!!

I am writing code in Visual Basic in order to communicate to the ECU with ELM interface. I don’t know very well how to write and read the commands I have to send/receive to talk to the ECU.

Could you help me please?

I’ll appreciate your help!!!

Regards



Esteban
esteban2 is offline   Reply With Quote