Announcement

Collapse
No announcement yet.

Packed data anyone????????

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Packed data anyone????????

    Hey everyone, I know someone can help me here. I created the OBD program OBD INFORMER and everything works rather well however when I try to capture data from a lot of sensors, it take around 6 seconds per cycle. I would like to use the packed data mode on the elms 323 interface but I dont know how to read the data in VB6.

    right now i have a comport called obd2 and I read the data into a string using the normal data mode so it looks like this....

    obd2.Output = "010D" & vbCr
    Do
    mystrg = mystrg & frmObd2.obd2.Input
    Loop While InStr(1, mystrg, ">", vbTextCompare) < 1
    B1 = Mid(mystrg, 7, 2)
    'convert selection into decimal
    B3 = ("&H" & B1)
    'Do calculation for speed
    Speed = (B3 * 0.6215)

    Can someone post the same code sample using packed data mode????? I know someone can help me here! THANKS EVERYONE!!!

  • #2
    Answer

    Well if anyone wants the solution, here it is!

    obd2.Output = "010D" & vbCr
    Do
    mystrg = mystrg & obd2.Input
    'Debug.Print mystrg
    DoEvents
    Loop While InStr(1, mystrg, ">", vbTextCompare) < 1
    bytes = StrConv(mystrg, vbFromUnicode)
    If UBound(bytes) >= 3 Then
    'Do calculation for speed
    Speed = (bytes(3) * 0.6215)
    end if

    Comment


    • #3
      Originally posted by jfiliaul View Post
      Well if anyone wants the solution, here it is!

      obd2.Output = "010D" & vbCr
      Do
      mystrg = mystrg & obd2.Input
      'Debug.Print mystrg
      DoEvents
      Loop While InStr(1, mystrg, ">", vbTextCompare) < 1
      bytes = StrConv(mystrg, vbFromUnicode)
      If UBound(bytes) >= 3 Then
      'Do calculation for speed
      Speed = (bytes(3) * 0.6215)
      end if
      Is it really any faster using the packed data mode?

      Vitaliy
      OBDLink MX: world's smallest, fastest, most advanced OBD/Bluetooth adapter with SW and MS CAN support. Read the review to learn more.
      Need to look up a diagnostic trouble code? Try the most up-to-date, free DTCsearch.com!

      You cannot send me a private message using this forum. Use my email instead: vitaliy[@]scantool.net.

      Comment


      • #4
        Originally posted by Vitaliy View Post
        Is it really any faster using the packed data mode?

        Vitaliy
        Truth is, NO its really not. the documentation says it is 2 to 3 times faster but in my case its really not! The other thing I'm afraid of, if I use packed data mode, it is not supported with the ELM 327. Im not sure what I'm going to do now.

        Comment


        • #5
          Send me an email, vitaliy at scantool.net. I may be able to help.
          OBDLink MX: world's smallest, fastest, most advanced OBD/Bluetooth adapter with SW and MS CAN support. Read the review to learn more.
          Need to look up a diagnostic trouble code? Try the most up-to-date, free DTCsearch.com!

          You cannot send me a private message using this forum. Use my email instead: vitaliy[@]scantool.net.

          Comment

          Working...
          X