This paper analyses the testing status of domestic construction machinery controller, introduces the hardware-in-the-loop principle, leads to IEC61131-3 standard, puts forward the hardware-in-the-loop testing platform of construction machinery based on IEC61131, and the problems that the platform can solve. Then, the structure of the platform is introduced in detail. Finally, the development direction of the construction of the hardware-in-the-loop test platform for the construction machinery controller is pointed out.
With the progress and development of electronic control technology in domestic construction machinery manufacturers, more and more manufacturers begin to develop their own controllers for the whole machine and the core components, which require a lot of testing. To ensure the correctness and reliability of its control function is a difficult point in the process of product development. Overseas manufacturers and institutions have carried out extensive research on controller function testing technology, and formed test case generation tools such as TestML, CTE, etc. Some results have been achieved by using control system development tools such as dSPACEMATLAB/Simulink Rhapsody for simulation testing, and their respective solutions have been formed, but domestic manufacturers are using them. These schemes usually require expensive hardware and software costs. At present, the testing method has got rid of the way in the prototype vehicle, and the semi-automatic testing process has become the trend of the development of the industry. For manufacturers, according to their own definition of controller function, there are disadvantages such as long cycle, high cost and difficult expansion in using foreign test schemes, and sometimes foreign technology is directly applied. Therefore, it is of great significance to master a kind of controller function testing technology for improving the independent R&D ability of manufacturers. Hardware-in-the-loop simulation (HIL) is one of the common technical means of automated test system. The computer simulation model is used to replace the control flow of the controller, and then the output loop of the controller is fed back to the computer to form a closed-loop test system. This method makes the test repeatable. External conditions can be controlled, critical test and limit test can be carried out. Using HIL requires a simulation controller to generate the signal needed by the test case and to receive the signal from the ECU to be tested. At present, there are many ways for most hardware to write tests in the loop, such as code format (scripting language), block diagram or tabular format. However, the workload of test case writing is very large and very complex, even exceeding the software writing of the controller to be tested. It is impossible to meet the current needs by a test case writing method alone. Therefore, it is necessary to write test cases in a simple and flexible way. IEC 61131-3 is the only international standard for industrial control programming language. It can be used to write test cases for HIL controller development and to observe test case variables online.
For the manufacturers who design and test their own controllers, they use IEC61131 language to program, so it is not difficult to use it to test the controllers. This paper introduces a hardware-in-the-loop test platform for construction machinery controller based on IEC61131. The hardware-in-the-loop test platform is shown in Figure 1. The controller to be tested receives various switch and sensor signals when it is running, and outputs control signals (such as signals to control solenoid valves, relays or motors) after operation. The simulation test platform sends out the switch and sensor signals that the controller to be tested needs to receive, and receives the control signal output by the controller, judges whether the feedback of the controller is correct, and sends the test results to the test management software installed on the PC. Test management software is used to receive test results, observe intermediate variables and generate test reports in the test. 61131 programming system is used to write test cases and input machine models. It can also debug test cases. The programmable power supply is used to supply power to the controller and the simulation controller. Its output voltage is programmable. Programmable load is the load programmed by simulation control according to the configuration of test cases. It can be programmed as relay, solenoid valve, motor and other loads.
It can also be replaced by real load. You can also use load models (or machine models) instead of programmable loads. Following is a detailed description of each part of the design. Sensor signal generating circuit. The simulation controller is composed of sensor signal generating circuit, signal acquisition circuit and MCU test sample and load (machine) model. The sensor signal generator circuit can simulate the output of switching, resistance, thermostatic element current, voltage, pulse and sinusoidal signals. There are two kinds of switching signals on the whole machine: ground/suspension, VCC/suspension, in which VCC is the battery voltage (12V or 24V). The MCU of the simulation controller runs the test case program. The test case program sends the instructions to CPLD through the I2C bus of the MCU. According to the instructions, the CPLD controls the ports as high level, low level or suspended position. The driver chip converts the output level of CPLD into the level of driving relay to realize the output of switching signal.
Resistance Signal Realization: The test case program controls the resistance of the analog switch chip by SPI, and realizes the output of resistance signal. Realization of voltage, current and sine wave signals: The test case program controls DAC (digital-to-analog converter) chip by SPI to convert instruction to 0-5V voltage, and through CPLD to control analog switch to switch on the signal channel needed to output. Pulse signal realization: MCU controls the duty cycle and frequency of the pulse signal by outputting PWM, and controls the peak value of the pulse signal by controlling the programmable power supply. Signal acquisition circuit. The signal acquisition circuit collects the control signals from the controller to be tested, such as switch control signals and solenoid valve control signals. The signal acquisition circuit collects the signal, compares the execution results with the expected results according to the test sample, and sends the running results to the test management software. The PWM signal can be directly input to the simulation controller or programmable load. The advantage of the former is that the duty cycle of PWM signal can be converted into the control object model by formula, and the simulation speed is faster. The advantage of the latter is that the current can be directly input into the simulation controller to simulate the response of the control object more realistically. MCU of simulation controller. The MCU of the simulation controller uses high-speed signal processors, such as TI’s TMS320 series, Freescale’s MCP55x series or Infineon’s Tricore series processors, which can meet the system design requirements. The underlying hardware and driver of MCU provide abundant resources and interfaces. Users can directly use these resources to write test samples on the programming system supporting IEC61131. The way of writing is very flexible. Complex samples can be written in ST language. Simple samples can be written in SFC, FB or FBD block diagram language. Machine model (or load model, control object model) in MCU is a packaged function block.
Users can call it directly after modifying parameters. CPLD/FPGA. CPLD connected with MCU is an extension of MCU function, which is used to collect and control low-speed IO signals, send acquisition results and receive MCU control instructions. Altera’s MAX II series, Lattice’s MacXO 3 and Xilinx’s XA Spartan series CPLD or FPGA can meet the system design requirements. Users can configure the input and output of CPLD by using programming system. The programmable power supply provides power for the controller to be tested and the simulation controller. There are two kinds of power supply for the controller to be tested, which can be programmed into 12V system and 24V system, and the maximum output is 40V, which can be used to test the power endurance of the controller to be tested. The power supply for simulation control is divided into digital power supply and drive power supply. The digital power supply voltage is low and the driving power is high, and the voltage can be adjusted from 9V to 36V, which can be used to test the port voltage tolerance of the controller to be tested. Voltage regulation of programmable power supply is configurated by test management software. Programmable load allows users to choose the type of load: small lights, solenoid valves or relays. Users can also access the real load for testing. The test management software can communicate with the equipment through the DLL file of the equipment, configure the equipment, read and write the test configuration, and derive the test results to generate the test report. The HIL test platform based on IEC61131 is still in the developing stage, and the function of each component tends to be integrated. On the one hand, it can reduce the total cost of testing.
On the other hand, it puts forward higher requirements for the control integration of components, and also brings new opportunities and challenges to the test system.