Analysis system and method for a light weapon barycenter measurement system
By designing a light weapon center of mass measurement system and utilizing the Modbus protocol and LabVIEW development environment, the problem of decreased shooting accuracy caused by center of mass deviation of light weapons was solved. The system achieves accurate calculation and display of the center of mass, thereby improving shooting efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-09
- Publication Date
- 2026-03-03
AI Technical Summary
In existing technologies, the center of gravity of small arms deviates after auxiliary equipment is installed, resulting in a decrease in shooting accuracy and efficiency, and there is a lack of effective center of gravity measurement systems and analysis methods.
A light weapon center of mass measurement system was designed, including modules for data reading, separation and format conversion, software zeroing and data display, center of mass calculation and data storage. Data processing and center of mass calculation are performed using the Modbus protocol and LabVIEW development environment.
It enables precise calculation, display, and storage of the center of gravity of light weapons, improving shooting accuracy and efficiency.
Smart Images

Figure CN115597774B_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of computer technology, and in particular to an analysis system and method for measuring the center of mass of a light weapon. Background Technology
[0002] Different auxiliary devices are required for firearms to improve combat efficiency in various combat missions and environments. The installation of these devices can cause a shift in the firearm's center of gravity, altering the forces exerted on the soldier's fingers, wrists, elbows, and shoulders, ultimately leading to a decrease in accuracy and firing efficiency. Therefore, center of gravity measurement is crucial in the design and use of small arms. Consequently, an analytical method for measuring the center of gravity of small arms is urgently needed. Summary of the Invention
[0003] The purpose of this invention is to provide an analysis system and method for measuring the center of mass of light weapons, aiming to solve the above-mentioned problems in the prior art.
[0004] This invention provides an analysis system for a light weapon center of mass measurement system, comprising:
[0005] The data reading module is used to read measurement data from multiple sensors uploaded by the inspection instrument;
[0006] The data separation and format conversion module is used to extract the data corresponding to each sensor based on the measurement data and convert the data into single-precision floating-point numbers;
[0007] The software zeroing and data display module is used to save the initial zero drift value of each sensor, and to perform software zeroing by subtracting the initial zero drift value from the real-time measurement value of the sensor. It also calls the data display module to display single-precision floating-point numbers and the center of gravity of the light weapon.
[0008] The center of mass calculation module is used to calculate the center of mass of the pallet and the auxiliary box based on the single-precision floating-point number, calculate the center of mass of the light weapon, and convert the coordinates of the center of mass of the main body.
[0009] The data storage module is used to store relevant data on the center of mass of the light weapon calculated by the center of mass calculation module.
[0010] This invention provides an analysis method for a light weapon center of gravity measurement system, used in the aforementioned analysis system for light weapon center of gravity measurement, the method specifically comprising:
[0011] The data reading module reads measurement data from multiple sensors uploaded by the inspection instrument.
[0012] The data separation and format conversion module extracts the data corresponding to each sensor based on the measurement data and converts the data into single-precision floating-point numbers.
[0013] The initial zero drift value of each sensor is saved through the software zeroing and data display module, and the initial zero drift value is subtracted from the real-time measurement value of the sensor for software zeroing.
[0014] The centroid calculation module calculates the centroid of the pallet and auxiliary box based on the single-precision floating-point number, calculates the centroid of the light weapon, and converts the coordinates of the body centroid.
[0015] The data storage module stores the relevant data of the center of mass of the light weapon calculated by the center of mass calculation module.
[0016] The software zeroing and data display module calls the data display module to display single-precision floating-point numbers and the center of mass of light weapons.
[0017] Using the embodiments of the present invention, the center of mass of light weapons can be accurately calculated, displayed, and saved. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in one or more embodiments of this specification or in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of the analysis system of the light weapon center of gravity measurement system according to an embodiment of the present invention;
[0020] Figure 2 This is a flowchart of the analysis system processing of the light weapon center of gravity measurement system according to an embodiment of the present invention;
[0021] Figure 3 This is a flowchart of a serial port acquisition program according to an embodiment of the present invention;
[0022] Figure 4 This is a flowchart of a data separation procedure according to an embodiment of the present invention;
[0023] Figure 5 This is a flowchart of the software zeroing and data display procedure according to an embodiment of the present invention;
[0024] Figure 6 This is a flowchart of the centroid calculation program for the pallet and auxiliary box according to an embodiment of the present invention;
[0025] Figure 7 This is a flowchart of the centroid calculation procedure according to an embodiment of the present invention;
[0026] Figure 8 This is a data storage program flowchart according to an embodiment of the present invention;
[0027] Figure 9 This is a schematic diagram of the program interface of the light weapon center of gravity measurement system according to an embodiment of the present invention;
[0028] Figure 10 This is a schematic diagram showing the center-of-gravity coordinates of a light weapon according to an embodiment of the present invention;
[0029] Figure 11 This is a flowchart of the analysis method for the light weapon center of mass measurement system according to an embodiment of the present invention. Detailed Implementation
[0030] To enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of this document.
[0031] System Implementation Examples
[0032] According to embodiments of the present invention, an analysis system for a light weapon center of mass measurement system is provided. Figure 1 This is a schematic diagram of the analysis system of the light weapon center of gravity measurement system according to an embodiment of the present invention, as shown below. Figure 1 As shown, the analysis system of the light weapon center of mass measurement system according to an embodiment of the present invention specifically includes:
[0033] The data reading module 10 is used to read measurement data from multiple sensors uploaded by the inspection instrument. Specifically, the data reading module 10 uses the Modbus protocol, obtains the serial port of the inspection instrument using VISA, configures the serial port parameters, uses the VISA write function to send a host request command to the inspection instrument, and reads the measurement data uploaded by the inspection instrument through the slave response command returned by the inspection instrument. The host request command specifically includes: the slave response command specifically includes: a two-bit inspection instrument address, a two-bit read / write function code, a four-bit register address for channel one, a four-bit number of registers to be read, and a four-bit parity check code; the slave response command specifically includes: four-bit identification data, multiple sensor data, and a parity check code, wherein each sensor data is 4 bytes long.
[0034] The data separation and format conversion module 12 is used to extract the data corresponding to each sensor according to the measurement data and convert the data into single-precision floating-point numbers. Specifically, the data separation and format conversion module 12 is used to: determine the position of each sensor in the measurement data, extract the data corresponding to each sensor according to the register address of the data of each sensor, and convert the read data into single-precision floating-point numbers.
[0035] The software zeroing and data display module 14 is used to save the initial zero drift value of each sensor, and to perform software zeroing by subtracting the initial zero drift value from the real-time measurement value of the sensor. It also calls the data display module to display single-precision floating-point numbers and the center of gravity of the light weapon.
[0036] The center of mass calculation module 16 is used to calculate the center of mass of the pallet and the auxiliary box based on the single-precision floating-point number, calculate the center of mass of the light weapon, and convert the coordinates of the body's center of mass; the center of mass calculation module 16 is specifically used for:
[0037] The auxiliary box is divided into a combination of a cuboid auxiliary box and a head mold, and the centroid coordinates x of the combination are calculated. c y c and z c Based on the fact that each sensor is on the same plane, the x and y centroid coordinates of the light weapon are obtained. The measurement surface of the auxiliary box is adjusted, and the z coordinate of the centroid is calculated based on the x and y centroid coordinates of the light weapon to finally obtain the centroid of the light weapon. The centroid coordinates of the light weapon are converted into the centroid coordinates of the main body by subtracting the centroid coordinates of the box from the coordinates of the light weapon reference point.
[0038] Data storage module 18 is used to store relevant data on the center of mass of the light weapon calculated by the center of mass calculation module. Specifically, data storage module 18 is used to: utilize LabVIEW's Write Delimited Spreadsheet function to store data on the light weapon number, the mass of the tray and auxiliary box, the center of mass of the tray and auxiliary box (X0), the center of mass of the tray and auxiliary box (Y0), the center of mass of the tray and auxiliary box (X1), the center of mass of the tray and auxiliary box (Y1), the mass of the light weapon, the center of mass of the light weapon (X), the center of mass of the light weapon (Y), the center of mass of the light weapon (Z), and the center of mass of the light weapon body (X). 本 Light weapons body mass Y 本 Light weapons body center of mass Z 本 Save as an Excel file.
[0039] The technical solutions of the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0040] LabVIEW is a programming development environment developed by National Instruments (NI). Similar to C and BASIC development environments, LabVIEW differs significantly from other computer languages in that it uses a graphical programming language (G) to generate code, producing block diagrams. LabVIEW software is the core of the NI design platform and is ideal for developing measurement or control systems. The LabVIEW development environment integrates all the tools engineers and scientists need to quickly build a wide range of applications, designed to help them solve problems, improve productivity, and innovate.
[0041] Like C and BASIC, LabVIEW is a general-purpose programming system with a vast function library capable of performing any programming task. LabVIEW's function library includes data acquisition, GPIB, serial port control, data analysis, data display, and data storage. LabVIEW also has traditional program debugging tools, such as setting breakpoints, displaying data and its subroutines (subVIs) results in animated fashion, single-step execution, etc., facilitating program debugging.
[0042] LabVIEW (Laboratory Virtual Instrument Engineering Workbench) is a graphical programming language that uses icons instead of lines of text to create applications. Traditional text-based programming languages determine the execution order of programs based on the sequence of statements and instructions, while LabVIEW uses a dataflow programming approach. The data flow between nodes in the block diagram determines the execution order of VIs and functions. VIs refer to virtual instruments, which are program modules in LabVIEW. LabVIEW provides many controls that resemble traditional instruments (such as oscilloscopes and multimeters) for easy creation of user interfaces. The user interface in LabVIEW is called the front panel. Using icons and connections, objects on the front panel can be controlled programmatically. This is the graphical source code, also known as G-code. LabVIEW's graphical source code is somewhat similar to a flowchart, and therefore is also called block diagram code.
[0043] Based on the above advantages, this research scheme selects LabVIEW to develop a program for reading and analyzing the data measured by various sensors uploaded by the inspection instrument. The data reading and analysis process is as follows: Figure 2 As shown.
[0044] Depend on Figure 2 The system for reading and analyzing the center of mass data of light weapons can be divided into the following six parts: 1. Data reading, 2. Data separation, 3. Data format conversion, 4. Software zeroing and data display, 5. Calculation of center of mass and moment of inertia, and 6. Data storage. Specifically:
[0045] 1. Data reading module:
[0046] To read the measurement data uploaded by the inspection instrument, the computer must understand the instrument's data transmission protocol. The Modbus protocol is a common language used in electronic controllers. Through this protocol, controllers can communicate with each other and with other devices via networks (such as Ethernet). It has become a universal industry standard. With it, control devices from different manufacturers can be connected to form an industrial network for centralized monitoring.
[0047] This protocol defines a message structure that a controller can recognize and use, regardless of the network over which they communicate. It describes the process by which a controller requests access to other devices, how to respond to requests from other devices, and how to detect and log errors. It establishes a common format for message field layout and content.
[0048] When communicating on a Modbus network, this protocol dictates that each controller must know its device address, recognize messages sent at that address, and determine what action to take. If a response is required, the controller generates feedback information and sends it using the Modbus protocol. On other networks, messages containing the Modbus protocol are converted into frame or packet structures used on that network. This conversion also extends the methods for handling node addresses, routing paths, and error detection based on the specific network.
[0049] a. Query
[0050] The function code in the query message tells the selected slave device what function to perform. The data segment contains any additional information about the function the slave device is to perform. For example, function code 03 requests the slave device to read holding registers and return their contents. The data segment must contain information to tell the slave device: which register to start reading from and the number of registers to read. The error detection field provides the slave device with a way to verify the correctness of the message content.
[0051] b. Response
[0052] If the device generates a normal response, the function code in the response message is the same as the function code in the query message. The data segment includes data collected from the device, such as register values or status. If an error occurs, the function code will be modified to indicate that the response message is erroneous, and the data segment contains codes describing this error information. The error detection field allows the master device to confirm whether the message content is valid.
[0053] c. Function codes
[0054] Different function codes correspond to different functions, as shown in Table 1.
[0055] Table 1, Function Codes
[0056] function code name effect 03 Read holding register Retrieve the current value from one or more holding registers. 04 Read input register Retrieve the current value from one or more input registers. 05 Preset single register Write data to a holding register
[0057] d. Command format
[0058] When the controller is configured to communicate in RTU (Remote Terminal Unit) mode on a Modbus network, each 8-bit byte in the message contains two 4-bit hexadecimal characters. The main advantage of this method is that it can transmit more data than ASCII at the same baud rate.
[0059] The code system is as follows:
[0060] 1. 8-bit binary, hexadecimal numbers 0...9, A...F;
[0061] 2. Each 8-bit field in the message consists of two hexadecimal characters forming the bits of each byte;
[0062] 3. One start bit;
[0063] 4. Of the 8 data bits, the least significant bit is sent first;
[0064] 5. No verification, then none;
[0065] 6. One stop bit;
[0066] 7. Error Detection Domain
[0067] 8. CRC (Cyclic Redundancy Detection)
[0068] e. Example of reading whole data using RTU method
[0069] Since the data collected by the inspection instrument is stored in the holding register, the 04 instruction set should be used to read the data, as shown in Tables 2 and 3.
[0070] Table 8, Host Requests
[0071]
[0072] Table 9, Slave Response
[0073] address function code byte count High byte of data Low byte of data CRC error check 01 04 2 41 24 XXXX
[0074] Based on the principles of the above communication commands, the host request command is 0104 0000 0008F1CC, where 01 is the address of the inspection device, 04 is the read / write function code, 0000 is the register address of channel one, 0008 is the number of registers to be read, and F1CC is the parity check code. The slave response command is 0104 + sensor 1 data + sensor 2 data + sensor 3 data + sensor 4 data + parity check code, with each sensor's data length being 4 bytes.
[0075] Since the inspection instrument connects to the computer via RS485 to USB, a serial port can be obtained using LabVIEW's VISA API. VISA is the standard I / O API for instrument programming, capable of controlling GPIB, serial, USB, Ethernet, PXI, or VXI instruments, and calling the appropriate driver based on the type of instrument used. Users do not need to learn the communication protocols of various instruments. VISA is independent of the operating system, bus, and programming environment; the same API is used regardless of the device, operating system, and programming language employed.
[0076] The serial port is acquired using VISA, and parameters such as serial port data bits, baud rate, timeout, terminator, stop bits, parity, and enable terminator are configured. Then, the VISA write function is used to send the master request command to the slave device. Finally, the validity of the command returned by the slave device is checked. The specific program design is as follows: Figure 3 As shown.
[0077] 2. Data separation and format conversion
[0078] Because the received data format is: 0104 + sensor 1 data + sensor 2 data + sensor 3 data + sensor 4 data + parity check, and each sensor data occupies 4 bytes, the data for sensor 1 corresponds to bytes 3 to 6, the data for sensor 2 corresponds to bytes 7 to 10, the data for sensor 3 corresponds to bytes 11 to 14, and the data for sensor 4 corresponds to bytes 15 to 18. Based on the register address of the character data, the data corresponding to each sensor is extracted, and the read string is converted into a single-precision floating-point number. Data separation and format conversion are as follows: Figure 4 As shown.
[0079] 3. Software zeroing and data display
[0080] The zero point of a load cell is easily affected by environmental factors, causing zero-point drift. To ensure the initial zero point, a software zeroing method is used. The idea is to save the initial zero-drift value of the sensor and then subtract this value from the real-time measurement value, thus achieving software zeroing. Data display directly calls the data display module. The software zeroing and data display correction procedures are as follows: Figure 5 As shown.
[0081] 4. Centroid Calculation
[0082] The calculation of the center of mass involves the pallet and auxiliary housing, as well as the light weapon being tested.
[0083] a. Calculation of the center of gravity of the pallet and auxiliary box
[0084] The auxiliary box includes a cuboid auxiliary box and a head model. The centroid coordinates (x) of the assembled body are calculated. c y c and z c This prepares for subsequent calculations of the center of gravity of small arms. For the convenience of z c The calculation simply requires rotating the box along the x-axis and z-axis, transforming x into z' and z into x', and then calculating x according to the formula. c The method to calculate z c The flowchart is as follows: Figure 6 As shown.
[0085] b. Calculation of the center of gravity of small arms
[0086] The center of mass of a small arms includes coordinates in the x, y, and z directions. When four sensors are on the same plane, the x and y coordinates of the center of mass can be obtained and the relevant data saved for calculating the z-coordinate of the center of mass. The measurement surface of the auxiliary housing is adjusted to calculate the z-coordinate of the center of mass. The procedure for calculating the center of mass coordinates is as follows: Figure 7 As shown.
[0087] 5. Transformation of the body's centroid coordinates
[0088] The coordinate transformation of the body's center of mass can be achieved by subtracting the coordinates of the box's center of mass from the coordinates of the light weapon's reference point. After the coordinate transformation, the position of the center of mass can be viewed in a three-dimensional or two-dimensional coordinate system.
[0089] 6. Data storage
[0090] To facilitate subsequent data processing, the measured coordinates of the light weapon's center of gravity need to be stored. Using LabVIEW's WriteDelimited Spreadsheet function, the following data are saved as an Excel file: light weapon number, mass of the tray and auxiliary box, center of gravity X0 of the tray and auxiliary box, center of gravity Y0 of the tray and auxiliary box, center of gravity X1 (center of gravity Z) of the tray and auxiliary box, center of gravity Y1 of the tray and auxiliary box, light weapon mass, center of gravity X of the light weapon, center of gravity Y of the light weapon, center of gravity Z of the light weapon, center of gravity X of the light weapon body, center of gravity Y of the light weapon body, and center of gravity Z of the light weapon body. Figure 8 As shown.
[0091] 7. Program Interface
[0092] The program interface consists of five functional modules: sensor measurement values, function selection, calculation of tray and auxiliary box parameters, calculation of light weapon center of gravity, and display of light weapon center of gravity coordinates. The final program interface is as follows: Figure 9 As shown.
[0093] a. Function Selection Module
[0094] Users can select the serial port to control data acquisition, system calibration, input light weapon numbers, display communication status, and save data.
[0095] b. Sensor measurement module
[0096] This module displays the real-time readings of four sensors as well as the readings after software zeroing, and also displays the sum of the sensor readings and the weight of the light weapon.
[0097] c. Pallet and Auxiliary Box Parameter Calculation Module
[0098] This module is used to calculate the mass and center of mass parameters of the toddler and auxiliary box. The "Parameter 0" button is used to calculate the center of mass coordinates X0 (X) and Y0 (Y) of the above combination, and the "Parameter 1" button is used to calculate the center of mass Y1 (Z).
[0099] d. Center of mass calculation for small arms
[0100] Users can calculate the center of gravity of the light weapon by controlling the calculation button, and convert the coordinates of the light weapon body by inputting a reference point. The default input value is (0, 0, 0).
[0101] e. Light Weapon Coordinate Display
[0102] This module can display the coordinate position of light weapons in three-dimensional space, and the position of the center of mass in the xy and xz two-dimensional coordinate systems, respectively. Figure 10 As shown.
[0103] Method Implementation Examples
[0104] According to embodiments of the present invention, an analysis method for a light weapon center of gravity measurement system is provided, which is used in the analysis system for the aforementioned light weapon center of gravity measurement system. Figure 11 This is a flowchart of the analysis method for the light weapon center of gravity measurement system according to an embodiment of the present invention, such as... Figure 11 As shown, the analysis method of the light weapon center of gravity measurement system according to an embodiment of the present invention specifically includes:
[0105] Step 1101: Read the measurement data from multiple sensors uploaded by the inspection instrument through the data reading module. Specifically, using the Modbus protocol, the serial port of the inspection instrument is obtained using VISA, and the serial port parameters are configured. Using the VISA write function, the host request command is sent to the inspection instrument. The measurement data uploaded by the inspection instrument is read through the slave response command returned by the inspection instrument. The host request command specifically includes: the slave response command specifically includes: a two-bit inspection instrument address, a two-bit read / write function code, a four-bit register address of channel one, a four-bit number of registers to be read, and a four-bit parity check code; the slave response command specifically includes: four-bit identification data, multiple sensor data, and a parity check code, wherein the length of each sensor data is 4 bytes.
[0106] Step 1102: Through the data separation and format conversion module, extract the data corresponding to each sensor according to the measurement data, and convert the data into single-precision floating-point numbers; specifically, determine the position of each sensor in the measurement data, extract the data corresponding to each sensor according to the register address of the data of each sensor, and convert the read data into single-precision floating-point numbers.
[0107] Step 1103: Save the initial zero drift value of each sensor through the software zeroing and data display module, and perform software zeroing by subtracting the initial zero drift value from the real-time measurement value of the sensor.
[0108] Step 1104: The centroid calculation module calculates the centroids of the pallet and auxiliary box based on the single-precision floating-point numbers, calculates the centroid of the light weapon, and converts the body's centroid coordinates. Specifically, the auxiliary box is divided into a combination of a cuboid auxiliary box and a head mold, and the centroid coordinates x of the combination are calculated. c y c and z c Based on the fact that each sensor is on the same plane, the x and y centroid coordinates of the light weapon are obtained. The measurement surface of the auxiliary box is adjusted, and the z coordinate of the centroid is calculated based on the x and y centroid coordinates of the light weapon to finally obtain the centroid of the light weapon. The centroid coordinates of the light weapon are converted into the centroid coordinates of the main body by subtracting the centroid coordinates of the box from the coordinates of the light weapon reference point.
[0109] Step 1105: Save the relevant data of the light weapon's center of mass calculated by the center of mass calculation module through the data storage module; specifically, use LabVIEW's Write Delimited Spreadsheet function to save the data of the light weapon number, the mass of the tray and auxiliary box, the center of mass of the tray and auxiliary box X0, the center of mass of the tray and auxiliary box Y0, the center of mass of the tray and auxiliary box X1, the center of mass of the tray and auxiliary box Y1, the mass of the light weapon, the center of mass of the light weapon X, the center of mass of the light weapon Y, the center of mass of the light weapon Z, and the center of mass of the light weapon body X. 本Light weapons body mass Y 本 Light weapons body center of mass Z 本 Save as an Excel file.
[0110] Step 1106: The software zeroing and data display module calls the data display module to display single-precision floating-point numbers and the center of mass of the light weapon.
[0111] The embodiments of the present invention are method embodiments corresponding to the system embodiments described above. The specific operations of each step can be understood by referring to the description of the system embodiments, and will not be repeated here.
[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. An analysis system for a light weapon center of mass measurement system, characterized in that, include: The data reading module is used to read measurement data from multiple sensors uploaded by the inspection instrument; The data separation and format conversion module is used to extract the data corresponding to each sensor based on the measurement data and convert the data into single-precision floating-point numbers; The software zeroing and data display module is used to save the initial zero drift value of each sensor, and to perform software zeroing by subtracting the initial zero drift value from the real-time measurement value of the sensor. It also calls the data display module to display single-precision floating-point numbers and the center of gravity of the light weapon. The center of mass calculation module is used to calculate the center of mass of the pallet and auxiliary box based on the single-precision floating-point number, calculate the center of mass of the light weapon, and convert the coordinates of the body's center of mass. Specifically, the center of mass calculation module is used to: divide the auxiliary box into a combination of a cuboid auxiliary box and a headform, and calculate the x-coordinates of the center of mass of the combination. c y c and z c Based on the x and y coordinates of the light weapon's center of mass obtained from the fact that each sensor is on the same plane, the measurement surface of the auxiliary box is adjusted, and the z coordinate of the center of mass is calculated based on the x and y coordinates of the light weapon's center of mass before and after adjustment, and finally the coordinates of the light weapon's center of mass are obtained; the coordinates of the light weapon's center of mass are converted into the coordinates of the main body's center of mass by subtracting the coordinates of the center of mass of the assembly from the coordinates of the light weapon's center of mass. The data storage module is used to store relevant data on the center of mass of the light weapon calculated by the center of mass calculation module.
2. The system according to claim 1, characterized in that, The data reading module is specifically used to: use the Modbus protocol, obtain the serial port of the inspection instrument using VISA, configure the serial port parameters, use the VISA write function to send the host request command to the inspection instrument, and read the measurement data uploaded by the inspection instrument through the slave response command returned by the inspection instrument. The host request command specifically includes: the slave response command specifically includes: a two-bit inspection instrument address, a two-bit read / write function code, a four-bit register address of channel one, a four-bit number of registers to be read, and a four-bit parity check code; the slave response command specifically includes: four-bit identification data, multiple sensor data, and a parity check code, wherein the length of each sensor data is 4 bytes.
3. The system according to claim 1, characterized in that, The data separation and format conversion module is specifically used to: determine the position of each sensor in the measurement data, extract the data corresponding to each sensor according to the register address of each sensor's data, and convert the read data into single-precision floating-point numbers.
4. The system according to claim 1, characterized in that, The data storage module is specifically used to: utilize LabVIEW's Write Delimited Spreadsheet function to store the following data: light weapon number, mass of the pallet and auxiliary box, X0 coordinate of the center of mass of the front pallet and auxiliary box, Y0 coordinate of the center of mass of the front pallet and auxiliary box, X1 coordinate of the center of mass of the rear pallet and auxiliary box, Y1 coordinate of the center of mass of the rear pallet and auxiliary box, mass of the light weapon, center of mass of the light weapon X, center of mass of the light weapon Y, center of mass of the light weapon Z, and center of mass of the light weapon body X. 本 Light weapons body mass Y 本 Light weapons body center of mass Z 本 Save as an Excel file.
5. An analytical method for a light weapon center of mass measurement system, characterized in that, The analytical system for measuring the center of gravity of a light weapon as described in any one of claims 1 to 4, wherein the method specifically includes: The data reading module reads measurement data from multiple sensors uploaded by the inspection instrument. The data separation and format conversion module extracts the data corresponding to each sensor based on the measurement data and converts the data into single-precision floating-point numbers. The initial zero drift value of each sensor is saved through the software zeroing and data display module, and the initial zero drift value is subtracted from the real-time measurement value of the sensor for software zeroing. The centroid calculation module calculates the centroids of the pallet and auxiliary box based on the single-precision floating-point numbers, calculates the centroid of the light weapon, and performs a coordinate transformation of the main body's centroid. Specifically, this includes: The auxiliary box is divided into a combination of a cuboid auxiliary box and a head mold, and the centroid coordinates x of the combination are calculated. c y c and z c Based on the x and y coordinates of the light weapon's center of mass obtained from the fact that each sensor is on the same plane, the measurement surface of the auxiliary box is adjusted, and the z coordinate of the center of mass is calculated based on the x and y coordinates of the light weapon's center of mass before and after adjustment, and finally the coordinates of the light weapon's center of mass are obtained; the coordinates of the light weapon's center of mass are converted into the coordinates of the main body's center of mass by subtracting the coordinates of the center of mass of the assembly from the coordinates of the light weapon's center of mass. The data storage module stores the relevant data of the center of mass of the light weapon calculated by the center of mass calculation module. The software zeroing and data display module calls the data display module to display single-precision floating-point numbers and the center of mass of light weapons.
6. The method according to claim 5, characterized in that, The process of reading measurement data from multiple sensors uploaded by the inspection device via the data reading module specifically includes: The Modbus protocol is adopted, and the serial port of the inspection instrument is obtained through VISA. The serial port parameters are configured, and the host request command is sent to the inspection instrument using the VISA write function. The measurement data uploaded by the inspection instrument is read through the slave response command returned by the inspection instrument. The host request command specifically includes: the slave response command includes: a two-bit inspection instrument address, a two-bit read / write function code, a four-bit register address of channel one, a four-bit number of registers to be read, and a four-bit parity check code; the slave response command includes: four-bit identification data, multiple sensor data, and a parity check code, wherein the length of each sensor data is 4 bytes.
7. The method according to claim 5, characterized in that, The step of extracting data corresponding to each sensor from the measurement data through the data separation and format conversion module, and converting the data into single-precision floating-point numbers, specifically includes: Determine the position of each sensor in the measurement data, extract the data corresponding to each sensor according to the register address of each sensor's data, and convert the read data into single-precision floating-point numbers.
8. The method according to claim 5, characterized in that, The specific steps of storing the relevant data of the center of mass of the light weapon calculated by the center of mass calculation module through the data storage module include: Using LabVIEW's Write Delimited Spreadsheet function, the following coordinates were used: small arms number, mass of the trailer and auxiliary box, X0 coordinate of the center of mass of the trailer and auxiliary box before adjustment, Y0 coordinate of the center of mass of the trailer and auxiliary box before adjustment, X1 coordinate of the center of mass of the rear trailer and auxiliary box after adjustment, Y1 coordinate of the center of mass of the rear trailer and auxiliary box after adjustment, small arms mass, center of mass of the small arms X, center of mass of the small arms Y, center of mass of the small arms Z, and center of mass of the small arms body X. 本 Light weapons body mass Y 本 Light weapons body center of mass Z 本 Save as an Excel file.
Citation Information
Patent Citations
Firearm-mounted multi-dimensional sensing assembly and firearm state automatic identification system and method
CN109883260A
Portable precise guidance ammunition centroid measurement tool and system
CN112747860A