RE: Logging CAN messages
[email protected] Sun, 01 Nov 2020 10:12:09 +0100
| Newsgroups | gmane.comp.hardware.bus.can |
|---|---|
| Message-ID | <[email protected]> |
Hello John, Just one remark. I was not suggesting that you (or your customer) would=20 make the change in the firmware. It would be an upgrade of the existing=20 software and done by myself. Kees John Dammeyer schreef op 31.10.2020 21:45: > Hi Kees, >=20 > That product is close to what they need. Nicely done! >=20 > 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. >=20 > 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. >=20 > 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. >=20 > 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. >=20 > I'll talk to the client and mention your product. Not that interested > in making changes in Basic though. >=20 > Thanks again >=20 > John Dammeyer >=20 > 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 >=20 > Hi John, >=20 > 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. >=20 > 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. >=20 > The result of the logging can be directly uploaded to a PC through the > USB interface or locally stored on an SD flash card. >=20 > So far my input. >=20 > Cheers >=20 > Kees >=20 > Op 30-10-2020 om 06:50 schreef John Dammeyer: >=20 >> 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. >>=20 >> 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. >>=20 >> Essentially the system shows random faults and they'd like to know >> what happened for 5 seconds on either side of the event. >>=20 >> 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. >>=20 >> Does a tool like that exist? >>=20 >> Thanks >>=20 >> John Dammeyer >>=20 >> "ELS! Nothing else works as well for your Lathe" >>=20 >> Automation Artisans Inc. >>=20 >> www dot autoartisans dot com >=20 > -- >=20 > Kees Zagers >=20 > SI-KWADRAAT B.V. >=20 > Van Kemenadelaan 13 >=20 > 5674 PP NUENEN >=20 > Tel. +31(0)40-2839582 >=20 > [email protected] >=20 >=20 > Links: > ------ > [1] http://www.unicanner.com -- Archives and useful links: http://groups.yahoo.com/group/CANbus Subscribe and unsubscribe at www.vector.com/canlist/ Report any problems to <[email protected]>