System, method and device for realizing programmable power supply control based on CAPL, processor and computer readable storage medium thereof
By directly calling the power control function in CAPL, the upper computer and VN1630A equipment can be used to realize the automated control of programmable power supply, which solves the problems of low testing efficiency and high equipment cost of on-board controller hardware rings, and improves the testing efficiency and accuracy.
Patent Information
- Application Number
- CN202410510284.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-26
- Publication Date
- 2024-11-29
AI Technical Summary
In the prior art, the hardware ring testing efficiency of the vehicle-mounted controller is low, and the power control equipment is costly, making it difficult to achieve automation and linkage testing.
Using a CAPL-based system, the upper computer, programmable power supply and VN1630A device is connected by USB and CAN lines, loading the CAPL DLL, and directly calling the power control function in the CAPL to realize automated testing.
The power supply can be controlled without additional equipment, reducing manual operation and equipment costs, improving testing efficiency and accuracy, reducing the threshold for use, and achieving the applicability of all test projects.
Smart Images

Figure CN119045365A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart cars, and in particular to the field of automotive electronic and intelligent technology, and specifically refers to a system, method, device, processor and computer-readable storage medium thereof for implementing programmable power supply control based on CAPL. Background Art
[0002] With the continuous development of smart cars, the number of vehicle controllers continues to increase, and the speed of software and hardware iteration is also getting faster and faster. Therefore, the hardware-in-the-loop test of vehicle controllers is extremely important, which can comprehensively test the controllers in an efficient and low-cost way. Among them, the most basic external device in the hardware-in-the-loop test bench is the power supply. Whether it is to power the device under test, or to perform communication voltage / high and low voltage tests, or to perform some power-off tests, the power supply equipment is indispensable.
[0003] However, nowadays, most test engineers still use manual adjustment when using power supplies, which is not only time-consuming and labor-intensive, but also inefficient, and it is difficult to test the power-on and power-off time parameters. A small number of test engineers control programmable power supplies through serial port tools or self-developed tools, which greatly facilitates the use of power supplies, but they still need to operate related tools during the test process, and it is difficult to achieve linkage testing with other equipment on the test bench, especially CANoe software; or they control the power supply through some other equipment, such as programmable power supply and VT power supply board, which can realize automatic control of power supply in bus testing, but this greatly increases the cost of the test bench. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a system, method, device, processor and computer-readable storage medium for implementing programmable power supply control based on CAPL, which are easy to operate, have high working efficiency and a wide range of applications.
[0005] In order to achieve the above-mentioned object, the system, method, device, processor and computer-readable storage medium for implementing programmable power supply control based on CAPL of the present invention are as follows:
[0006] The system for realizing programmable power supply control based on CAPL has the following main features: the system comprises a host computer, a programmable power supply and a VN1630A device; the host computer is connected to the programmable power supply via a USB to serial port cable, the host computer is connected to the VN1630A device via a USB cable, the programmable power supply is connected to a device to be tested, the VN1630A is connected to the device to be tested, and the VN1630A is used for simulating and collecting bus data.
[0007] Preferably, the host computer includes a CANoe bus test module, the CANoe bus test module loads the generated CAPL DLL, directly calls the function of controlling the programmable power supply in CAPL, runs the CAPL test script, realizes the control of the programmable power supply, and performs automated testing.
[0008] Preferably, the programmable power supply supplies power to the device under test and communicates with the host computer through a serial port.
[0009] Preferably, the programmable power supply is connected to the device under test via a KL30 line, a KL15 line and a GND line.
[0010] Preferably, the VN1630A is connected to the device under test via a CAN line.
[0011] The method for implementing programmable power supply control based on CAPL using the above system is mainly characterized in that the method comprises the following steps:
[0012] (1) Create a project to generate CAPL DLL in Visual Studio according to the VECTOR rules;
[0013] (2) Load serial communication related functions;
[0014] (3) Encapsulate programmable power supply related control functions according to the custom function specifications in CAPL DLL;
[0015] (4) Run the project that generates the CAPL DLL and compile it to obtain the DLL file that controls the programmable power supply.
[0016] Preferably, the step (3) specifically comprises the following steps:
[0017] Organize the commonly used serial port commands of programmable power supplies, develop related power supply function functions, and encapsulate them according to the custom function specifications in CAPL DLL.
[0018] The device for realizing programmable power supply control based on CAPL has the following main features:
[0019] a processor configured to execute computer executable instructions;
[0020] The memory stores one or more computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the method for implementing programmable power supply control based on CAPL are implemented.
[0021] The main feature of the processor for implementing programmable power supply control based on CAPL is that the processor is configured to execute computer executable instructions. When the computer executable instructions are executed by the processor, the various steps of the above-mentioned method for implementing programmable power supply control based on CAPL are implemented.
[0022] The main feature of the computer-readable storage medium is that a computer program is stored thereon, and the computer program can be executed by a processor to implement the various steps of the above-mentioned method for implementing programmable power supply control based on CAPL.
[0023] The system, method, device, processor and computer-readable storage medium for implementing programmable power supply control based on CAPL of the present invention can directly control the programmable power supply without the need for additional equipment, reduce the additional cost of controlling the power supply equipment, avoid the repetitive labor of manual testing, improve the testing efficiency, optimize the CAPL programming code, and enable the user to control the programmable power supply by directly calling the function function without understanding the communication logic of the programmable power supply, thereby lowering the threshold for use and eliminating the need for repeated configuration. After one configuration, it can be applied to all test projects, thereby improving work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a structural schematic diagram of a system for realizing programmable power supply control based on CAPL of the present invention.
[0025] Figure 2 The flowchart of the method for controlling a programmable power supply based on CAPL of the present invention is shown in FIG. DETAILED DESCRIPTION
[0026] In order to more clearly describe the technical content of the present invention, further description is given below in conjunction with specific embodiments.
[0027] The system for realizing programmable power supply control based on CAPL of the present invention comprises a host computer, a programmable power supply and a VN1630A device, wherein the host computer is connected to the programmable power supply via a USB to serial port cable, the host computer is connected to the VN1630A device via a USB cable, the programmable power supply is connected to a device to be tested, the VN1630A is connected to the device to be tested, and the VN1630A is used for simulating and collecting bus data.
[0028] As a preferred embodiment of the present invention, the host computer includes a CANoe bus test module, the CANoe bus test module loads the generated CAPL DLL, directly calls the function of controlling the programmable power supply in CAPL, runs the CAPL test script, realizes the control of the programmable power supply, and performs automated testing.
[0029] As a preferred embodiment of the present invention, the programmable power supply supplies power to the device under test and communicates with the host computer through the serial port.
[0030] As a preferred embodiment of the present invention, the programmable power supply is connected to the device under test via a KL30 line, a KL15 line and a GND line.
[0031] As a preferred embodiment of the present invention, the VN1630A is connected to the device under test via a CAN line.
[0032] The present invention uses the above system to implement a method for programmable power supply control based on CAPL, wherein the method comprises the following steps:
[0033] (1) Create a project to generate CAPL DLL in Visual Studio according to the VECTOR rules;
[0034] (2) Load serial communication related functions;
[0035] (3) Encapsulate programmable power supply related control functions according to the custom function specifications in CAPL DLL;
[0036] (4) Run the project that generates the CAPL DLL and compile it to obtain the DLL file that controls the programmable power supply.
[0037] As a preferred embodiment of the present invention, the step (3) specifically comprises the following steps:
[0038] Organize the commonly used serial port commands of programmable power supplies, develop related power supply function functions, and encapsulate them according to the custom function specifications in CAPL DLL.
[0039] The device for implementing programmable power supply control based on CAPL of the present invention, wherein the device comprises:
[0040] a processor configured to execute computer executable instructions;
[0041] The memory stores one or more computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the method for implementing programmable power supply control based on CAPL are implemented.
[0042] The processor of the present invention is used to implement programmable power supply control based on CAPL, wherein the processor is configured to execute computer executable instructions, and when the computer executable instructions are executed by the processor, the various steps of the above-mentioned method for implementing programmable power supply control based on CAPL are implemented.
[0043] The computer-readable storage medium of the present invention stores a computer program thereon, and the computer program can be executed by a processor to implement the various steps of the above-mentioned method for implementing programmable power supply control based on CAPL.
[0044] In view of the shortcomings of the prior art, it is necessary to invent a system and method for realizing programmable power supply control based on CAPL, so that users can automatically adjust the voltage and current values in bus testing, control the output of the power supply, and the power supply output mode, such as series and parallel connection. The present invention realizes automatic control of the programmable power supply by directly calling the power supply related function in CAPL. On the one hand, it can reduce the repetitive labor of most engineers to manually control the power supply, and on the other hand, it reduces the cost of additional power supply control equipment, and optimizes the code for controlling the programmable power supply in CAPL, reduces redundant code, and improves work efficiency.
[0045] In a specific embodiment of the present invention, a system and method for realizing programmable power supply control based on CAPL is proposed in the present invention. The core principle is to realize the writing of programmable power supply function through dynamic link library (DLL), generate it according to the template officially specified by Vector, so that it can be called in CAPL. When the corresponding function is directly called in CAPL, the automatic control of the programmable power supply can be realized.
[0046] The present invention proposes a system for realizing programmable power supply control based on CAPL. Figure 1 As shown, it includes: host computer, programmable power supply, VN1630A device and device under test. The host computer is connected to the programmable power supply through a USB to serial port cable, the host computer is connected to the VN1630A device through a USB cable, the programmable power supply is connected to the device under test through KL30, KL15, and GND lines, and VN1630A is connected to the device under test through a CAN line.
[0047] Figure 1 The computer in the system is used as the host computer, running the CANoe bus test software, loading the generated CAPL DLL in the software configuration, directly calling the function of controlling the programmable power supply in CAPL, and running the CAPL test script to realize the control of the programmable power supply and perform automated testing.
[0048] Figure 1 The programmable power supply provides power to the device under test and communicates with the host computer through the serial port.
[0049] Figure 1 VN1630A is a bus communication tool used for simulation and collection of bus data.
[0050] The CAPL DLL of the programmable power supply mentioned in the present invention has the following development process: Figure 2As shown, first, in VisualStudio, create a project to generate CAPL DLL according to the rules of VECTOR; then load the serial communication related functions to control the programmable power supply; then organize the commonly used serial port instructions of the programmable power supply, develop related power supply function functions, and encapsulate them according to the custom function specifications in CAPL DLL; finally, run the project to generate CAPL DLL and compile to get the DLL file that controls the programmable power supply.
[0051] Compared with the prior art, the system and method for implementing programmable power supply control based on CAPL described in the present invention have the following advantages:
[0052] ① No other equipment is needed to control the power on and off, such as programmable power supply, VT board or relay, and no additional wiring harness is needed for the VN163 device. The present invention can directly call the relevant functions in the DLL in CAPL to achieve voltage and current regulation and power-on and power-off status control, saving equipment expenses;
[0053] ② Compared with the manual operation of the power supply, this invention avoids repeated manual operations and improves work efficiency and operation accuracy;
[0054] ③ Compared with directly compiling serial communication and programmable power control functions in CAPL, the present invention directly encapsulates the functional functions of the programmable power supply so that they can be directly called in CAPL, reducing redundant codes and improving test efficiency;
[0055] ④ The present invention can combine the remaining steps in programmable power supply control and bus testing to achieve overall automated testing;
[0056] ⑤ Once the CAPL DLL generated in the present invention is configured in the CANoe software, it can be adapted to all projects without multiple adaptations.
[0057] The specific implementation scheme of this embodiment can refer to the relevant description in the above embodiment, which will not be repeated here.
[0058] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0059] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.
[0060] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0061] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution device. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0062] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the corresponding program may be stored in a computer-readable storage medium, which, when executed, includes one of the steps of the method embodiment or a combination thereof.
[0063] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0064] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0065] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0066] The system, method, device, processor and computer-readable storage medium for implementing programmable power supply control based on CAPL of the present invention can directly control the programmable power supply without the need for additional equipment, reduce the additional cost of controlling the power supply equipment, avoid the repetitive labor of manual testing, improve the testing efficiency, optimize the CAPL programming code, and enable the user to control the programmable power supply by directly calling the function function without understanding the communication logic of the programmable power supply, thereby lowering the threshold for use and eliminating the need for repeated configuration. After one configuration, it can be applied to all test projects, thereby improving work efficiency.
[0067] In this specification, the present invention has been described with reference to specific embodiments thereof. However, it is apparent that various modifications and variations may be made without departing from the spirit and scope of the present invention. Therefore, the specification and drawings should be regarded as illustrative rather than restrictive.
Claims
1. A system for programmable power control based on CAPL, It is characterized in that The system includes a host computer, a programmable power supply and a VN1630A device. The host computer is connected to the programmable power supply via a USB to serial port cable, the host computer is connected to the VN1630A device via a USB cable, the programmable power supply is connected to the device under test, the VN1630A is connected to the device under test, and the VN1630A is used for simulating and collecting bus data.
2. The system for realizing programmable power control based on CAPL according to claim 1, It is characterized in that The host computer comprises a CANoe bus test module, which loads the generated CAPL DLL, directly calls the function of controlling the programmable power supply in CAPL, runs the CAPL test script, realizes the control of the programmable power supply, and performs automated testing.
3. The system for realizing programmable power control based on CAPL according to claim 1, It is characterized in that The programmable power supply supplies power to the device under test and communicates with the host computer through a serial port.
4. The system for realizing programmable power control based on CAPL according to claim 1, It is characterized in that The programmable power supply is connected to the device under test via a KL30 line, a KL15 line and a GND line.
5. The system for realizing programmable power control based on CAPL according to claim 1, It is characterized in that The VN1630A is connected to the device under test via a CAN line.
6. A method for implementing programmable power supply control based on CAPL using the system of claim 1, It is characterized in that The method comprises the following steps: (1) Create a project to generate CAPL DLL in Visual Studio according to the VECTOR rules; (2) Load serial communication related functions; (3) Encapsulate programmable power supply related control functions according to the custom function specifications in CAPL DLL; (4) Run the project that generates the CAPL DLL and compile it to obtain the DLL file that controls the programmable power supply.
7. The method for implementing programmable power supply control based on CAPL according to claim 6, It is characterized in that The step (3) specifically comprises the following steps: Organize the commonly used serial port commands of programmable power supplies, develop related power supply function functions, and encapsulate them according to the custom function specifications in CAPL DLL.
8. A device for implementing programmable power supply control based on CAPL, It is characterized in that The device comprises: a processor configured to execute computer executable instructions; A memory storing one or more computer executable instructions, wherein when the computer executable instructions are executed by the processor, the steps of the method for implementing programmable power supply control based on CAPL described in any one of claims 6 to 7 are implemented.
9. A processor for implementing programmable power control based on CAPL, It is characterized in that The processor is configured to execute computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the method for implementing programmable power supply control based on CAPL described in any one of claims 6 to 7 are implemented.
10. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, and the computer program can be executed by a processor to implement the various steps of the method for implementing programmable power supply control based on CAPL as described in any one of claims 6 to 7.
Citation Information
Cited By
Instrument control method based on CANoe
CN117452846A
Instrument control method based on CANoe
CN117452846B
Vehicle frame testing method and device for simulating actual working conditions
CN120779907A
