{"id":36772,"date":"2023-12-04T10:42:08","date_gmt":"2023-12-04T02:42:08","guid":{"rendered":"https:\/\/hongtronics.com\/?p=36772"},"modified":"2024-06-28T14:08:24","modified_gmt":"2024-06-28T06:08:24","slug":"implementation-of-k-line-protocol-for-babylin-products","status":"publish","type":"post","link":"https:\/\/hongtronics.com\/en\/implementation-of-k-line-protocol-for-babylin-products\/","title":{"rendered":"Rainbow Technology | How BabyLIN products can easily handle K-line protocol implementation?"},"content":{"rendered":"<p class=\"has-medium-font-size\">In order to realize K-wire communication, SDF-V3 defines new protocol types in the protocol section<strong>KLine Raw<\/strong>. All BabyLIN devices capable of running the SDF-V3 file (LinWorks version V.2.29.4 or above) and using the latest firmware (firmware version V.6.18 or above) can execute the KLine Raw protocol, and this article describes the KLine Raw protocol implementation for BabyLIN products.<\/p>\n\n\n\n<p class=\"has-text-align-center has-white-color has-text-color has-background has-link-color wp-elements-32c07ae357107166c2f65f7aa51e36af\" style=\"background-color:#0069a5;font-size:25px\"><strong>KLine Raw Realization<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\">As with other protocol implementations, you need to create a new session in SessionConf.<strong>Protocols<\/strong>Definitions<strong>KLine Raw<\/strong>Type Agreement.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"885\" height=\"355\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/11.png\" alt=\"\" class=\"wp-image-36773\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/11.png 885w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/11-300x120.png 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/11-768x308.png 768w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/11-600x241.png 600w\" sizes=\"(max-width: 885px) 100vw, 885px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size\">services can be customized in the agreement.<strong>Service<\/strong>It consists of a request frame and a response frame. By selecting the<strong>Request only<\/strong>If the response frame is not defined, then the definition of the response frame can be omitted.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"875\" height=\"280\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/21.png\" alt=\"\" class=\"wp-image-36774\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/21.png 875w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/21-300x96.png 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/21-768x246.png 768w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/21-600x192.png 600w\" sizes=\"(max-width: 875px) 100vw, 875px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size\">The serial transfer rate and byte format of the LIN bus interface using the K-wire protocol can be configured with the macro command<strong>Set Speed (Write Speed)<\/strong>Modification.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"942\" height=\"350\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/31.png\" alt=\"\" class=\"wp-image-36775\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/31.png 942w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/31-300x111.png 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/31-768x285.png 768w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/31-600x223.png 600w\" sizes=\"(max-width: 942px) 100vw, 942px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center has-white-color has-text-color has-background has-link-color wp-elements-605d6a867e7b3ebe98da8d34ca87421c\" style=\"background-color:#0069a5;font-size:25px\"><strong>Definition of frame<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\">The length of the frame in the K-line protocol can be a constant, a variable or a value retrieved from the signal. If the frame length is defined as a variable, the frame length is calculated from the actual mapped length.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"838\" height=\"496\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/41.png\" alt=\"\" class=\"wp-image-36776\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/41.png 838w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/41-300x178.png 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/41-768x455.png 768w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/41-600x355.png 600w\" sizes=\"(max-width: 838px) 100vw, 838px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-link-color has-medium-font-size wp-elements-7701a5f244a9d046d28d1fc838a7e421\" style=\"color:#0069a5\"><strong><span style=\"text-decoration: underline;\">1. Constant mapping<\/span><\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\">As shown in the following figure, the steps of constant mapping are: first add a mapping item (1), then define the starting position and size of the mapping item (2), then define the constant value of the mapping item (3), and finally save the data (4).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1012\" height=\"541\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/51.png\" alt=\"\" class=\"wp-image-36777\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/51.png 1012w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/51-300x160.png 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/51-768x411.png 768w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/51-600x321.png 600w\" sizes=\"(max-width: 1012px) 100vw, 1012px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-link-color has-medium-font-size wp-elements-2c97784d62f97431b1f780c9ff5c2027\" style=\"color:#0069a5\"><strong><span style=\"text-decoration: underline;\">2. signal mapping<\/span><\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\">As shown in the following figure, the steps of signal mapping definition are: first, select the requested signal in the right signal list (1), add it to the mapping list (2), and finally adjust the offset to the payload (3), add all the signals needed in this frame and click OK to finish (4).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1008\" height=\"427\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/61.png\" alt=\"\" class=\"wp-image-36778\" style=\"width:840px;height:auto\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/61.png 1008w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/61-300x127.png 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/61-768x325.png 768w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/61-600x254.png 600w\" sizes=\"(max-width: 1008px) 100vw, 1008px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size\">The two payload definition methods can be combined, in which case the constant mapping is applied first and then the signal mapping is merged; the unmapped area of the frame will be filled with the padding bytes given in the generic protocol attributes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"885\" height=\"427\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/71.png\" alt=\"\" class=\"wp-image-36779\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/71.png 885w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/71-300x145.png 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/71-768x371.png 768w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/71-600x289.png 600w\" sizes=\"(max-width: 885px) 100vw, 885px\" \/><\/figure>\n\n\n\n<p class=\"has-medium-font-size\">The definition of the response frame proceeds in the same way, except that the constant load mapping has no meaning here.<\/p>\n\n\n\n<p class=\"has-text-align-center has-white-color has-text-color has-background has-link-color wp-elements-cd0709ece801609f24de8a895f298b8e\" style=\"background-color:#0069a5;font-size:25px\"><strong>Activate K-line communication<\/strong><\/p>\n\n\n\n<p class=\"has-medium-font-size\">When the LIN bus communication is started, the first dispatch of the LDF or the dispatch given by the start command is automatically started. When using K-wire communication on the LIN bus, it should be done by using the air scheduling table. It is necessary to set up a scheduling table in the LDF for diagnostic request frames only, which is used to start the bus. From there, an \u201cempty\u201d dispatch can be run, and then the K-wire protocol service can be executed using macro commands to transmit and receive K-wire frames on the bus. By default, a LIN bus startup will generate a wakeup pulse event. To avoid this, you can use the<strong>Virtual Signal<\/strong>Signal of the Zhongguang System<strong>@@SYSCFG307<\/strong>This is accomplished by setting the initial value of the<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1022\" height=\"396\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/81.png\" alt=\"\" class=\"wp-image-36780\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/81.png 1022w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/81-300x116.png 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/81-768x298.png 768w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/81-600x232.png 600w\" sizes=\"(max-width: 1022px) 100vw, 1022px\" \/><\/figure>\n\n\n\n<p style=\"font-size:17px\"><kbd><strong>| <\/strong><\/kbd>Note: The implementation of K-line communication for BabyLIN series products requires additional activation, please contact Honghong for the activation method.<\/p>\n\n\n\n<p class=\"has-medium-font-size\">Based on the Baby-LIN series, Honghong's LIN bus simulation and test solutions are capable of master-slave simulation and analysis of LIN and CAN nodes\/systems, and support event-based signal configuration, sequence control, error determination and triggering actions, which are widely used in automotive parts and production line testing. The products are equipped with free LINWorks software, which creates a friendly interaction between the functional operation of the test pieces and the software interface. In addition, MAXTRON also supports customized secondary development and testing services, please contact MAXTRON for more details!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"851\" height=\"362\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/image.png\" alt=\"\" class=\"wp-image-36781\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/image.png 851w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/image-300x128.png 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/image-768x327.png 768w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/12\/image-600x255.png 600w\" sizes=\"(max-width: 851px) 100vw, 851px\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center has-vivid-red-color has-text-color has-link-color has-medium-font-size wp-elements-00dee1d8f4615fdb7f724d32a1e7dd1e\">If you have any questions, please feel free to<a href=\"https:\/\/line.me\/R\/ti\/p\/@433rhnwm\" target=\"_blank\" rel=\"noreferrer noopener\">Contact Us<\/a>!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"197\" src=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/08\/\u516c\u53f8\u8cc7\u8a0a\u6b04_\u8cc7\u8a0a\u5361-\u592702.png\" alt=\"\" class=\"wp-image-34585\" srcset=\"https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/08\/\u516c\u53f8\u8cc7\u8a0a\u6b04_\u8cc7\u8a0a\u5361-\u592702.png 1024w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/08\/\u516c\u53f8\u8cc7\u8a0a\u6b04_\u8cc7\u8a0a\u5361-\u592702-300x58.png 300w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/08\/\u516c\u53f8\u8cc7\u8a0a\u6b04_\u8cc7\u8a0a\u5361-\u592702-600x115.png 600w, https:\/\/hongtronics.com\/wp-content\/uploads\/2023\/08\/\u516c\u53f8\u8cc7\u8a0a\u6b04_\u8cc7\u8a0a\u5361-\u592702-768x148.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>","protected":false},"excerpt":{"rendered":"<p>\u70ba\u4e86\u5be6\u73feK\u7dda\u901a\u4fe1\uff0cSDF-V3\u5728\u5354\u8b70\u90e8\u5206\u4e2d\u5b9a\u7fa9\u4e86\u65b0\u7684\u5354\u8b70\u985e\u578bKLine Raw\u3002\u6240\u6709\u80fd\u5920\u904b\u884cSDF-V3\u6a94\uff08L [&hellip;]<\/p>","protected":false},"author":33,"featured_media":36782,"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":"","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":54,"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":[2293],"tags":[],"table_tags":[],"class_list":["post-36772","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","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\/2023\/12\/11-1.png","_links":{"self":[{"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/posts\/36772","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\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/comments?post=36772"}],"version-history":[{"count":1,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/posts\/36772\/revisions"}],"predecessor-version":[{"id":36783,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/posts\/36772\/revisions\/36783"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/media\/36782"}],"wp:attachment":[{"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/media?parent=36772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/categories?post=36772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/tags?post=36772"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/hongtronics.com\/en\/wp-json\/wp\/v2\/table_tags?post=36772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}