Capturing a bunch of CAN-frames, where one might be missing - (SDS800X) - Page 1
Forum section: electronics / testgear

author: eTobey
author_rank: Super Contributor
timestamp: March 24, 2024, 03:03:26 pm
content: Hi,i cant find a way to capture a bunch of frames, where there would be one missing or beeing corrupted. I can see the time of the error on my PC, but the error happens about a few thousands frames before that. When i use auto trigger, and hit the stop button, it then just keeps the waveform that was captured before. All that was aquired in the background gets lost. Rollmode would have been perfect for this, but this scope would not allow decoding in rollmode even when stopped.Its quite a tricky one, since its not reproducable, and is hidden in between all those frames, with a not known time position.Any suggestions how this could be done otherwise are welcome.

author: 2N3055
author_rank: Super Contributor
timestamp: March 24, 2024, 03:12:52 pm
content: Quote from: eTobey on March 24, 2024, 03:03:26 pmBuy CAN protocol analyzer. They are designed for this kind of work.

author: tautech
author_rank: Super Contributor
timestamp: March 24, 2024, 03:16:51 pm
content: Pretty darn simple IMO using a Single shot period trigger (to detect missing frame) and a slow timebase.Pre and Post trigger frames captured with missing frame on/near the trigger position.PPL overlook the most powerful scope feature, the trigger suite.Experiment and learn how really powerful it is.

author: nctnico
author_rank: Super Contributor
timestamp: March 24, 2024, 03:21:58 pm
content: Quote from: eTobey on March 24, 2024, 03:03:26 pmYou should use segmented recording mode with each record set as short as possible to still allow proper decoding. Secondly, use a trigger condition that matches the CAN message you are looking for the most. However, setting the trigger condition too strict may actually skip the bad message so still have no useful information. Is there some way you can automate the PC part so that when it sees a bad message, it sends a stop command to the scope?

author: eTobey
author_rank: Super Contributor
timestamp: March 24, 2024, 04:25:34 pm
content: Quote from: tautech on March 24, 2024, 03:16:51 pmI spend hours with this. Problem is, its thousands, and i cant filter that list. With a filter it would be possible to run through the list without beeing distraced by all that unrelevant frames.

author: eTobey
author_rank: Super Contributor
timestamp: March 24, 2024, 04:30:24 pm
content: Quote from: nctnico on March 24, 2024, 03:21:58 pmIf i would not get all that unrelevant frames, segmented recording might be a solution. But its limited, since i cant set the mem depth to lower than 10k, to get enough segments to see.I would go with sending a signal from the PC, i would rather use an arduino to build a simple CAN analyzer. Should have done this before already, but doing this with the scope is a good way to quickly grasp itslimitationscapabilities.

author: nctnico
author_rank: Super Contributor
timestamp: March 24, 2024, 04:32:05 pm
content: Quote from: eTobey on March 24, 2024, 04:25:34 pmExport the list as CSV and process /filter on a PC. Then go back to the segment with the timestamp of the bad message on the scope.

author: eTobey
author_rank: Super Contributor
timestamp: March 24, 2024, 04:34:24 pm
content: Quote from: nctnico on March 24, 2024, 04:32:05 pmThis is not so easy with that scope. You wont get a complete list out of it, even though you can scroll through all the frames.

author: Martin72
author_rank: Super Contributor
timestamp: March 24, 2024, 06:28:45 pm
content: In my case (normal acquisition) all 2000 frames are contained in the csv file.

author: JDubU
author_rank: Frequent Contributor
timestamp: March 24, 2024, 07:10:20 pm
content: You really want to use a logic analyzer for debugging messaging protocols like CAN. I have a Saleae Logic (https://www.saleae.com/) that is really good for this.An oscilloscope with serial protocol decoding is more useful for debugging communication failures caused by analog signal distortion within relatively short timeframes.

author: nctnico
author_rank: Super Contributor
timestamp: March 24, 2024, 07:28:58 pm
content: Quote from: JDubU on March 24, 2024, 07:10:20 pmI have the feeling the OP is hunting down a problem in the analog domain which occurs every now and then. From mentioning using a PC to see a message goes wrong, my guess is that the OP is using a CAN analyser already but that only tells something went wrong and when, but not what exactly is wrong with the signals on the bus. So using an oscilloscope is the right tool to show signal problems.

author: eTobey
author_rank: Super Contributor
timestamp: March 24, 2024, 08:10:18 pm
content: Quote from: Martin72 on March 24, 2024, 06:28:45 pmI want to know more.I see you have 23 frames in ~0.2s. That would make 1150 frames for the whole buffer at 1s/div. You didnt had 2s/div, had you?

author: tautech
author_rank: Super Contributor
timestamp: March 24, 2024, 08:31:31 pm
content: Quote from: eTobey on March 24, 2024, 04:25:34 pmI would do this in normal scope mode to detect the missing frame.Then with it captured engage Decode with previously correct settings and scroll pre and post trigger using H Pos.If as Martin says there is a 2k frame capability, you should have 1k frames each side of your trigger point capture.

author: eTobey
author_rank: Super Contributor
timestamp: March 24, 2024, 08:36:07 pm
content: Quote from: tautech on March 24, 2024, 08:31:31 pmPlease explain to me, how i should trigger "on a missing frame"! It has no edges, it has no id nor data.

author: eTobey
author_rank: Super Contributor
timestamp: March 24, 2024, 08:39:07 pm
content: If i havent had some more problem, then i think i fixed it. I believe, the frame got lost in Windows. I put a delay in it, and now it is working. Had a few BSOD´s after that though.

author: tautech
author_rank: Super Contributor
timestamp: March 24, 2024, 08:44:30 pm
content: Quote from: eTobey on March 24, 2024, 08:36:07 pmWe need more info.Frame rate is tied to a Clock is it not ?If missing and like this ----- ---- it should be easy to trigger on where the frame should be.Once captured we can engage Decode to investigate.

author: Martin72
author_rank: Super Contributor
timestamp: March 24, 2024, 08:50:25 pm
content: Quote from: eTobey on March 24, 2024, 08:10:18 pmYepp, 2s/div.

author: eTobey
author_rank: Super Contributor
timestamp: March 24, 2024, 08:55:34 pm
content: Quote from: Martin72 on March 24, 2024, 08:50:25 pmI guess you can see those undecoded frames on the right, when you scroll there? Let those others drop off on the left.

author: Martin72
author_rank: Super Contributor
timestamp: March 24, 2024, 09:04:09 pm
content: The list displayed on the screen can only be scrolled from top to bottom (and back), or what do you mean?

author: eTobey
author_rank: Super Contributor
timestamp: March 24, 2024, 09:14:03 pm
content: The horizontal axis.

author: nctnico
author_rank: Super Contributor
timestamp: March 24, 2024, 09:50:32 pm
content: Keep in mind that most DSOs need a minimum oversampling rate. If the CAN rate is reasonably high, 5Ms/s may not allow decoding of the data. The first step is to determine the minimum samplerate at which the CAN messages are decoded reliably. Emphasis on reliably; I've seen DSOs attempt to decode but fail in a subtile way without warning; you end up with data which is garbage.

author: Martin72
author_rank: Super Contributor
timestamp: March 24, 2024, 10:10:53 pm
content: Yepp, can confirm this behaviour, it makes sense too.@eTobey:QuoteThe way you might think it is not possible at first, which makes sense.The number of frames is limited to 2000, which can be seen clearly at 2s/div, and even more clearly at 5s/div.What you can do, however, is zoom in and scroll the section back and forth accordingly.

author: eTobey
author_rank: Super Contributor
timestamp: March 24, 2024, 10:51:05 pm
content: Quote from: Martin72 on March 24, 2024, 10:10:53 pmI did not say zoom... Take the first picture, and then move the trigger/scroll, so that decode frames will drop of to the left.

author: electronics hobbyist
author_rank: Regular Contributor
timestamp: March 24, 2024, 11:20:27 pm
content: Your question is difficult to understand. You should take two comparison pictures instead of letting others try to understand your meaning."scroll" should be a horizontal position or trigger delay.

author: bobxyz
author_rank: Contributor
timestamp: March 24, 2024, 11:43:44 pm
content: The MCP2515 is a very common hobbyist CAN-to-SPI chip. If you can program and are familiar with the Arduino environment, you could use a $20 CAN+Processor board, e.g.https://www.adafruit.com/product/5724,to decode the CAN stream live and generate a trigger for your oscilloscope. This would let you zoom in on the analog waveforms.

author: Electro Fan
author_rank: Super Contributor
timestamp: March 25, 2024, 12:35:27 am
content: Quote from: bobxyz on March 24, 2024, 11:43:44 pmhttps://youtu.be/MEkKPNr-KBk

author: eTobey
author_rank: Super Contributor
timestamp: March 25, 2024, 05:49:04 am
content: Quote from: tautech on March 24, 2024, 08:44:30 pmYou guys drove me nuts, saying i could find something i could not "see", but now i understand why. Problem is, you did not know, how that stream of frames (is my terminology right here?) really looks like. It is not a konstant frames every x us. So i could not use any "time and level" trigger.As my problem seems to have dissappeared, id say, we can focus now on other topics/things, but if anyone has another good idea, your´re welcome. Using a board to trigger the scope was the best so far for me.