1. Introduction
Traditional information management systems such as ERP have played an important role in manufacturing enterprises, but these systems have not yet been extended to the process management of workshops, making workshop process management automated, information-based, and intelligent. In order to solve the above problems, the emerging MES system usually uses various data interaction terminals in the workshop. The data interaction terminal is responsible for collecting and processing the most original data and transmitting it to the workstation, while receiving the operation commands issued by the workstation [1]. However, traditional data interaction terminals customize the business process and data collection items into programs that are fixed in the terminal. When the business process changes or is applied in different industries, it takes a lot of time to modify the terminal program and the host computer application. For example, if there are N terminals in a system to implement different businesses, N sets of terminal programs must be designed, resulting in many versions of terminal programs. Obviously, it cannot adapt to the rapid changes of modern enterprises and is not conducive to promotion among industries. This paper proposes a new design scheme, introducing a business function configuration engine and a business parsing engine. The business function configuration engine is the core of the host computer application, and the business parsing engine is integrated in the data interaction terminal. In this way, when the business or industry changes, only the configuration information of the host computer's business configuration engine needs to be changed without changing the terminal program. Adopting such a design scheme can speed up the system development process and promote the system in various industries.
2. Embedded intelligent data interaction terminal hardware platform
The hardware platform uses the Samsung S3C44B0 processor, which uses the ARM7TDMI structure and has a maximum frequency of 66MHz[2]. This platform uses this processor as the core and adds many peripheral modules. The hardware platform block diagram is shown in Figure 1.
The keyboard, RFID and LCD screen are the human-computer interaction platform of the terminal; the core module of the system is connected to the processor through the system bus; the external rich RAM and ROM resources can improve the flexibility of system software design; Ethernet is used as the main communication interface, making the system communication more standardized and ensuring the speed and reliability of communication. In this system, except for the processor, SDRAM, and FlashRom as fixed modules on the mainboard, other peripherals are designed to be pluggable. In this way, when the demand changes, you only need to plug in or unplug the required peripheral modules. This design concept increases the flexibility of the terminal and shortens the development cycle.
3. Ideas and implementation of software design
3.1 Overall model and working principle of intelligent data interaction system
Before describing the software implementation of the data interaction terminal, the overall structure of the system and its working principle are introduced first. Figure 2 is the overall model of the underlying data interaction in the MES system. The host computer of the data interaction system is mainly composed of the business demand module, the business configuration engine, the data parsing engine, the engine configuration information and the underlying communication module. The system obtains business requirements from the upper management system, the business configuration engine reads the engine configuration information, generates a business event chain, and sends it to the corresponding data interaction terminal according to the workstation address through the communication module. On the contrary, when receiving the collection data packet, the data parsing engine parses the data collected by the data interaction terminal, and finally hands it over to the business demand module to feedback to the upper management program. The data interaction terminal software is mainly composed of the underlying communication module, the business parsing engine, the terminal presentation layer and the peripheral driver and response module. After the terminal communication layer receives the data packet from the upper computer and verifies it correctly, it is handed over to the business parsing engine. After the parsing engine parses the business event chain according to the engine protocol, it passes through the terminal presentation layer and waits for data collection. After the collection is completed, it is handed over to the collection generation engine to generate fixed format data and then returned to the host computer, thus forming a closed loop of data interaction. [page]
3.2 Implementation Principle of Terminal Engine
The above is the working principle of the system. The following will introduce the implementation of the data interaction terminal business analysis engine and data acquisition engine in detail. The main functions implemented are: LCD display and peripheral control. How the LCD displays, what content is displayed, how the peripherals are controlled, the terminal maintains the last state before the business analysis engine, and only after the analysis do you know what should be implemented and how to implement it. The analysis engine is a library that converts a piece of data into a logic control function according to a specific protocol. That is, through a protocol, the business logic of the terminal is handed over to a powerful PC for processing. The terminal work is just the performance after each logical calculation. To achieve the above functions, a complete set of functional protocol stacks must be available. Before designing the protocol stack, the functions of the terminal are first divided into modules. Here, the communication module is used for the division, which mainly includes: keyboard control, LCD display, and peripheral collector control. Each module is further refined to show the possible states of each module as much as possible. Again, the implementation of the functional protocol, the protocol consists of protocol keywords and control content. For example, keyword A represents terminal hardware module A, and the content after keyword A indicates the function that the host computer requires module A to implement, and the function of module A is further refined. Table 1 shows the composition of some functional protocols. The business status of the upper computer of the terminal response is mainly controlled by two state quantities. In the program, we define them as two global variables, which are used to indicate which business function the lower computer currently belongs to and the steps of the function. In the program, they are defined as ID and STEP. The upper computer system has designed the logical process of ID and STEP. For example, in a certain ID and STEP state, the terminal screen displays the process completion status, and requires the user to collect data through various acquisition peripherals and submit it to the upper computer. Each time the upper computer sends data, it is ID + STEP + module A control word + module A control data + module B control word + module B control data + .... At the same time, set the NEXT_ID and NEXT_STEP of the trigger module. When the corresponding trigger occurs, the upper computer can send the next business process and its steps to the terminal according to NEXT_ID and NEXT_STEP. Metaphorically, the upper computer is a huge central processor that controls the entire logical calculation and data organization of the business process. All terminals in the workshop are more like an input and output device around this central processor. We know that it takes a certain amount of CPU time to calculate ID×STEP logic. If this work is handed over to the host computer (CPU reaches G-level processor) to complete, the terminal with limited processing power can handle more other collection work. At the same time, ID×STEP business interfaces consume a lot of RAM and ROM resources. If these interfaces are solidified inside the terminal, the hardware cost of the terminal will be greatly increased. Moreover, when the demand changes, a lot of work must be spent to change the program and data of each terminal. If the above work is handed over to the host computer for processing, the mutual jump between ID×STEP functions can be realized in a very small hardware resource. Moreover, when the business changes, only the logical relationship and data of the host computer need to be changed, without changing the application program inside the terminal. Table 1 shows some components of the protocol.
Similar to the parsing engine, the data acquisition engine sets the collected data according to a certain protocol format, sends the data to the host computer through the communication layer, and the host computer classifies and parses the collected data according to the data acquisition and parsing protocol. In this way, the terminal's functional logic, human-computer interaction, and peripheral control are achieved, and the data processing is completely controlled by the host computer. [page]
3.3 Terminal software implementation process
The specific implementation process of the application is shown in Figure 3.
The variables ID and STEP have been introduced above. ID represents a large functional node, and STEP represents the operation steps under the corresponding functional point (ID). If defined as a byte variable, two bytes can represent a total of 256*256=65536 functions, which can fully meet the needs of general data acquisition terminals; RTN is the state machine variable of the terminal. The terminal program controls the working status of the system by setting a working status variable RTN.
(1) RTN=0 means that all tasks are ready and can accept business requests from the host computer.
(2) RTN=1 indicates that the terminal has correctly received the service request of the host computer. In this process, the terminal needs to set the service request of the host computer. First, analyze the ID and STEP of the current request. The jump between different functions of the application is mainly determined by the function node ID and STEP. For example, the current ID=3, STEP=4 indicates that the terminal is currently in the fourth step of the third function of the business process. If the ID is a special function program update, the terminal program can be remotely updated. Secondly, if the ID is not a special request, perform functional protocol analysis. After setting the service request of the current function step of the terminal, pass the data structure to the event response. The business response divides the function into different sub-modules according to the business requirements and calls the corresponding sub-event processing function of the parsing engine library. In the sub-event processing function, call the board-level driver processing function to implement specific hardware functions. After setting the service function request of the host computer, RTN is set to 2.
(3) RTN=2 indicates that the terminal has processed the received information and implemented the interface display, key permission settings, key redirection settings (key redirection means that after pressing a key, the host computer sends the corresponding function point to the terminal according to the currently pressed key to realize function jump), card swiping redirection function settings, A/D acquisition settings, etc. At this time, it is waiting for data acquisition, key action or card swiping action to trigger. After the acquisition action is completed, the collected data is planned by the data acquisition engine and submitted to the host computer. At the same time, RTN is set to zero to complete a function request to response, and then returns to the idle state to wait for the host computer to inquire.
By adopting the above software design scheme, the mutual jump of ID×STEP functions can be realized with very small hardware resources. Moreover, when the business changes, only the logical relationship and data of the host computer need to be configured without changing the application program inside the terminal. In practical applications, only one set of terminal programs is needed, and the host computer can determine the functional flow of the terminal according to the address of the terminal.
4. Conclusion
The innovation of this paper is that it proposes a design scheme for an embedded intelligent data interaction terminal that is different from the traditional design scheme. This scheme can solve the problem of not changing the internal program of the data acquisition terminal when business needs change, thereby solving the universality problem of the data acquisition terminal in the promotion process of different industries to a certain extent, shortening the development cycle of the entire system, and also bringing great convenience to the maintenance and upgrade of the system. At the same time, the terminal program design framework proposed in this paper can also realize the mutual jump of 256*256 business function interfaces under the condition of limited hardware resources.
This embedded intelligent data interaction terminal system has been put into trial operation in a large enterprise in Guangdong Province with good operating results. It has now been put into use on a large scale. The company's daily maintenance and business upgrades of the system are very convenient. Compared with the company's original traditional design of customizing business processes and data collection items into programs and solidifying them in the terminal, the new solution has greatly reduced the company's production costs caused by frequent modifications of terminals or terminal programs and host computer applications when business upgrades and business processes change. The direct economic benefits are at least 200,000 yuan per year, and the company's labor efficiency has also been improved.
Previous article:Mobile phone programming development platform based on embedded system
Next article:Home Network Technology Based on Power Line Communication
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- My Journey of MCU Development (Part 4)
- Requires ssh or telnet service
- [SAMR21 new gameplay] 26. Onewire
- LED PWM Dimming C Program
- Keil.STM32H7xx_DFP.2.2.0 installation package problem
- Drawing
- EEWORLD University Hall - Open Source Power Linux Kernel Source Code Study and Practical Exercises
- Let me show you how to calculate a current transformer!
- Theory and Implementation of Narrow-Band IF Sampling Based on DSP_C54X
- [RT-Thread reading notes] (1) Thread initialization and linked list