User avatar
garygid
Gold Member
Posts: 12465
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Fri Oct 19, 2012 10:58 am

Since you have a working Pascal program to receive your
logging data, and write the data to a log file...

Is your Log file format already compatible with the
One-CAN Log files that CAN-Do writes and reads?

If compatible, your program can capture the Log,
and your users could still use CAN-Do to examine
their Logs, and share the files with others.

These are binary, fixed length records of 12 bytes,
two time-stamp (second and millisecond) bytes,
then the two LL NH MsgID bytes, and 8 data bytes.

I do insert a Date-Time Pseudo Message just before
the first message in each minute. The LL NH are FF FF,
and the first 4 data bytes are seconds past 1970 (or
some such) and the next 3 are zero (for microseconds)
and the last byte is FF to indicate that there are no
microseconds.

The file extensions are ".evc" for EV-CAN, ".can" for the
CAR-CAN data, and ".avc" for the AV-CAN data.

The two time-stamp bytes are seconds * 1024 + milliseconds.
The sec are 0 through 59, and ms are 0 through 999.
See SOC/GID-Meter and CAN-Do Info
2010 Prius, now for sale
2011 LEAF, sold in 2015
2018 Tesla Model 3
2014 Tesla S, Model 3 in 2019
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Fri Oct 19, 2012 12:38 pm

Gary,

Frames that do not have n=8 are not sent. You will never see them.

If you go back and look at my very first post you will see a HyperTerminal dump of CAN frames in text format. Each byte of CAN data was sent as two ASCII characters with a CR+LF at the end of the Frame so I could just use HyperTerminal to display the data. I used copy and paste to capture the text data from HyperTerminal and paste into a text file.

The Pascal program I wrote only reads these text files and was used to verify the algorithm handled the CRC correctly. The algorithm was then translated into SX28 assembler code and is what I use to verify the CAN frame have been received correctly before sending it out the serial port (Bluetooth).

I have since changed the serial format to match your CAN-DO format which is raw hex data with the addition of the two extra CRC bytes. I can only log data using your CAN-DO program. I never had a program that did logging.

So no I do not have a working Pascal program to receive data from the serial port. I only have a test program to read a previously saved text file and check the CRC is good.

So bottom line is I still would like to have an option in CAN-DO to handle the extra two CRC bytes and to only accept frames with good CRC.

Jim

User avatar
garygid
Gold Member
Posts: 12465
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Fri Oct 19, 2012 4:23 pm

So, you just throw away the messages with N < 8?

Is there a reason, or was it just an accident?

There are about 25 MsgIDs that have N < 8.

I do not know how important they are, but...
maybe you know something that I don't?
(well, I am sure that you do... :D )
See SOC/GID-Meter and CAN-Do Info
2010 Prius, now for sale
2011 LEAF, sold in 2015
2018 Tesla Model 3
2014 Tesla S, Model 3 in 2019
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

User avatar
garygid
Gold Member
Posts: 12465
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Fri Oct 19, 2012 4:35 pm

Turbo3 wrote:Gary,
...

So bottom line is I still would like to have an option in CAN-DO to handle the extra two CRC bytes and to only accept frames with good CRC.

Jim
I will try to add the CRC checking of two extra bytes, and
I will assume that if N < 8, there are just (8-N) *8 fewer bits
in the string of bits to calculate the Checksum.

It might take me a week or two to get it added.

For now, do you only log the EV-CAN bus?
See SOC/GID-Meter and CAN-Do Info
2010 Prius, now for sale
2011 LEAF, sold in 2015
2018 Tesla Model 3
2014 Tesla S, Model 3 in 2019
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Sat Oct 20, 2012 12:02 pm

The current product has only a single CAN Tranceiver installed that monitors the EV CAN bus. Therefore it is only possible to send out EV CAN messages over Bluetooth.

User avatar
garygid
Gold Member
Posts: 12465
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Wed Oct 24, 2012 6:26 am

I am adding a CRC-Check option to the CAN-Do's EV-CAN
input processing. I expect to have a version for you to test
later today. I will email it to you if you wish, or I could
PM a link to you if you prefer.

Cheers, Gary
See SOC/GID-Meter and CAN-Do Info
2010 Prius, now for sale
2011 LEAF, sold in 2015
2018 Tesla Model 3
2014 Tesla S, Model 3 in 2019
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

User avatar
garygid
Gold Member
Posts: 12465
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Wed Oct 24, 2012 6:59 am

You asked about getting paid via PayPal :

Generally people send money to an email address that
you have registered for use with your own PayPal account.
They are told that there are no fees (that they see or pay)
but as the money arrives in your account, PayPal subtracts
a fee, approximately 3% in the USA, and 4% for payments
from outside the USA.

There is a way to transfer funds from an existing account
balance to you (a personal transfer) that has no fees.
But, almost always, the fees apply.

You get an email describing the transaction, and you
can log into PayPal to print out a transaction detail
page, or listings of your account activity, with the gross
payments, the fees, and your account balance.

The net is available in your account to spend, or you can
arrange to transfer funds to an "attached" bank account.

People do not even need to have a PayPal account to
pay you, since they can use a credit card to fund a
transaction.
See SOC/GID-Meter and CAN-Do Info
2010 Prius, now for sale
2011 LEAF, sold in 2015
2018 Tesla Model 3
2014 Tesla S, Model 3 in 2019
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

Turbo3
Gold Member
Posts: 2011
Joined: Mon Jul 19, 2010 8:34 pm
Delivery Date: 12 May 2011
Leaf Number: 002191
Location: San Jose, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Wed Oct 24, 2012 12:05 pm

Gary,
You can either email the new version or send a link to this email address: WattsLeft.Meter@gmail.com and I will check it out for you. Will you be able to test the new code using the sample CRC frame I included?
Jim

User avatar
garygid
Gold Member
Posts: 12465
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Wed Oct 24, 2012 12:13 pm

I just sent you a PM with a link to CAN-Do v192 wich has
your CRC test as an option on the EV-Comm channel.

Yes, the test Frame that you posted passed my CRC test.
However, I might have messed up the whole Input Provess.

Cheers, Gary
See SOC/GID-Meter and CAN-Do Info
2010 Prius, now for sale
2011 LEAF, sold in 2015
2018 Tesla Model 3
2014 Tesla S, Model 3 in 2019
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

User avatar
garygid
Gold Member
Posts: 12465
Joined: Wed Apr 21, 2010 8:10 am
Delivery Date: 29 Mar 2011
Leaf Number: 000855
Location: Laguna Hills, Orange Co, CA

Re: WattsLeft™ Monitor (Parallax SX28AC/DP SOC/CAN Project)

Wed Oct 24, 2012 10:21 pm

Please let me know how v193 worked for you, with the CRC checking,
with and without the forced CRC-Check-True option. Thanks.
See SOC/GID-Meter and CAN-Do Info
2010 Prius, now for sale
2011 LEAF, sold in 2015
2018 Tesla Model 3
2014 Tesla S, Model 3 in 2019
PU: SDG&E
Solar PV: 33 x 225W -> 7 kW max AC
To Sell: X-treme 5000Li EV motorcycle

Return to “LEAF CANBus”