{"id":5343,"date":"2023-11-06T17:10:29","date_gmt":"2023-11-06T09:10:29","guid":{"rendered":"https:\/\/www.tosunai.com\/?p=5343"},"modified":"2023-11-06T17:30:05","modified_gmt":"2023-11-06T09:30:05","slug":"comparison-and-use-of-tsmaster-filters","status":"publish","type":"post","link":"https:\/\/www.tosunai.com\/en\/comparison-and-use-of-tsmaster-filters\/","title":{"rendered":"Comparison and use of several types of filters in TSMaster"},"content":{"rendered":"
With regard to the CAN filter settings in the figure below, it is possible to filter both standard (11 bits) and extended (29 bits) frames, based on the data bits of the ID segment. Each bit has three states (0: block, 1: pass, x: any bit), which can be toggled with a left mouse click, and a list of passable identifiers is displayed below in real time after the settings have been made. In the bottom left corner of the dialog box, you can enter the video documentation of the help, in the middle, you can check whether a certain ID can be passed under the current filter conditions, and in the bottom right corner, there are OK and Cancel filter settings. For example, to set the message 0x100 to pass and all other identifier messages to be blocked, you can set it as shown below:<\/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 So if we want to block a certain ID message can we set it here? The answer is yes. However, since this is to do the filtering of data bits on the hardware side, so when we restrict a certain bit can not pass, it will inevitably also bring part of the other ID of the message is restricted, which is also the limitation of this filter.<\/p> When you set 0x100 to disable pass-through as shown in the following figure, it will limit all the message IDs with data bit 09 and this one as 1:<\/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 So how many filtering methods can we set in total? As mentioned before, we have 3 states to choose from for each bit, 11 bits for the standard frame ID and 29 bits for the extended frame ID, so there are several filtering methods for these two message frames as follows:<\/p> Standard frame: number of filtering methods = 311<\/p> Extended frame: number of filtering methods = 329<\/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) Configuration process<\/strong><\/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 Data flow filter is actually the flow of the message, such as from the left data source (here can be understood as the project corresponding to the bus network) flowed to the message information, bus records and other windows of the message is filtered through the filter before flowing to the modules, so these modules received under the message is not necessarily all the messages on the bus.<\/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) Module color meaning<\/strong><\/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 Also these modules are all different colors and different colors have corresponding meanings:<\/p> \u2714 White form: allow all data to pass through<\/p> \u2714 Green Forms: data that meets the conditions is passed through the<\/p> \u2714 Red form: prohibits all data from passing through<\/p> For example, in the figure below, we have set up a pass-through filter for the message 0x100 on channel 1, and filtered the CAN\/CAN FD message information window, bus logging module, and curve window, so that the two periodic messages (0x100, 0x101) sent in the transmit window can only be seen as the message 0x100 sent under channel 1 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 The advantage of this filter is efficient, intuitive, repeatable use, but compared to simple screening observation configuration process will be a little more cumbersome (this need to choose the next window filter will be more convenient), on the data flow filter this piece of content you can also refer to the TSMaster software help under the \"TSMaster Quick Start\" manual.<\/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 This filter is more common and easier to configure, you can configure it by clicking the funnel button directly in the window you need to filter. It is suitable for us to monitor part of the messages in the real-time bus or part of the messages in the playback situation, and the configuration is simple and convenient. However, it is also due to its convenience, it has greater limitations, such as the scope of action is limited to a single window, filtering conditions less filtering, bus record messages and filtering window message consistency is poor (this is recommended to use the data flow filter), so this filter is generally used for simple observation or combined with other filters.<\/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) Configuration process<\/strong><\/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 two diagrams below show the steps to set up the Programming Filter. The Programming Filter is a feature of the newer versions of TSMaster, so it is recommended that you update TSMaster to the latest version with help before using it.<\/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) Advantages<\/strong><\/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 So what are some of the situations in which we might want to use this programming filter? First we need to understand what makes this programming filter different from the other three filters:<\/p> \u2714 Programming filters are filters that are implemented on the software side, which can refine the filtering conditions even more, even down to the filtering of a particular data bit<\/p> \u2714 Programming filters for less common, more specialized situations<\/p> \u2714 Programming filters can be configured with more flexible content, fully customizable according to their own needs, and can be reused<\/p> \u2714 Programming filters can be used in combination with other filters with a high degree of adaptability<\/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) Difficulties<\/strong><\/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 Programming filters can actually be roughly understood as writing a filter yourself, so you need to have a certain degree of familiarity with the syntax of C script and related structures, the threshold will be a little higher compared to the other kinds of filters. But because of the sake of the example, as long as you understand the basic syntax of C script, in fact, it can also become us in the enhancement of work efficiency and critical problem solving play a greater role.<\/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) Sample Demonstration<\/strong><\/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 following is an example of how to set up a programmed filter to demonstrate how we can filter window messages according to our needs:<\/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 Take the message information window filter as an example, first enter the programmed filter that analyzes 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
<\/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\t2. Data flow filter<\/i><\/h2>\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. Window filter<\/i><\/h2>\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. Programming Filter<\/i><\/h2>\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