You are currently viewing 干货分享 | 如何在TSMaster中对常用总线报文信号进行过滤?

Dry Sharing | How to filter common bus message signals in TSMaster?

overviewPreface

TSMaster software platform supports message and signal filtering for different buses (CAN, LIN, FlexRay), and the filtering methods generally include global receive filtering, data stream filtering, window filtering, string filtering, programmable filtering, and the use of signal filters for different buses is basically the same. Today, we will focus on sharing with you about the various operation methods of telegram message filtering in TSMaster.

Keywords in this article: CAN, LIN, FlexRay, telegram message filtering

Catalog/catalog

●  CAN telegram message filtering

●  LIN Message Filtering

●  FlexRayMessage Filtering

 

I. CAN message message filtering

The following filtering operations are used in CAN message information: global receive filtering, data stream filtering, window filtering, string filtering, and programmable filtering; these filtering operations are explained in detail below.

1. Global reception filtering

Global receive filtering means to complete the filtering settings on the hardware, this way is limited to support the hardware of TOSUN and the virtual channel of the same star, other manufacturers' devices are not supported. Before operation, you need to select the hardware channel to TOSUN'S device, here take TC1016 as an example.

Then open Bus Hardware - CAN Hardware Configuration - Filter ID Settings as shown in Figure II. Here you can choose to filter standard and extended frames, the default is a pass filter, which cannot be modified to a block filter. The filtering condition is to identify each binary bit of the message ID, each bit corresponds to three setup characters "0, 1, x", x means that the bit can be either 0 or 1. If you only need to filter one ID, you can also directly specify the identifier, and after completing the setup, a list of identifiers that can be passed will be displayed at the bottom, and the sitting party can verify whether the desired identifier can be passed or not. If you want to filter only one ID, you can also specify the identifier directly.

2. Data stream filtering

TSMaster software has a measurement setting window, in which you can combine the data flow direction to realize the effect of filtering, and also supports adding a filter window in front of the window.

The basic idea is that the data flow through a window, the data contained in this window is allowed to pass, other data is not allowed to pass. As shown in the figure below, in the measurement setup window, the message information #2, measurement filters, graphic three windows for topology connection, from the message information window can see that there is a EngineData message under the EngSpeed signal, but in the graphic window is n.a., indicating that it is invalid. This is because a filter has been added to the measurement settings to block the EngineData on channel one.

Measurement of the window filter is in the window click on any window selected box right-click and select Insert Filter, you can also directly in the margins of the choice to add and then dragged to the back of another window. Double-click to open the inserted filter, where you can select the channel to be filtered, the filter conditions here to support any message, a single ID, ID range, node filtering, as well as error frame filtering, and finally need to pay attention to is the type of filter you can choose to pass through the type or block type.

3. Message ID Filter

The filter directly click the funnel icon in the message information window to pop up the configuration window, applicable to real-time listening to bus data or message playback when the operation, where support for message ID filtering and channel filtering, you need to pay attention to the lower left corner of the selection of the pass-through type or blocking type.

4、String filtering

String filtering is the same as window filtering and supports fuzzy query. The scope of filtering includes the message identifier, the parsed message name, and the physical value (enumerated value) in the message information, and the parsing of the message needs to load the database and bind the corresponding channel in advance. Here it is recommended to load the DBC database.

5、Programmable filtration

Programming filter is one of the most complete filter conditions, it filters the conditions including all the member attributes of the message structure body, specifically can be viewed from the TSMaster header file, including the message frame type, send and receive direction, DLC and so on. The use of this filter need to first click on the message information window in the upper right corner of the funnel icon, select the activation of the filter, and then select the installation of the default filter library; after the installation is complete, the default library will pop up the C applet, the applet can be seen, respectively, for the CAN, LIN, FlexRay, Ethernet created a custom function to distinguish between the definition of its structure are in the TSMaster.h header file can be found. 

The key point is this:A return of 0 indicates that the eligible message is blocked, while a return of non-zero indicates that the message is windowable.

The following is the operation of pass-through filtering for channel one messages. After writing the code, you need to compile the applet, and finally, you can select the corresponding API function in the programmable filter.

II. LIN Message Filtering

The filtering of LIN telegram messages is done by the following filtering operations.

1. Data stream filtering

Configure the topology of the three windows of the measurement filter, LIN message information #2, and graphics in the measurement setup, and as a result, you can see that after the filter only the frame 0x15 of this message passes through to arrive at the message information window, and at the same time, the value of the SteeringLampState signal in the graphics window is n.a. invalid value. From the message information window, you can see that the original data stream has this signal data.

2. Message ID window filtering

Window filtering is different from the previous one in that the channel filtering settings are moved to the lower right corner of the filter setting window, and will take effect immediately after activating the enabling filter by selecting only channel 1 or other; in addition, the channel of the added identifier corresponds to the channel configured in the lower right corner, which is different from the window filtering of the CAN as mentioned earlier.

3、String filtering

The scope of string filtering is also the message identifier, the message name after parsing the message information name, and the physical value (enumeration value) in the message information.

4、Programmable filtration

As shown in the figure below, messages that pass through channel one and have a first message data byte of 0x00 are filtered by programmable.

III. FlexRay Message Message Filtering

The only FlexRay message filters for telegrams are window filtering, string filtering, and programmable filtering.

1、Window filtering

FlexRay window filtering supports adding channel filters and adding corresponding messages from the database.

2、String filtering

String filtering is used in the same way as CAN and LIN for signal keyword search.

3、Programmable filtration

Programmable filtering is also accomplished by making conditional judgments on FR structure members. The following is an example of the range filtering that can be achieved for Slot id.

发表回复