1. Attachments are working again! Check out this thread for more details and to report any other bugs.

CAN-View Decoder software. Converts RAW Serial Output to something more useful.

Discussion in 'Gen 2 Prius Audio and Electronics' started by TheForce, May 20, 2008.

  1. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    This piece of software was originally written by Gary A. Morris. I take no credit in writing the software. I will however take credit for making a few changes to get it to work with the V4 CAN-View. :D

    Some background on why the program needed changed for my Can-View.

    According to Norm the V4 can-view should output 55 CAN messages from 0020 to 0602 or at least to 05C8. My V4 Can-View stops at 056D. So I'm missing data for the Lights - 057F, Gas Gauge - 05A4, Doors - 05B6, and Cruise - 05C8. Since Gary's program was trying to find the missing messages it would skip about 11 packets of information. Since a packet is captured about once every second this means that it would only decode about 4 to 5 packets per minute of captured time. This means that the decoded packets would only represent about 4 packets per minute of capture. Having only this much data is not very useful. So in order to fix it I had to change a setting in the code to tell it to stop looking for more messages after it found 056D and start to look for a new packet.

    Once that was done the next issue was that the program was looking for the EV mode message 0529 with 6 bytes of data. Well my V4 Can-View was giving 0529 with 7 bytes of data. This caused the program to skip it. This was an easy fix.

    Since fixing those two issues I can now get the program to convert the RAW output from the Can-View into a readable .cvs file that I can import in to a spreadsheet for further analysis.

    Since my Can-View leaves out the 4 pieces of data the new program I made may not work with different Can-View versions. In fact it might still work but if your Can-View outputs those 4 pieces of data that mine does not that extra data will not get converted and the results would just be blank for those fields.

    So if your trying to convert your captured data and Gary's original program will not convert your data correctly and my updated program will not convert it correctly the program will need to be reconfigured for your version of the Can-View. As long as I have the time and it does not require a lot of hard core programming or soft core programming for that matter I would be willing to get this program working with your captured data. All I will need is a sample of your captured data.

    A note about capturing RAW data. Data is sent about once per second but counted over a period of one minute it ends up being about 45 packets of data per minute.

    Now on to the good stuff. I will try to mirror some information on my website just in case the following sites go down or missing. Jay Groh dot com

    In order to capture data from your Can-View you need to follow the instructions here. Just make sure to set your parity to even, Data bits 8, Stop bits 1, Flow control to none.

    After you captured your data you will need to convert it to a cvs file so you can use it in a spread sheet.

    Go here for Gary's original program. CAN Decoder


    To run my updated software you will have to install the C++ package from Microsoft. Its a small 1.7MB download.
    Download details: Visual C++ 2008 Redistributable Package (x86)


    Here is my updated version for the V3 Can-View. Source is included. Will not work with data captured from the V4 or V4+.
    Current version for V3 Can-View.
    V3 1.8.2. Last updated 2008/05/31
    http://stuff.jaygroh.com/priuschat/candecoder/V3CANdecoder1.8.2.zip

    Known bugs in V3 1.8.2...
    None


    Here is my updated version for the V4 Can-View. Source is included. Will not work with data captured from the V3 or V4+.
    Current version for V4 Can-View.
    V4 1.8.2. Last updated 2008/05/31
    http://stuff.jaygroh.com/priuschat/candecoder/V4CANdecoder1.8.2.zip

    Known bugs in V4 1.8.2...
    None


    Here is my updated version for the V4+ Can-View. Source in included. Will not work with data captured from the V3 or V4.
    Current version for V4+ Can-View.
    V4+ 1.8.2. Last updated 2008/05/31
    http://stuff.jaygroh.com/priuschat/candecoder/V4+CANdecoder1.8.2.zip

    Known bugs in V4+ 1.8.2...
    None


    Index link so you can download previous versions.
    Index of /priuschat/candecoder

    Please report any issues, bugs, complaints, comments you have in this topic.
     
  2. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    After some more testing I believe that it is reporting skipped packets. When I compared the function of the Gary's original program with my updated version they both reported skipped packets the same way. I tested this by deleting some messages and corrupting one of my good capture files. I will retract my bug list unless someone can confirm that there is a bug with missing packets or if you find another bug.
     
  3. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    I loaded the V4+ software onto my V4 today and did a quick capture. I'm now getting all the messages up to 0602. The down side to running the V4+ software on a V4 is that
    1. you can't calibrate the scree. But calibration was not needed for me so everything else works fine. I just have to stay out of the calibration area.
    2. The output of packets is closer to one packet every two seconds. This means that instead of getting 45 packets per minute you would be getting about 31-35+ packets per minute. Its really not a big deal because your still getting plenty of data. I thing the slowdown is because more messages are being sent with each packet and its not a hardware issue.

    Also the candecoder software WILL need to be reworked for the V4+. I will post the new version as soon as I get it working.
     
  4. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    Finally figured out what was causing the problems decoding the V4+ data. CAN message 0020 in the V4+ data was actually 8020. This caused the program not to find the start of a packet. Since there is no useful data in message 0020 or in case of the V4+ 8020 I told to program to start with message 0022.

    This new program for the V4+ will not work with data captured from a regular V4.

    Also on the V4+ the packet output is about 31 packets per minute. A lot less than the regular V4 but thats still plenty of data to collect.
     
  5. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    It appears that if you cannot run my updated decoder software you must install a Visual C++ package from Microsoft. Here is the link.
    http://www.microsoft.com/downloads/...34-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en

    I will be updating the V4 and V4+ software shortly to convert the gas pedal, brake pedal, and gas gauge values into percentages. I will also be converting the VVTi, fuel flow, and fuel injector to real world values instead of the raw values. I will also be releasing a version for the V3 can-view with the updated converted values. As it stands right now Gary's program will work fine for the V3 can-view and no changes are needed.
     
  6. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    New versions for V3, V4, and V4+ Can-View versions.

    Change Log.

    All Can-View versions 1.8.2 May 31, 2008.
    Converted brake pedal, gas pedal, and gas gauge, value to a percentage.
    Converted VVTi value into before and after top dead center value.
    Converted shifter value into text. P R N D B.
    Converted lights value into text. Off, Parking, Headlights, HighBeams.
    Added conversion for fuel flow in L/hr or G/hr. Will automataclly get converted to desired units when you use the -US switch. Default is L/hr.
    Added conversion for iKM/L, MPG and added column to CSV. Will automataclly get converted to desired units when you use the -US switch. Default is iKM/L.
     
  7. livininspirit

    livininspirit New Member

    Joined:
    Apr 21, 2008
    27
    1
    0
    Location:
    Corona, CA
    Vehicle:
    Other Non-Hybrid


    is there a way to read in real time what the steering angle on the steering wheel is?
    also, what's the frequency that these messages are updated? 1Hz?

    Thanks!
     
  8. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    The V4+ Can-View outputs about 31 packets per minute. Or about one packet ever two seconds. This would be too slow for real time information of the steering sensor.
     
  9. Jack66

    Jack66 Kinda Jovial Member

    Joined:
    Jan 26, 2008
    766
    6
    0
    Location:
    Stafford, Virginia
    Vehicle:
    2008 Prius
    How does the controller get the real-time steering information if it doesn't get sent via the CAN? Livininspirit's question has me curious. :)
     
  10. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    Steering is located in CAN message 0x25.
     
  11. Jack66

    Jack66 Kinda Jovial Member

    Joined:
    Jan 26, 2008
    766
    6
    0
    Location:
    Stafford, Virginia
    Vehicle:
    2008 Prius
    So which is too slow for real-time, Jay? The actual rate of the CAN messages or the CAN-Viewer itself?
     
  12. TheForce

    TheForce Stop War! Lets Rave! Make Love!

    Joined:
    May 30, 2005
    3,461
    537
    0
    Location:
    Wheelersburg, Ohio
    Vehicle:
    2006 Prius
    Model:
    N/A
    The can-view is the bottleneck. This is because its doing other things in the background. Its not a dedicated CAN sniffer but it is used for plug-in Prius conversions and is designed to monitor all kinds of stuff. Read more about it here. Http://www.hybridinterfaces.ca