{"id":3066,"date":"2023-05-16T15:36:28","date_gmt":"2023-05-16T07:36:28","guid":{"rendered":"https:\/\/www.tosunai.com\/?p=3066"},"modified":"2024-04-23T16:02:43","modified_gmt":"2024-04-23T08:02:43","slug":"tsmaster-lin-rbs-residual-bus-simulation","status":"publish","type":"post","link":"https:\/\/www.tosunai.com\/en\/tsmaster-lin-rbs-residual-bus-simulation\/","title":{"rendered":"Tutorials | How to implement LIN RBS residual bus emulation based on TSMaster"},"content":{"rendered":"
To first connect the same star LIN hardware, use the same star LIN hardware simulation master node mode, external power supply is required, in order to maintain the LIN bus level signal with the measured parts, the connection schematic is as follows:<\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t \u25b2Note: If using the TC1012P, TC1016P, and TC1026P, which are USB-powered models, no external power supply is required.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t 1\u3001Import LDF file<\/b><\/p> Load the ldf file through [Database], you can also directly drag the ldf file into TSMaster. You can view the nodes in the LDF file, where the nodes marked in red are the master nodes, and the database contains the node scheduling table information, messages and signal definitions:<\/span><\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t 2\u3001LIN channel selection<\/b><\/p>\n Check LIN in the hardware bar [Channel Selection], select the number of [Application Channels], then there is a drop-down option at the channel selection to select the real hardware channel with the hardware name and serial number (as shown in the figure for TC1016):<\/span><\/font> 3\u3001Conduct LIN bus emulation configuration<\/b><\/p> 3.1 LIN master-slave node activation<\/span><\/span><\/p> Open the LIN bus emulation module via [Emulation] -> [LIN Bus Emulation]. In the LIN residual bus emulation, you can view the channels that have been bound to the database with network, node, scheduling table and message activation checkbox options.<\/span><\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t The node in red is the master node such as HVAC. After checking Activate Network->Node->Scheduling Table here, you can emulate this node by RBS. After starting the emulation, you can view the message sending and receiving information in the node in the message information window.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t 3.2 Description of configuration items<\/p> The RBS module of TSMaster mainly contains the following configuration items:<\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t Auto-start residual bus emulation: If enabled, the residual bus emulation module is automatically started when the application is connected.<\/p> Automatically send the message where the signal is located when the signal is changed: If enabled, this message is sent immediately when the signal is modified.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t 4. Modify the signal value of the RBS simulation node<\/b><\/p> 4.1 LIN residual bus simulation modification<\/span><\/span><\/p> After checking the network nodes to be emulated and the scheduling table, expand the scheduling table -> Messages -> Signals, you can see the signal value of the current emulated signal in the data byte column of the signal, and change the emulated signal value by directly entering here:<\/span><\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t 4.2 Modifying signal values in combination with C scripts<\/p> After the RBS module is configured, open a c applet module and you can see that there are LIN-related receive\/transmit\/pre-send events, which currently need to be assigned to the signal values in the bus emulation, as follows:<\/p> 1) First create the LIN transmit event and pre-send event for the message, define the message to be signaled in the LIN transmit event, and then send the message using the transmit_lin_async function, mainly to trigger the LIN pre-send event:<\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t 2)<\/span>Once the pre-send event is triggered, you can assign a value to the signal directly in the pre-send event, compile and execute the script after the assignment, and you can see in the message window that the value of the signal has changed:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t 4.3 Modify the signal value in combination with the panel<\/p>\n 1) First create a panel in [Simulation] -> [Panel], create an input control, here use the selector, double-click the control to select the LIN signal (Figure 1), and then find the signal that sends the message under the simulation node to bind (Figure 2). 2)<\/span>Once the pre-send event is triggered, you can assign a value to the signal directly in the pre-send event, compile and execute the script after the assignment, and you can see in the message window that the value of the signal has changed:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t overview This article is about RBS: residual bus simulation, also known as residual [...]...<\/p>","protected":false},"author":4,"featured_media":3067,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"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":"on","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","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":[90],"tags":[141,65,140],"class_list":["post-3066","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-tutorial","tag-rbs","tag-tsmaster","tag-140","entry","has-media","owp-thumbs-layout-horizontal","owp-btn-normal","owp-tabs-layout-horizontal","has-no-thumbnails","has-product-nav"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tosunai.com\/en\/wp-json\/wp\/v2\/posts\/3066","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tosunai.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tosunai.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tosunai.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tosunai.com\/en\/wp-json\/wp\/v2\/comments?post=3066"}],"version-history":[{"count":0,"href":"https:\/\/www.tosunai.com\/en\/wp-json\/wp\/v2\/posts\/3066\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tosunai.com\/en\/wp-json\/wp\/v2\/media\/3067"}],"wp:attachment":[{"href":"https:\/\/www.tosunai.com\/en\/wp-json\/wp\/v2\/media?parent=3066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tosunai.com\/en\/wp-json\/wp\/v2\/categories?post=3066"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tosunai.com\/en\/wp-json\/wp\/v2\/tags?post=3066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\u4e8c. TSMaster LIN RBS operation process<\/h4>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
TSMaster LIN RBS OPERATION PROCESS<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t
<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t