CAN-FD long capture

Post any questions you may have about our current range of oscilloscopes
Post Reply
sejosef
Newbie
Posts: 0
Joined: Tue Jun 25, 2024 12:09 pm

CAN-FD long capture

Post by sejosef »

Is it possible to capture a 70 second CAN-FD waveform with reliable serial decoding with a USB oscilloscope? Do you have experience with this? What type would you recommend?

bennog
Advanced User
Advanced User
Posts: 217
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: CAN-FD long capture

Post by bennog »

what is the basic baudrate of the can bus.
If it it for example 500kbit then the FD part is 4000kbit.
So if you want to decode this you need at least 5 times preferred 10 times the sample rate.
So for the 5 times you need to sample at 20mS/s, for 70 seconds this will give you 1.4G-samples.

PS7 will only allow up to a total of 250M samples.

So not with the picoscope software.
However if you use the SDK and save the data in sigrok format then you can view and decode it in pulseview.
You can do this with all the scopes of the 3000 and up series scope. For the 2000 series I am not sure if they can stream at 20MS/second.

P.S. I am to lazy to look up the streaming specs of the 2000 series scopes.

Benno

sejosef
Newbie
Posts: 0
Joined: Tue Jun 25, 2024 12:09 pm

Re: CAN-FD long capture

Post by sejosef »

Thank you for your reply. Your calculations are correct. PulseView is very interesting software. I definitely need to take a closer look at it. I don't understand why PicoScope has a limited number of samples to 250Ms. I can't buy a product for my company that I won't be able to use immediately and will take some time to program. Has anyone tried to create such a program?

Josef

bennog
Advanced User
Advanced User
Posts: 217
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: CAN-FD long capture

Post by bennog »

I use the pico SDK for this when we have a complex problem and there is no way to trigger on the problem in picoscope. Then capture in streaming mode at the desired sample rate for as long as needed and only keeping the last 500M samples. When the problem is detected there is also 100M samples waited after the problem and then the 600M samples are saved to a sigrok file.
The first time this take a lot of development and searching. But after that you can take your previous project modify it and use for the new problem.

If I have a lot of time (2 weeks or so) I will reverse engineer the .psdata format and save in .psdata (because the picoscope UI is better than sigrok pulseview)

Benno

sejosef
Newbie
Posts: 0
Joined: Tue Jun 25, 2024 12:09 pm

Re: CAN-FD long capture

Post by sejosef »

Benno, I envy you your SW. Your idea to convert the data format to .psdata is interesting but the question is whether PicoScope SW will be able to handle larger files with .psdata extension. The limitation to 250Ms may be in the size of the data that can be processed.
Otherwise I came across one possibility that would partially solve my problem. I discovered the CAN Logger from CSS Elektronics. This allows the packets to be decoded directly and stored on the SD card. Unfortunately it is not possible to monitor the signals analogue and it will be harder to find the cause of the problem. Also, it is not possible to monitor any other signal synchronously if needed.

bennog
Advanced User
Advanced User
Posts: 217
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: CAN-FD long capture

Post by bennog »

This are the problems we were looking for.
There is no way you can trigger on this in the picoscope software.
The above was triggered from a IO when we got a bus heavy or bus off.
But later we discovered this happened far more often not generating errors on the bus.
For this I saved the data in sigrok .sr files and did the decodeint in pulseview.
I used the Pico SDK to capture the data in streaming mode 24/7 and save in .sr files when the Realtime analysis of the stream data showed something strange.

Benno
Attachments
2024-06-29_13-22-49.png

nurber
Active User
Active User
Posts: 12
Joined: Fri Mar 24, 2017 6:05 pm

Re: CAN-FD long capture

Post by nurber »

bennog wrote:
Wed Jun 26, 2024 6:16 pm
If I have a lot of time (2 weeks or so) I will reverse engineer the .psdata format and save in .psdata (because the picoscope UI is better than sigrok pulseview)

Benno
Benno, tried PMing you, but the message sits in outbox for whatever reason. Noticed that latest beta ( Windows only ) includes a .psdata conversion tool to csv, text or Matlab. In case you are not aware...

bennog
Advanced User
Advanced User
Posts: 217
Joined: Mon Nov 26, 2012 9:16 am
Location: Netherlands

Re: CAN-FD long capture

Post by bennog »

The CSV and matlab output I know of.
It is for me more the other way around have data captured in the SDK and write to a .psdata file.
For now I write to a sigrok pulseview .sd file. The .sd has no size limits and the UI is more sparse but also a lot faster than the picoscope UI.

sejosef
Newbie
Posts: 0
Joined: Tue Jun 25, 2024 12:09 pm

Re: CAN-FD long capture

Post by sejosef »

Benno, are both packets (0x1A1 and 0x0a2) sent by the same device? Because it looks like the transistor that controls the CAN_L signal is not working on one of the devices (the one sending the 0x0a2 packet). I also assume that at least 3 devices were connected to the network you caught it on.

Post Reply