In modern sports competitions, especially those related to the referee's scoring and management, the fairness and impartiality of the referee are directly related to whether the competition can proceed smoothly and the level of sports competition. The score of the athletes in the boxing match is counted by the effective points of the five referees. Since the effective point requires at least three referees to be valid at the same time, the referee's level and the referee's impartiality directly determine the level of the athlete's score. Through the display of the venue display, the referee's detailed information (name, unit, effective point and management information) will be announced to the public, which can greatly improve the fairness and impartiality of the referee and ensure the quality and level of the competition.
Visual Basic is an object-oriented programming language introduced by Microsoft Corporation in the Windows environment. It encapsulates the complexity of Windows programming, designs applications using a visual interface, improves application development efficiency, and is powerful. Easy to learn and use, simple programming, etc., is one of the most widely used programming languages ​​in the world, and it is also recognized as the most efficient programming method. Whether it's developing powerful, reliable business software or writing small utility programs that can handle real-world problems, VB is the fastest and easiest way.
The software is designed in Visual Basic 6.0 environment, two implementation methods: one is to achieve dual-screen display by calling API function; the other is to realize dual-screen display through serial communication between master and slave, which can satisfy The needs of different hardware environments.
In VB 6. O provides the control MSComm to complete the serial communication. The control provides standard event processing functions and procedures, and provides the setting of serial communication parameters through the attribute method, which solves the problem of serial communication relatively easily.
1 The design process of the single-machine dual-screen display design system is shown in Figure 1.
This article refers to the address: http://
1.1 Calling the API Function API (Application Programming Interface) is a predefined function to provide the ability of applications and developers to access a set of routines based on a piece of software or hardware without Access the source code or understand the details of the internal workings. All applications running on the Windows platform include the Windows operating system, VB is Windows programming environment, so you can use the API function.
First determine the double screen flag bit doublescreen_flag, if it is 0, enable stand-alone dual screen display:
Declare API functions, each defining function calls an API function, for example:
1.2 Setting of Dual Screen Size The ChangeScreenSize() function sets the size of the display interface in the sub screen. For example:
1.3 Dual Screen Position Setting Define the ChangeScreenPosition() function to set the position of the screen in the sub screen.
1.4 Dual screen resolution and frequency setting Define the ChangeScreenFrequency() function to set the frequency and resolution of the sub screen.
1.5 The detailed content design of the dual screen display According to the requirements of the competition and the boxing match, the content displayed on the site display mainly includes: details of the referee (including: name, unit, valid point and management information), information of the athlete ( Including: name, unit) and game information (including: kilograms, games, rounds, time, scores). The display of dual screen content is collected directly from the software database. The six display interfaces contain different display information, and different interfaces can be selected according to the display requirements to meet the needs of the game. The part of the code of interface 1 is:
2 master-slave serial communication dual-screen display design
2.1 Serial Communication Technology RS 232
Serial communication technology uses RS 232 serial communication. RS 232 is currently the most widely used serial interface in the PC and communications industries. It is defined as a single-ended standard that increases communication distance in low-rate serial communications. RS 232 takes an unbalanced transmission method, so-called single-ended communication.
In the communication, 2 and 3 pins are selected as the communication input and output ports, and 5 pins are used as the ground. When two serial ports are made, the 2 and 3 interface jumpers are made. Since the content to be transmitted is short and there is only one frame, and the parity bit is not used, judging the acceptance information by judging the end of the frame header is a simple communication transmission, which greatly reduces the complexity of the system.
2.2 MSComm Control Microsoft Communications Control (hereinafter referred to as MSComm) is an ActiveX control provided by Microsoft Corporation to simplify serial communication programming under Windows. It provides an easy way for applications to send and receive data through the serial interface.
Common properties of the MSComm control:
CommPort: Set and return the communication port number.
Settings: Sets and returns the baud rate, parity, data bits, and stop bits as a string.
PortOpen: Sets and returns the status of the communication port, and can also open and close the port.
Input: Returns and deletes characters from the receive buffer.
Output: Write a string to the transmission buffer.
Settings of the MSComm control:
2.3 The transmission of serial communication first judges the double screen flag bit doublescreen_flag. If it is 1, it performs serial communication. The information to be sent (the information of the referee, the information of the athlete, the game information) is connected into one frame, and the FFFF is used as the frame header to transmit with EEEE as the end of the frame. The size of the accepted buffer is determined according to the length of the transmitted frame. The content is judged according to whether it is an English name or a Chinese name. Some of the code is as follows:
2.4 Serial communication accepts the display of the receiving system, using the method of intercepting from the accepting buffer, assigning each part to the text to be displayed. The part of the code is as follows:
Control call:
Serial port initialization:
Character and clock control initialization:
Receive enable serial communication:
Big screen information:
3 Site display interface The interface display interface of the site is shown in Figure 3.
The interface contains: details of the game, level, round, time, score, athlete information, referee information, each small point and indicator light to meet the requirements of the competition.
4 Conclusion The design of the display system of the boxing competition site is introduced in detail, and the code of each link is shown. The simplicity and high efficiency of the VB language is particularly prominent. Through the introduction of single-machine dual-screen and the introduction of the dual-screen communication of the main-slave section serial communication, the dual-screen display is realized from different angles, and the system is applied at the national sports meeting.
Automotive Connectors,Automotive Connector,Cable Wire Connectors,Cable Wire Connector
YUEQING WEIMAI ELECTRONICS CO.,LTD , https://www.weimaicarconn.com