Dm1 packet sending implementation method and device, equipment and storage medium

CN122802307APending Publication Date: 2026-09-22DONGFENG AUTOMOBILE ELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611146170.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

[0003]对于手动编写方式,测试人员需在CANoe(汽车电子行业工业标准总线开发和测试平台)报文窗口手动编辑每帧报文数据,多帧DM1测试中需人工拆分数据、填充帧标识、控制发送顺序和时序,极易出现帧顺序错乱、续帧漏发、时序偏差、数据填充错误等问题,人工测试一致性差、误差率高,且无法实现批量循环测试、自动化复现测试

Benefits of technology

摒弃传统CAPL复杂编程模式,基于CANoe面板结合CAPL脚本,在同一仿真工程内集成多帧DM1报文、多路单帧DM1报文发送功能,支持可视化参数配置、一键启停、报文ID按需切换,简化操作、降低维护成本,提升车载诊断仿真测试的通用性与稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122802307A_ABST
    Figure CN122802307A_ABST
Patent Text Reader

Abstract

The application discloses a DM1 message sending implementation method and device, equipment and storage medium, relates to the field of automobile electronic test technology, and the method comprises the following steps: a CANoe visual interaction panel for integrated control and parameter configuration control is built; a grouping DM1 is created to unify interaction variables, and the variables are used for connecting the CANoe visual interaction panel and CAPL scripts; a CAPL script is written to realize the logic control of message analysis, construction, timing sending, and a fault lamp state variable is listened to through the CAPL script; based on the CANoe visual interaction panel, variables and CAPL scripts, and in combination with a preset control logic, multi-frame DM1 message sending control and single-frame DM1 message linkage sending control are realized. The application can improve the universality and stability of vehicle diagnosis simulation test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automotive electronic testing technology, specifically to a method, apparatus, device, and storage medium for transmitting DM1 messages. Background Technology

[0002] Currently, the transmission of DM1 (currently active fault message) frames generally includes manual writing and hard-coding based on CAPL scripts (a scripting language designed specifically for automotive bus communication).

[0003] For manual programming, testers need to manually edit each frame of message data in the CANoe (Automotive Electronics Industry Standard Bus Development and Testing Platform) message window. In multi-frame DM1 testing, data needs to be manually split, frame identifiers filled, and the sending order and timing controlled. This can easily lead to problems such as frame order disorder, missing consecutive frames, timing deviations, and data filling errors. Manual testing has poor consistency and a high error rate, and it cannot achieve batch loop testing or automated test reproduction.

[0004] For message transmission based on CAPL script hard coding, testers need to have professional CAPL programming skills. Two sets of logic code need to be written independently for the DM1 single-frame and multi-frame transmission modes. The code has poor reusability and weak versatility. When it is necessary to modify the fault code content, fault status, transmission timing, and frame interval parameters, the script needs to be modified and compiled again. The debugging process is cumbersome and the testing efficiency is extremely low.

[0005] Therefore, how to achieve the transmission of DM1 single frames or multiple frames has become an urgent problem to be solved. Summary of the Invention

[0006] This application provides a method, apparatus, device, and storage medium for transmitting DM1 messages, which can improve the versatility and stability of on-board diagnostic simulation testing.

[0007] In a first aspect, embodiments of this application provide a method for implementing DM1 message transmission, the DM1 message transmission implementation including: A CANoe visual interactive panel is built for integrating control and parameter configuration controls. The controls include message start / stop controls, message type selection controls, and parameter configuration controls. Create group DM1 to unify interactive variables, and the variables are used to connect the CANoe visualization interactive panel and CAPL script. The variables include status trigger variables, fault light status variables, message start / stop variables, message type variables, DTC and address variables. Write a CAPL script to implement the logical control of message parsing, construction, and timed transmission, and use the CAPL script to monitor the status variables of the fault light; Based on the CANoe visual interactive panel, variables, CAPL script, and combined with preset control logic, multi-frame DM1 message transmission control and single-frame DM1 message linkage transmission control are realized.

[0008] In conjunction with the first aspect, in one implementation method, The message start / stop control is used to set the multi-frame DM1 message transmission enable switch, the 4-channel single-frame DM1 message independent transmission enable switch, and to actively control the start and stop of DM1 message transmission; The message type selection control is used to configure the DM1 message feature value selection control for each single frame DM1 message, so as to switch the target CAN message ID. The parameter configuration control is used to configure fault light status parameters, fault code DTC parameters, source address SA, and LED indicator enable control, and binds the fault light status parameters and fault code DTC parameters to CANoe system variables to achieve visual modification.

[0009] In conjunction with the first aspect, in one implementation method, The status trigger variable is used as a fault light status change trigger flag; The fault light status variables include the status of the protection light, the status of the Amber warning light, the status of the red stop light, the status of the fault indicator light, and the light status variables corresponding to multiple single-frame DM1 messages. The message start / stop variables include multi-frame DM1 message transmission enable and 4-channel single-frame DM1 message transmission enable; The message type variable includes four single-frame DM1 message feature values; The DTC and address variables include SPN, FMI, OC, source address SA, and LED enable variables corresponding to multi-frame DM1 messages or single-frame DM1 messages.

[0010] In conjunction with the first aspect, in one implementation method, The logical control includes global variable area declaration, message definition, and general function encapsulation; The global variable area is declared as follows: multi-frame DM1 message objects, 4 single-frame DM1 message objects, global light status combination variables, and timers. The timers include 1 set of multi-frame DM1 message transmission timers, 4 sets of single-frame DM1 message transmission timers, and 4 sets of extended ID single-frame DM1 message transmission timers. The message is defined as an 18-byte multi-frame DM1 message and an 8-byte standard single-frame DM1 message based on the J1939 protocol, matching the protocol frame length specification. The general function is encapsulated as a unified sending function for a single frame DM1 message, and integrates the logic for DM1 message ID concatenation, light status byte combination, DTC data filling, and message output, while eliminating duplicate codes.

[0011] In conjunction with the first aspect, in one implementation, the step of monitoring the fault light status variable through the CAPL script specifically includes: The CAPL script monitors the status variables of the fault lights and sets the trigger flag when the status of any light changes. After the CAPL script detects that the trigger flag is set, it integrates the status of the four independent lights into a 1-byte comprehensive light status value through bitwise operations, and assigns it to a global variable for use by multiple DM1 messages.

[0012] In conjunction with the first aspect, in one implementation method, The multi-frame DM1 message transmission control includes monitoring the message transmission enable variable of the CANoe system and timer callback logic; The message transmission enable variable of the monitoring CANoe system is: when the multi-frame DM1 message transmission switch in the CANoe visual interaction panel is enabled, the multi-frame DM1 message transmission timer is started; when it is disabled, the multi-frame DM1 message transmission timer is turned off and DM1 message transmission is stopped. The timer callback logic is as follows: after the multi-frame DM1 message transmission timer is triggered, an 18-byte J1939 multi-frame DM1 message is constructed, and the source address, characteristic value, integrated light status, and 4 sets of DTC fault codes are filled in sequentially. The J1939 standard interface is called to complete the DTC format conversion and output the CAN message. After the execution is completed, the multi-frame DM1 message transmission timer is automatically restarted to realize periodic cyclic transmission.

[0013] In conjunction with the first aspect, in one implementation method, The single-frame DM1 message linkage transmission control includes dual-condition linkage judgment, parameter change linkage, and single-frame DM1 message construction. The dual-condition linkage judgment is to simultaneously monitor the single-frame DM1 message transmission enable variable and the DM1 message feature value variable. When transmission is enabled, the corresponding timer is automatically selected according to the DM1 message feature value variable, and the other set of timers is mutually excluded and turned off. When transmission is disabled, all corresponding timers are turned off. The parameter change linkage is such that when the CANoe visual interactive panel switches the DM1 message characteristic value, the CAPL script automatically re-executes the timer switching logic; The single-frame DM1 message is constructed by calling the general DM1 message sending function, filling in the lamp status according to the DM1 message ID type, filling in DTC data, outputting the single-frame DM1 message, setting the single-frame DM1 message sending timer period, and sending it cyclically.

[0014] Secondly, embodiments of this application provide a DM1 message transmission implementation apparatus, the DM1 message transmission implementation apparatus comprising: The module is used to build a CANoe visual interactive panel for integrating control and parameter configuration controls, including message start / stop controls, message type selection controls, and parameter configuration controls. A creation module is used to create group DM1 for unifying interactive variables, and the variables are used to connect the CANoe visualization interaction panel and CAPL script. The variables include status trigger variables, fault light status variables, message start / stop variables, message type variables, DTC and address variables. The module is used to write CAPL scripts to implement the logical control of message parsing, construction, and timed transmission, and to monitor the fault light status variables through the CAPL scripts. The execution module is used to implement multi-frame DM1 message transmission control and single-frame DM1 message linkage transmission control based on the CANoe visual interactive panel, variables, CAPL script, and in combination with preset control logic.

[0015] Thirdly, embodiments of this application provide a DM1 message transmission implementation device, the DM1 message transmission implementation device including a processor, a memory, and a DM1 message transmission implementation program stored in the memory and executable by the processor, wherein when the DM1 message transmission implementation program is executed by the processor, it implements the steps of the DM1 message transmission implementation method described above.

[0016] Fourthly, embodiments of this application provide a computer-readable storage medium storing a DM1 message transmission implementation program, wherein when the DM1 message transmission implementation program is executed by a processor, it implements the steps of the DM1 message transmission implementation method described above.

[0017] The beneficial effects of the technical solutions provided in this application include: Abandoning the traditional complex CAPL programming mode, this system integrates multi-frame DM1 message and multi-channel single-frame DM1 message transmission functions within the same simulation project based on the CANoe panel and CAPL scripts. It supports visual parameter configuration, one-click start / stop, and on-demand message ID switching, simplifying operation, reducing maintenance costs, and improving the versatility and stability of on-board diagnostic simulation testing. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating the implementation method of sending DM1 messages in this application; Figure 2 This is a complete implementation flowchart of the DM1 message transmission method of this application; Figure 3 This is a schematic diagram of the functional modules of the DM1 message transmission implementation device of this application; Figure 4 This is a schematic diagram of the hardware structure of the device that implements the DM1 message transmission in this application. Detailed Implementation

[0019] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.

[0020] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0021] In the first aspect, the embodiments of this application provide a method for transmitting DM1 messages, namely, a method for transmitting single or multiple frames of DM1 messages using a CANoe panel. The dynamic binding of panel variables and CAN messages is achieved through CAPL programming, which solves the problems of high programming threshold, cumbersome switching between single and multi-frame modes, large manual operation error, inflexible parameter configuration, poor test consistency, weak universality, and lack of intuitiveness in the testing process.

[0022] In one embodiment, reference is made to Figure 1 , Figure 1 This is a flowchart illustrating the implementation method of sending DM1 messages in this application. Figure 1 As shown, the DM1 message sending implementation method includes: S1: Build a CANoe visual interactive panel for integrating control and parameter configuration controls, including message start / stop controls, message type selection controls, and parameter configuration controls; S2: Create group DM1 to unify interactive variables, and the variables are used to connect the CANoe visualization interactive panel and CAPL script. The variables include status trigger variables, fault light status variables, message start / stop variables, message type variables, DTC and address variables. S3: Write a CAPL script to implement the logical control of message parsing, construction, and timed transmission, and monitor the fault light status variables through the CAPL script; S4: Based on the CANoe visual interactive panel, variables, CAPL script, and combined with preset control logic, realize multi-frame DM1 message sending control and single-frame DM1 message linkage sending control.

[0023] Specifically, the DM1 message transmission implementation method of this application runs on CANoe simulation software and implements DM1 fault message transmission based on the SAE J1939 protocol (a vehicle communication protocol). It includes four major steps: CANoe panel construction, CANoe system variable configuration, CAPL script logic design, and message linkage transmission control.

[0024] For CANoe panel setup, create a new CANoe visual interactive panel in CANoe. The CANoe visual interactive panel is a human-computer interaction carrier that integrates all control and parameter configuration controls. The controls are divided into three categories: message start / stop controls, message type selection controls, and parameter configuration controls.

[0025] The message start / stop control is used to set the enable switch for multi-frame DM1 message transmission, the enable switch for independent transmission of 4 single-frame DM1 messages, and to actively control the start and stop of DM1 message transmission; The message type selection control is used to configure the DM1 message feature value selection control for each single frame DM1 message, so as to switch the target CAN message ID (0x18FECAXX or 0x1CFECAXX). The parameter configuration control is used to configure fault light status parameters, fault code (DTC) parameters (Suspicious Parameter Number SPN, Fault Mode Identifier FMI, Occurrence Count OC), source address SA, and LED (Light Emitting Diode) indicator enable control. It also binds the fault light status parameters and fault code (DTC) parameters to CANoe system variables for visual modification.

[0026] For CANoe system variable configuration, to create group DM1 in CANoe system variables, all interactive variables are uniformly defined. These variables are divided into five categories, serving as a data interaction bridge between the CANoe visual interactive panel and the CAPL script. Specifically, the variables include status trigger variables, fault light status variables, message start / stop variables, message type variables, DTC and address variables.

[0027] The status trigger variable (LampStatusChange) is used to trigger the status change of the fault lamp; The status variables of the fault lights include the status of the protection light (ProtectLampStatus), the status of the amber warning light (AmberWarningLampStatus), the status of the red stop light (RedStopLampState), the status of the fault indicator light (MalfunctionIndicatorLampStatus), and the status variables of the lights corresponding to multiple single-frame DM1 messages. The message start / stop variables include multi-frame DM1 message transmission enable (SEND) and 4-channel single-frame DM1 message transmission enable (SEND_DZ, SEND1_DZ, SEND2_DZ, SEND3_DZ). The message type variable includes four single-frame DM1 message feature values, specifically Characteristic_DZ, Characteristic1_DZ, Characteristic2_DZ, and Characteristic3_DZ, with values ​​of 0x18 or 0x1C, corresponding to different CAN message IDs. DTC and address variables include SPN, FMI, OC, source address SA, and LED enable variables corresponding to multi-frame DM1 messages or single-frame DM1 messages.

[0028] For the CAPL script logic design, CAPL scripts are written in the CANoe system to complete variable declarations, message objects, and timer initialization, serving as the core logic layer for message parsing, construction, and timed transmission. Logic control includes global variable declarations, message definitions, and general function encapsulation.

[0029] The global variable area is declared as follows: multi-frame DM1 message objects, 4 single-frame DM1 message objects, global light status combination variables, and timers, including 1 set of multi-frame DM1 message transmission timers, 4 sets of single-frame DM1 message transmission timers, and 4 sets of extended ID single-frame DM1 message transmission timers. The message is defined as an 18-byte multi-frame DM1 message and an 8-byte standard single-frame DM1 message based on the J1939 protocol, matching the protocol frame length specification; The general function is encapsulated into a unified sending function for a single frame DM1 message, and integrates the logic for DM1 message ID concatenation, light status byte combination, DTC data filling, and message output, while eliminating duplicate codes.

[0030] Furthermore, in one embodiment, monitoring the fault light status variables through the CAPL script specifically includes: S301: Monitor the status variables of the fault lights via CAPL script, and set the trigger flag when the status of any light changes; S302: After the CAPL script detects that the trigger flag is set, it integrates the states of the four independent lights into a 1-byte composite light state value through bitwise operations, assigns it to a global variable, and provides it for use in multiple DM1 frames. Compared to traditional multi-branch judgment, bitwise operations can fully cover all light state combinations, making the logic simpler and eliminating the risk of missed judgments.

[0031] Furthermore, in one embodiment, the multi-frame DM1 message transmission control includes a message transmission enable variable for monitoring the CANoe system and timer callback logic; The message transmission enable variable of the CANoe system is set as follows: when the multi-frame DM1 message transmission switch in the CANoe visual interaction panel is enabled, the multi-frame DM1 message transmission timer is started; when it is disabled, the multi-frame DM1 message transmission timer is turned off and DM1 message transmission is stopped. The timer callback logic is as follows: after the multi-frame DM1 message transmission timer is triggered, an 18-byte J1939 multi-frame DM1 message is constructed, and the source address, characteristic value, integrated lamp status, and 4 sets of DTC fault codes are filled in sequentially. The J1939 standard interface is called to complete the DTC format conversion and output the CAN message. After the execution is completed, the multi-frame DM1 message transmission timer is automatically restarted to realize periodic cyclic transmission.

[0032] Furthermore, in one embodiment, the single-frame DM1 message linkage transmission control includes dual-condition linkage judgment, parameter change linkage, and single-frame DM1 message construction. The single-frame DM1 message linkage transmission control of this application supports four independent single-frame DM1 message transmissions, each supporting two CAN ID switching methods to achieve parameter linkage updates.

[0033] The dual-condition linkage judgment is as follows: simultaneously monitor the single-frame DM1 message transmission enable variable and the DM1 message feature value variable. When transmission is enabled, automatically select the corresponding timer according to the DM1 message feature value variable (feature value 0x18 starts the regular ID (0x18FECAXX) timer, feature value 0x1C starts the extended ID (0x1CFECAXX) timer) and mutually exclude and shut down the other set of timers. When transmission is disabled, shut down all corresponding timers. The parameter change linkage is such that when the CANoe visual interactive panel switches the DM1 message characteristic value (0x18 / 0x1C), the CAPL script automatically re-executes the timer switching logic; The single-frame DM1 message is constructed by calling the general DM1 message sending function, filling in the light status according to the DM1 message ID type (the regular ID single-frame DM1 message directly fills in the light status; the extended ID single-frame DM1 message is controlled by the LED enable variable, and the light status byte is set to 0 when the LED is off), filling in DTC data, outputting the single-frame DM1 message, setting the single-frame DM1 message sending timer period (e.g., 1 second), and sending it cyclically.

[0034] See Figure 2 The diagram shown is a complete implementation flowchart of the DM1 message transmission method of this application. The following example illustrates the DM1 message transmission method of this application in detail.

[0035] This example is based on CANoe 11.0 and above, and is compatible with the SAE J1939-73 diagnostic protocol. It enables the integrated transmission of 18-byte multi-frame DM1 messages and 4-channel 8-byte single-frame DM1 messages. The message ID supports two types: 0x18FECAXX and 0x1CFECAXX.

[0036] Step 1: CANoe Project Initialization and Panel Setup Open the CANoe software, create a new CAN bus simulation project, add the J1939 protocol stack, and configure the bus baud rate to 250 kbit / s (standard baud rate for commercial vehicles); enter the Panel editing interface, draw the visual interactive panel, and the control layout is as follows: First area: Multi-frame DM1 control area: Add Boolean switch multi-frame DM1 transmission enable, numerical input box (SA, SPN, FMI, OC and other DTC parameters), and four-way fault light status selection box; Second area: Single frame DM1 control area: divided into 4 sub-areas, each configured with a single frame transmission enable switch, a message type selection drop-down box (options: 0x18, 0x1C), an LED indicator enable switch, an independent DTC parameter input box, and a source address SA input box; Bind all panel controls to the corresponding CANoe system variables under the DM1 group to achieve bidirectional synchronization between panel operations and variable data.

[0037] Step 2: Creating CANoe system variables Create a new group DM1 in CANoe System Variables and create all interactive variables: Status trigger variable: LampStatusChange (int type, default 0); Fault lamp status variables: ProtectLampStatus, AmberWarningLampStatus, RedStopLampState, MalfunctionIndicatorLampStatus (all of which are of type int, with values ​​of 0 / 1), and lamp status variables corresponding to four single frames; Message start / stop variables: SEND, SEND_DZ, SEND1_DZ, SEND2_DZ, SEND3_DZ (int type, 0 = off, 1 = on); Message type variables: Characteristic_DZ~Characteristic3_DZ (int type, value 0x18 / 0x1C); DTC and address variables: numerical variables such as SA, SPN, FMI, OC, LED, etc., matching DTC and address parameters.

[0038] Step 3: CAPL script writing and import Create a new script file in the CANoe CAPL Browser, write the optimized CAPL code from above, and complete the following configuration: Declare message objects, array timers, and global light status variables in the global area; Write logic to monitor the light status. After the light status changes, set the trigger flag and synthesize the overall light status through bitwise operations. The SendSingleFrameDm1 generic function is encapsulated to uniformly implement single-frame message construction, ID concatenation, data filling, and message output; Write a general function UpdateDzTimer to start and stop the timer, and implement the linkage switching of single frame transmission enable and message type; Write multi-frame timer and multi-channel single-frame timer callback functions respectively to achieve periodic transmission.

[0039] Associate the script with the CANoe project and set it to load automatically when the project starts.

[0040] Step 4: Function debugging and simulation operation Fault light function debugging: Switch the status of the four fault lights on the panel and check whether the global LampStatus variable is updated synchronously according to the bitwise operation rules; Multi-frame DM1 message test: Turn on the multi-frame DM1 message transmission enable switch, view the bus messages through the CANoe Trace window, and verify that the 18-byte DM1 message is transmitted normally with a 1-second cycle, and that the light status and DTC data are consistent with the panel configuration; turn off the switch, and the message transmission will stop immediately. Single-frame DM1 message test: Select any single frame, set the transmit enable to 1, select message type 0x18, and check the Trace to see the periodic transmission of 8-byte messages in 0x18FECAXX format; switch the message type to 0x1C online, the script will automatically switch the timer, and the message ID in the Trace will synchronously change to 0x1CFECAXX; turn off the LED enable for this channel, and the LED status of the first byte of the message will be automatically set to 0, which meets the logical requirements; Mixed mode test: Simultaneously enable multiple frames of DM1 messages and multiple single frames of DM1 messages. The two types of messages are sent independently in cycles without interfering with each other, and the bus data is normal.

[0041] The DM1 message transmission implementation method of this application embodiment abandons the traditional CAPL complex programming mode. Based on the CANoe panel and combined with CAPL script, it integrates the functions of sending multiple frames of DM1 messages and multiple single frames of DM1 messages in the same simulation project. It supports visual parameter configuration, one-click start and stop, and message ID switching as needed, which simplifies operation, reduces maintenance costs, and improves the versatility and stability of vehicle diagnostic simulation testing.

[0042] Secondly, embodiments of this application also provide a DM1 message transmission implementation device.

[0043] In one embodiment, reference is made to Figure 3 , Figure 3 This is a schematic diagram of the functional modules of the DM1 message transmission implementation device of this application. Figure 3 As shown, the DM1 message sending implementation device includes: a setup module, a creation module, a writing module, and an execution module.

[0044] The setup module is used to build a CANoe visual interactive panel for integrating control and parameter configuration controls. These controls include message start / stop controls, message type selection controls, and parameter configuration controls. The creation module is used to create DM1 groups for unified interactive variables. These variables connect the CANoe visual interactive panel and the CAPL script. The variables include status trigger variables, fault light status variables, message start / stop variables, message type variables, DTC and address variables. The writing module is used to write CAPL scripts to implement the logic control of message parsing, construction, and timed transmission, and to monitor fault light status variables through the CAPL scripts. The execution module is used to implement multi-frame DM1 message transmission control and single-frame DM1 message linkage transmission control based on the CANoe visual interactive panel, variables, CAPL scripts, and preset control logic.

[0045] Thirdly, this application provides a DM1 message transmission implementation device, which can be a personal computer (PC), laptop computer, server or other device with data processing capabilities.

[0046] Reference Figure 4 , Figure 4 This is a schematic diagram of the hardware structure of the DM1 message transmission implementation device involved in the embodiments of this application. In the embodiments of this application, the DM1 message transmission implementation device may include a processor, a memory, a communication interface, and a communication bus.

[0047] The communication bus can be of any type and is used to interconnect the processor, memory, and communication interface.

[0048] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces used for interconnecting internal devices to transmit DM1 messages, as well as interfaces used for interconnecting the device with other devices (such as other computing devices or user equipment). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user equipment can be displays, keyboards, etc.

[0049] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0050] The processor can be a general-purpose processor, which can call the DM1 message transmission implementation program stored in memory and execute the DM1 message transmission implementation method provided in the embodiments of this application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed when the DM1 message transmission implementation program is called can be referred to in the various embodiments of the DM1 message transmission implementation method of this application, and will not be repeated here.

[0051] Those skilled in the art will understand that Figure 4 The hardware structure shown does not constitute a limitation of this application and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0052] Fourthly, embodiments of this application also provide a computer-readable storage medium.

[0053] The present application has a computer-readable storage medium storing a DM1 message transmission implementation program, wherein when the DM1 message transmission implementation program is executed by a processor, it implements the steps of the DM1 message transmission implementation method as described above.

[0054] The method implemented when the DM1 message sending implementation program is executed can be referred to in the various embodiments of the DM1 message sending implementation method of this application, and will not be repeated here.

[0055] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.

[0056] In the description of the embodiments of this application, terms such as "exemplary," "for example," or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a concrete manner.

[0057] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.

[0058] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.

[0059] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.

[0060] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for transmitting DM1 messages, characterized in that, The DM1 message transmission implementation includes: A CANoe visual interactive panel is built for integrating control and parameter configuration controls. The controls include message start / stop controls, message type selection controls, and parameter configuration controls. Create group DM1 to unify interactive variables, and the variables are used to connect the CANoe visualization interactive panel and CAPL script. The variables include status trigger variables, fault light status variables, message start / stop variables, message type variables, DTC and address variables. Write a CAPL script to implement the logical control of message parsing, construction, and timed transmission, and use the CAPL script to monitor the status variables of the fault light; Based on the CANoe visual interactive panel, variables, CAPL script, and combined with preset control logic, multi-frame DM1 message transmission control and single-frame DM1 message linkage transmission control are realized.

2. The DM1 message transmission implementation method as described in claim 1, characterized in that: The message start / stop control is used to set the multi-frame DM1 message transmission enable switch, the 4-channel single-frame DM1 message independent transmission enable switch, and to actively control the start and stop of DM1 message transmission; The message type selection control is used to configure the DM1 message feature value selection control for each single frame DM1 message, so as to switch the target CAN message ID. The parameter configuration control is used to configure fault light status parameters, fault code DTC parameters, source address SA, and LED indicator enable control, and binds the fault light status parameters and fault code DTC parameters to CANoe system variables to achieve visual modification.

3. The DM1 message transmission implementation method as described in claim 1, characterized in that: The status trigger variable is used as a fault light status change trigger flag; The fault light status variables include the status of the protection light, the status of the Amber warning light, the status of the red stop light, the status of the fault indicator light, and the light status variables corresponding to multiple single-frame DM1 messages. The message start / stop variables include multi-frame DM1 message transmission enable and 4-channel single-frame DM1 message transmission enable; The message type variable includes four single-frame DM1 message feature values; The DTC and address variables include SPN, FMI, OC, source address SA, and LED enable variables corresponding to multi-frame DM1 messages or single-frame DM1 messages.

4. The DM1 message transmission implementation method as described in claim 1, characterized in that: The logical control includes global variable area declaration, message definition, and general function encapsulation; The global variable area is declared as follows: multi-frame DM1 message objects, 4 single-frame DM1 message objects, global light status combination variables, and timers. The timers include 1 set of multi-frame DM1 message transmission timers, 4 sets of single-frame DM1 message transmission timers, and 4 sets of extended ID single-frame DM1 message transmission timers. The message is defined as an 18-byte multi-frame DM1 message and an 8-byte standard single-frame DM1 message based on the J1939 protocol, matching the protocol frame length specification. The general function is encapsulated as a unified sending function for a single frame DM1 message, and integrates the logic for DM1 message ID concatenation, light status byte combination, DTC data filling, and message output, while eliminating duplicate codes.

5. The DM1 message transmission implementation method as described in claim 1, characterized in that, The process of monitoring the fault light status variables through the CAPL script specifically includes: The CAPL script monitors the status variables of the fault lights and sets the trigger flag when the status of any light changes. After the CAPL script detects that the trigger flag is set, it integrates the status of the four independent lights into a 1-byte comprehensive light status value through bitwise operations, and assigns it to a global variable for use by multiple DM1 messages.

6. The DM1 message transmission implementation method as described in claim 1, characterized in that: The multi-frame DM1 message transmission control includes monitoring the message transmission enable variable of the CANoe system and timer callback logic; The message transmission enable variable of the monitoring CANoe system is: when the multi-frame DM1 message transmission switch in the CANoe visual interaction panel is enabled, the multi-frame DM1 message transmission timer is started; when it is disabled, the multi-frame DM1 message transmission timer is turned off and DM1 message transmission is stopped. The timer callback logic is as follows: after the multi-frame DM1 message transmission timer is triggered, an 18-byte J1939 multi-frame DM1 message is constructed, and the source address, characteristic value, integrated light status, and 4 sets of DTC fault codes are filled in sequentially. The J1939 standard interface is called to complete the DTC format conversion and output the CAN message. After the execution is completed, the multi-frame DM1 message transmission timer is automatically restarted to realize periodic cyclic transmission.

7. The DM1 message transmission implementation method as described in claim 1, characterized in that: The single-frame DM1 message linkage transmission control includes dual-condition linkage judgment, parameter change linkage, and single-frame DM1 message construction. The dual-condition linkage judgment is to simultaneously monitor the single-frame DM1 message transmission enable variable and the DM1 message feature value variable. When transmission is enabled, the corresponding timer is automatically selected according to the DM1 message feature value variable, and the other set of timers is mutually excluded and turned off. When transmission is disabled, all corresponding timers are turned off. The parameter change linkage is such that when the CANoe visual interactive panel switches the DM1 message characteristic value, the CAPL script automatically re-executes the timer switching logic; The single-frame DM1 message is constructed by calling the general DM1 message sending function, filling in the lamp status according to the DM1 message ID type, filling in DTC data, outputting the single-frame DM1 message, setting the single-frame DM1 message sending timer period, and sending it cyclically.

8. A DM1 message transmission implementation device, characterized in that, The DM1 message transmission implementation device includes: The module is used to build a CANoe visual interactive panel for integrating control and parameter configuration controls, including message start / stop controls, message type selection controls, and parameter configuration controls. A creation module is used to create group DM1 for unifying interactive variables, and the variables are used to connect the CANoe visualization interaction panel and CAPL script. The variables include status trigger variables, fault light status variables, message start / stop variables, message type variables, DTC and address variables. The module is used to write CAPL scripts to implement the logical control of message parsing, construction, and timed transmission, and to monitor the fault light status variables through the CAPL scripts. The execution module is used to implement multi-frame DM1 message transmission control and single-frame DM1 message linkage transmission control based on the CANoe visual interactive panel, variables, CAPL script, and in combination with preset control logic.

9. A DM1 message transmission implementation device, characterized in that, The DM1 message transmission implementation device includes a processor, a memory, and a DM1 message transmission implementation program stored in the memory and executable by the processor, wherein when the DM1 message transmission implementation program is executed by the processor, it implements the steps of the DM1 message transmission implementation method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a DM1 message transmission implementation program, wherein when the DM1 message transmission implementation program is executed by a processor, it implements the steps of the DM1 message transmission implementation method as described in any one of claims 1 to 7.