RE: Logging CAN messages

"John Dammeyer" <[email protected]> Sun, 1 Nov 2020 08:43:18 -0800
Newsgroups gmane.comp.hardware.bus.can
Message-ID <[email protected]>
Thanks Kees,
I've passed on the information for your product to my client.  It looks lik=
e I'm also going to be able to get one of these.  I've put a photo on my we=
b site since I don't remember if attachments work with this forum.
http://www.autoartisans.com/CAN/STU-2.jpg

It's got a PIC32 front end and connects via SPI to a PiZeroW and has GPS an=
d RTC.  Starts logging c/w RTC based time stamps on power up and once the P=
i is alive and GPS TOD information is there it transfers the files onto the=
 Pi SD card.  Each file holds 4000 messages which include TOD, Lat/Long/Alt=
itude once per second.

The only change to the PIC32 firmware will be info 'faked' CAN messages rep=
orting bus error conditions mixed in with the regular received CAN messages=
.  But that too will cost the customer so when I meet with them next week I=
'll know more.

John Dammeyer



> -----Original Message-----
> From: [email protected] [mailto:canlist-owner@vector-in=
formatik.com] On Behalf Of [email protected]
> Sent: November-01-20 1:12 AM
> To: [email protected]
> Subject: RE: [CANLIST] Logging CAN messages
>=20
> Hello John,
>=20
> Just one remark. I was not suggesting that you (or your customer) would
> make the change in the firmware. It would be an upgrade of the existing
> software and done by myself.
>=20
> Kees
>=20
>=20
> John Dammeyer schreef op 31.10.2020 21:45:
> > Hi Kees,
> >
> > That product is close to what they need.  Nicely done!
> >
> > Although when I had the scope on their system last Thursday it looks
> > like the messages were running at least every 10mS.  I think they said
> > 100Hz, 50Hz and 20Hz intervals.  I'd say I'd have to have the ability
> > to store at least 5,000 messages at 500kbps.
> >
> > A few years ago I did do a similar logging project.  They wanted the
> > data stored on a Raspberry PiZeroW and then upload to the cloud via
> > WiFi when available.
> >
> > We found that no matter what we did the Pi still took about 12 seconds
> > to boot.  Ultimately what I did was design and build a PIC32 front end
> > to timestamp and queue all messages.  Once the Pi was awake the PIC32
> > became an SPI slave to the Pi which then pulled up the stored
> > messages.
> >
> > Unfortunately I don't have access to the hardware or legally the
> > software.  I was hoping that there might be something that uses a
> > KVaser or Port or some other USB dongle and a PC application that
> > would do this.
> >
> > I'll talk to the client and mention your product.  Not that interested
> > in making changes in Basic though.
> >
> > Thanks again
> >
> > John Dammeyer
> >
> > FROM: [email protected]
> > [mailto:[email protected]] ON BEHALF OF Kees Zagers
> > SENT: October-31-20 11:53 AM
> > TO: [email protected]
> > SUBJECT: Re: [CANLIST] Logging CAN messages
> >
> > Hi John,
> >
> > In principle I created this functionality in my SI2CBB
> > (www.unicanner.com [1]). The embedded hardware has all the CAN
> > functionality in this case. The CANLOG command I created has the event
> > logging possibility. Button (connected to one of the Arduino pins),
> > specific message and error event can be defined by the user. The only
> > restriction is the fact that I used the standard circular FIFO buffer
> > of the built-in CAN controller of the Microchip PIC32. This buffer
> > only contains 32 messages. So the pre-trigger information is 32
> > messages, which probably will be a fraction of the messages during the
> > last five seconds. The post-trigger information can be as long as you
> > want. The PIC32 has the possibility to create 32 of these FIFO buffers
> > in RAM, where every FIFO can be linked to one or more filters and
> > masks. If all FIFO's are linked to the same filter and mask, they can
> > be cascaded, which gives us a buffer of 1024 messages. The problem
> > however in this case it is not circular; if the last FIFO is full it
> > stops. I have to check, but it should be possible to detect the buffer
> > full interrupt of the last FIFO and return to the first FIFO again. In
> > that case we can have at least 1 second of the pre-trigger messages in
> > a normal CANbus system.
> >
> > Anyway it is difficult to say how large the circular buffer should be
> > to contain the information of 5 or 10 seconds, because it depends of
> > course on the bus speed and bus load.
> >
> > The result of the logging can be directly uploaded to a PC through the
> > USB interface or locally stored on an SD flash card.
> >
> > So far my input.
> >
> > Cheers
> >
> > Kees
> >
> > Op 30-10-2020 om 06:50 schreef John Dammeyer:
> >
> >> I haven't kept up to date with newer developments over the last few
> >> years. My Lawicel CANUSB, RM CANUSB and monitor program plus
> >> whatever I've written has been adequate for the tasks I do.
> >>
> >> I've been asked to determine if a tool exists that can log CAN
> >> messages in a circular buffer. Say 10 seconds worth and when a
> >> trigger like either a message or say an error flag occurs the
> >> logging to the circular buffer goes for 5 seconds and then is
> >> stopped and saved.
> >>
> >> Essentially the system shows random faults and they'd like to know
> >> what happened for 5 seconds on either side of the event.
> >>
> >> The even can be: a contact closure like a button pressed by an
> >> operator; a specific message, Bus error as signaled by an error
> >> flag.
> >>
> >> Does a tool like that exist?
> >>
> >> Thanks
> >>
> >> John Dammeyer
> >>
> >> "ELS! Nothing else works as well for your Lathe"
> >>
> >> Automation Artisans Inc.
> >>
> >> www dot autoartisans dot com
> >
> > --
> >
> > Kees Zagers
> >
> > SI-KWADRAAT B.V.
> >
> > Van Kemenadelaan 13
> >
> > 5674 PP  NUENEN
> >
> > Tel. +31(0)40-2839582
> >
> > [email protected]
> >
> >
> > Links:
> > ------
> > [1] http://www.unicanner.com
>=20
> --
> Archives and useful links: http://groups.yahoo.com/group/CANbus
> Subscribe and unsubscribe at www.vector.com/canlist/
> Report any problems to <[email protected]>

--
Archives and useful links: http://groups.yahoo.com/group/CANbus
Subscribe and unsubscribe at www.vector.com/canlist/
Report any problems to <[email protected]>