| With the continuous development of China’s economy,high-rise buildings are springing up.Elevators,as an important mean of transportation of people and materials in high-rise buildings,have gradually become an indispensable part of people’s life.At the same time,with the continuous development of artificial intelligence technology industry,biometric recognition technology such as voice,face,fingerprint reaches the commercial standard,and gradually penetrates into all aspects of people’s lives.The conditions of intelligent elevator control system have matured.However,the elevator control system of domestic elevator manufacturers has some problems,such as low hardware performance and poor software scalability,which seriously hinders the development of elevator intelligence.In order to solve the above problems,this paper designs and implements an elevator control system software based on STM32F105 platform.This paper analyzes the elevator functional requirements,and divides the elevator functions into three types: standard operation,fault handling and maintenance.The main functions of standard operation are operation control,door control and abnormal protection.The main function of fault processing is hierarchical fault processing.The main functions of the maintenance are the elevator point operation control and the self-learning function of setting floor information.According to the requirement analysis,I/O interface function of main control board is defined.The software of elevator control system is modularized.It is divided into three layers: hardware abstraction layer,middleware layer and elevator logic layer.This paper focuses on the design and implementation of middleware layer and elevator logic layer.The interface provided by middleware layer includes: CAN data frame transceiver interface,RS485 data frame transceiver interface,GPIO level control interface,I2 C read-write EEPROM interface,etc.Elevator logic layer divides the operation mode of elevator control system into standard operation mode,fault handling mode and maintenance operation mode according to functional requirements.The standard operation mode realizes the control of elevator operation by switching between standby state,start state,operation state,level state,open state and closed state.Fault handling mode divides the fault into three levels,the first level only registers the fault,the second level emergently stop the elevator at the nearest layer,the third level seriously threatens the safety of passengers and emergently takes brake handling.The maintenance mode includes two states: maintenance state and self-learning state.Elevator maintainers can control point-to-point operation of the elevator in maintenance operation state,and can automatically acquire floor information in self-learning state.When testing the software of elevator control system,we carry out unit tests on the interface of middleware layer and carry out functional tests on the elevator logic layer.In the unit test of the middleware layer,I2 C read-write EEPROM and the sending/receiving of CAN data frame as well as RS485 data frame are tested respectively with the Google Test framework.In the test of elevator logic layer,the full selection function,switch function and abnormal protection function realized by standard operation mode are tested;the fault selfrescue function and emergency brake-holding function realized by fault handling mode are tested;and the point operation function and self-learning function realized by overhaul operation mode are tested.The test results show that the elevator control system software proposed in this paper can satisfy the corresponding function requirements. |