{"id":21529,"date":"2022-06-08T11:35:55","date_gmt":"2022-06-08T03:35:55","guid":{"rendered":"https:\/\/hongtronics.com\/?p=21529"},"modified":"2024-07-11T11:41:56","modified_gmt":"2024-07-11T03:41:56","slug":"can-node-error-tracking","status":"publish","type":"post","link":"https:\/\/hongtronics.com\/en\/can-node-error-tracking\/","title":{"rendered":"Five Minutes to CAN Bus Errors - CAN Node Status and Error Counter (3)"},"content":{"rendered":"<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"146\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-1024x146.gif\" alt=\"\" class=\"wp-image-19754\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-1024x146.gif 1024w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-300x43.gif 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-600x86.gif 600w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/03\/640-768x110.gif 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><em>A simple intro to CAN errors<\/em><\/p>\n\n\n\n<h2 class=\"has-vivid-cyan-blue-color has-text-color has-large-font-size wp-block-heading\">CAN bus error<\/h2>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">In this series of articles, we will introduce you to the details of the<strong>&nbsp;CAN bus error<\/strong>The knowledge includes the basic concepts of CAN Bus Errors, types of CAN Bus Errors, CAN Error Frames, and CAN Node Error States, as well as generating and documenting CAN errors through practical application testing.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity is-style-dots\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Back to previous article. <a href=\"https:\/\/hongtronics.com\/en\/canbus-error-canbus-error-and-error-frame\/\">CAN Bus Errors in Five Minutes - CAN Bus Errors and Error Frames (1)<\/a><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\">Back to previous article. <a href=\"https:\/\/hongtronics.com\/en\/canbus-error-types\/\">CAN Bus Errors in Five Minutes - CAN Bus Error Types (2)<\/a><\/h2>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity is-style-dots\"\/>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Obviously, CAN error handling helps to remove the error message and enables the CAN node to re-transmit the error message. This ensures that short periods of localized interference (e.g. from noise) do not result in invalid\/missing data. Instead, the transmitter will attempt to retransmit the message. If it wins arbitration (and there are no errors), the message is sent successfully.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">But what if the error is caused by a system failure in the transmission node? This can trigger an infinite loop of sending\/removing the same message - interfering with the CAN bus. This is where the CAN node status and error counters come into play.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"800\" height=\"650\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/06\/CAN\u7bc0\u9ede\u72c0\u614b\u548c\u932f\u8aa4\u8a08\u6578\u5668.jpg\" alt=\"\" class=\"wp-image-21530\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/06\/CAN\u7bc0\u9ede\u72c0\u614b\u548c\u932f\u8aa4\u8a08\u6578\u5668.jpg 800w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/06\/CAN\u7bc0\u9ede\u72c0\u614b\u548c\u932f\u8aa4\u8a08\u6578\u5668-300x244.jpg 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/06\/CAN\u7bc0\u9ede\u72c0\u614b\u548c\u932f\u8aa4\u8a08\u6578\u5668-600x488.jpg 600w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/06\/CAN\u7bc0\u9ede\u72c0\u614b\u548c\u932f\u8aa4\u8a08\u6578\u5668-768x624.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">The purpose of CAN error tracking is to limit errors by reducing the privileges of problematic CAN nodes. Specifically, let's look at three possible states:<\/p>\n\n\n\n<p class=\"has-black-color has-text-color has-background has-medium-font-size wp-block-paragraph\" style=\"background-color:#f6f6f6\"><strong>Activity Error<\/strong>: This is the default state of each CAN node, in which it is able to transmit data and trigger an \u201cactive error flag\u201d when an error is detected.\u201d<\/p>\n\n\n\n<p class=\"has-black-color has-text-color has-background has-medium-font-size wp-block-paragraph\" style=\"background-color:#f6f6f6\"><strong>Passive error:<\/strong>In this state, the CAN node is still able to transmit data, but now triggers a \u201cPassive Error Flag\u201d when an error is detected. In addition, the CAN node must now wait for an additional 8 bits (also known as a pause time) in addition to the 3-bit interrupt time to resume data transmission (to allow other CAN nodes to take control of the bus).<\/p>\n\n\n\n<p class=\"has-black-color has-text-color has-background has-medium-font-size wp-block-paragraph\" style=\"background-color:#f6f6f6\"><strong>The bus is closed:<\/strong>In this state, the CAN node disconnects itself from the CAN bus and can no longer transmit data or trigger an error flag.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"800\" height=\"487\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/06\/CAN\u932f\u8aa4\u8ddf\u8e64.png\" alt=\"\" class=\"wp-image-21531\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/06\/CAN\u932f\u8aa4\u8ddf\u8e64.png 800w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/06\/CAN\u932f\u8aa4\u8ddf\u8e64-300x183.png 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/06\/CAN\u932f\u8aa4\u8ddf\u8e64-600x365.png 600w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/06\/CAN\u932f\u8aa4\u8ddf\u8e64-768x468.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">Each CAN controller keeps track of its own state and acts accordingly, and the CAN node transitions state based on the value of its error counter. Specifically, each CAN node keeps track of the Transmit Error Counter (TEC) and Receive Error Counter (REC):<\/p>\n\n\n\n<ul class=\"has-medium-font-size wp-block-list\"><li>If REC or TEC exceeds 127, the CAN node enters a passive error state.<\/li><li>If the TEC exceeds 255, the CAN node goes into bus shutdown.<\/li><\/ul>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">So how does the error counter change? Before we get into the logic of how to increase\/decrease the error counter, let's revisit the CAN error frames and major\/minor error flags.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">As is evident from the CAN error frame icon, a CAN node that observes a significant bit after its own sequence of 6 significant bits will know that it has triggered a major error flag. In this case, we can refer to this CAN node as the \u201cfinder\u201d of the error.<\/p>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">At first, it may sound positive to have a CAN node repeatedly discover errors and react quickly by flagging errors before other nodes. However, in practice, the discoverer is often the culprit of the error.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"600\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/06\/CAN\u7e3d\u7dda\u932f\u8aa4\u908f\u8f2f.jpg\" alt=\"\" class=\"wp-image-21532\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/06\/CAN\u7e3d\u7dda\u932f\u8aa4\u908f\u8f2f.jpg 800w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/06\/CAN\u7e3d\u7dda\u932f\u8aa4\u908f\u8f2f-300x225.jpg 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/06\/CAN\u7e3d\u7dda\u932f\u8aa4\u908f\u8f2f-600x450.jpg 600w, https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/06\/CAN\u7e3d\u7dda\u932f\u8aa4\u908f\u8f2f-768x576.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-css-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"has-vivid-cyan-blue-color has-text-color has-large-font-size wp-block-heading\">CAN\/LIN Data and Error Logger<\/h2>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\">The Avision CANedge1 allows you to easily log data from a 2xCAN\/LIN bus to an 8-32GB SD card and supports logging of CAN\/LIN errors. Simply connect it to your car or truck to start logging and decode the data via free software\/API. In addition, the upgraded CANedge2 adds WiFi functionality, allowing you to automatically transfer data to your own server and update the device wirelessly.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<p class=\"responsive-video-wrap clr\"><iframe title=\"Plug &amp; Play CSS CAN\/LIN Bus Data Logger_CANedge1\/CANege2 (8G\/32G option)\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/PGvgXHrbkHI?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<\/div><\/figure>\n\n\n\n<p class=\"has-medium-font-size wp-block-paragraph\"><strong>In addition, we also provide our customers with hardware devices such as CAN cards, data acquisition modules, CAN gateways and converters, and the Kvaser CANLIB SDK.<\/strong> <strong>Waiting for software.<\/strong>For more information about CAN technology services and CAN products, please feel free to contact us!<\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/01\/\u5b8f\u8679\u8cc7\u8a0a\u5361-1024x576.png\" alt=\"\" class=\"wp-image-17585\"\/><figcaption>Contact Us<\/figcaption><\/figure>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>A simple intro to CAN errors CAN \u7e3d\u7dda\u932f\u8aa4 \u5728\u672c\u7cfb\u5217\u6587\u7ae0\u4e2d\uff0c\u6211\u5011\u5c07\u70ba\u60a8\u8a73\u7d30\u4ecb\u7d39 [&hellip;]<\/p>","protected":false},"author":29,"featured_media":21533,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"minimal","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","iawp_total_views":396,"ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[2315,2293],"tags":[],"table_tags":[],"class_list":["post-21529","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-2315","category-can-lin","entry","has-media","owp-thumbs-layout-horizontal","owp-btn-normal","owp-tabs-layout-horizontal","has-no-thumbnails","has-product-nav"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/hongtronics.com\/wp-content\/uploads\/2022\/06\/CAN\u932f\u8aa4\u8ddf\u8e64-1.jpg","_links":{"self":[{"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/posts\/21529","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/comments?post=21529"}],"version-history":[{"count":3,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/posts\/21529\/revisions"}],"predecessor-version":[{"id":24966,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/posts\/21529\/revisions\/24966"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/media\/21533"}],"wp:attachment":[{"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/media?parent=21529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/categories?post=21529"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/tags?post=21529"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/table_tags?post=21529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}