Method and device for acquiring multi-point state, electronic equipment and medium
Through the multi-point state acquisition method of dividing point sequences and binary conversion, the problem of high communication frequency, limited delay and scalability in traditional I/O modules in industrial automation systems is solved, efficient and accurate point state acquisition is achieved, and the system's response efficiency and reliability are improved.
Patent Information
- Application Number
- CN202510447307.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-25
AI Technical Summary
Traditional I/O modules have problems such as high communication frequency and delay, limited scalability, manual calibration requirements, reliability risks and human errors in industrial automation systems, resulting in inefficient system response and difficulty in ensuring stability.
By dividing and binary conversion of point-point sequences, the multi-point state acquisition method is adopted, and the IO expansion module card is used to obtain point-point states, reducing the number of communications, and using discontinuous point calibration, simplifying the code and improving calibration efficiency.
It improves the accuracy and response efficiency of point state acquisition, reduces communication and code complexity, enhances the flexibility and reliability of the system, and reduces the risk of human error.
Smart Images

Figure CN120378450A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and more particularly, to a method, apparatus, electronic device, and medium for obtaining multi-point statuses. Background Art
[0002] In the field of industrial automation, input / output (I / O) modules are key components connecting field devices and control systems. These modules are responsible for collecting sensor data and controlling the actions of actuators, thereby enabling the monitoring and management of the production process. However, with the continuous increase in the complexity of automation systems, the traditional application methods of I / O modules have gradually revealed some technical limitations. In traditional methods, the status information of each point needs to be transmitted separately through a communication network, which leads to frequent data exchange requirements. For large industrial systems, this means that a large number of communication requests need to be processed, increasing the overall communication burden of the system and potentially resulting in a relatively high latency. High latency not only affects the speed of obtaining real-time data but also may reduce the response efficiency of the entire system, especially when quick decisions are required in emergency situations. Summary of the Invention
[0003] The purpose of the embodiments of the present application is to provide a method, apparatus, electronic device, and medium for obtaining multi-point statuses, which can solve the above problems existing in the prior art and improve the response efficiency while obtaining accurate point statuses.
[0004] In a first aspect, a method for obtaining multi-point statuses is provided, which may include:
[0005] Dividing multiple points in a point sequence to be processed to obtain multiple point bytes and corresponding byte orders;
[0006] For any point byte, performing binary conversion on the configuration statuses of each point in the point byte to obtain multiple point characters in the point byte;
[0007] Performing sorting processing on the byte orders of each point byte and the character orders of the multiple point characters corresponding to the respective points to obtain the target byte order of the multiple point bytes and the target character order of each point character in the corresponding point byte;
[0008] Determining a target point sequence based on the target character order and the target byte order;
[0009] Based on the target point sequence, obtaining the target point statuses of each point in a Gu Gao motion board card configured with an I / O expansion module card.
[0010] In a possible implementation, sorting processes are respectively performed on the byte order of each point byte and the character order of multiple point characters corresponding to the respective points, to obtain the target byte order of multiple point bytes and the target character order of each point character in the corresponding point byte, including:
[0011] Analyzing the arrangement order of the point characters of each point and the arrangement order of each point byte, to obtain multiple byte orders and multiple character orders;
[0012] Based on the point status configured for each point, determining the target sub-order and the target group order among multiple sub-orders and multiple group orders.
[0013] In a possible implementation, dividing multiple points in the point sequence to obtain multiple point bytes, including:
[0014] Dividing multiple points in the point sequence according to the byte rule, to obtain at least two point bytes.
[0015] In a possible implementation, after dividing multiple points in the point sequence to be processed to obtain multiple point bytes and the corresponding byte order, the method further includes:
[0016] Selecting multiple non-consecutive target points from multiple points; the multiple target points cover each point byte;
[0017] Configuring the point status of each target point to 1;
[0018] Configuring the point status of other points except the multiple target points to 0.
[0019] In a possible implementation, after obtaining the target byte order and the target character order, the method further includes:
[0020] Selecting multiple non-consecutive test points from multiple points; the multiple test points cover each point byte;
[0021] Based on the target byte order and the target character order, obtaining the current point status of each point in the target point sequence;
[0022] Based on the point identifier of the test point, determining the test point status among multiple current point statuses;
[0023] If the test point status is consistent with the configured point status, execute the step: based on the target character order and the target byte order, determining the target point sequence.
[0024] In a possible implementation, the points include input points and output points.
[0025] In a possible implementation, based on the target point sequence, obtaining the target point status of each point includes:
[0026] Based on the configured real-time refresh function, refreshing the point status of each point in the target point sequence at a preset time interval to obtain the refreshed point status;
[0027] Based on the configured point status function, extracting the refreshed point status to obtain the target point status.
[0028] In a second aspect, there is provided an apparatus for obtaining multi-point status, which is applied to a host computer connected to an industrial control computer; an I / O expansion module card is configured in the industrial control computer in a Googol motion control card, and the apparatus may include:
[0029] A dividing unit, configured to divide multiple points in the point sequence to be processed to obtain multiple point bytes and corresponding byte orders;
[0030] A conversion unit, configured to perform binary conversion on the configuration status of each point in any point byte to obtain multiple point characters in the point byte;
[0031] A processing unit, configured to perform sorting processing on the byte order of each point byte and the character order of multiple point characters corresponding to the corresponding points respectively to obtain the target byte order of multiple point bytes and the target character order of each point character in the corresponding point byte;
[0032] A determining unit, configured to determine a target point sequence based on the target character order and the target byte order;
[0033] An obtaining unit, configured to obtain the target point status of each point in a Googol motion control card configured with an I / O expansion module card based on the target point sequence.
[0034] In a third aspect, there is provided an electronic device, which includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus;
[0035] The memory is used to store a computer program;
[0036] The processor, when executing the program stored on the memory, implements any of the method steps in the first aspect described above.
[0037] In a fourth aspect, there is provided a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, it implements any of the method steps in the first aspect described above.
[0038] The present application provides a method for obtaining multi-point status. The method includes: dividing multiple points in a point sequence to be processed to obtain multiple point bytes and corresponding byte orders; for any point byte, performing binary conversion on the configuration status of each point in the point byte to obtain multiple point characters in the point byte; respectively sorting the byte order of each point byte and the character order of the multiple point characters corresponding to the respective points to obtain the target byte order of the multiple point bytes and the target character order of each point character in the corresponding point byte; determining a target point sequence based on the target character order and the target byte order; and obtaining the target point status of each point in a Googol motion board card configured with an IO expansion module card based on the target point sequence. The present application can improve the efficiency and accuracy of point calibration, and at the same time reduce communication and code complexity. It is particularly suitable for scenarios that require large-scale and high-frequency reading of point status, providing new ideas and solutions for technological research and development in the field of industrial automation. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required to be used in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative efforts.
[0040] Figure 1 System architecture diagram for a method for obtaining multi-point status provided by an embodiment of the present application;
[0041] Figure 2 Flow schematic diagram of a method for obtaining multi-point status provided by an embodiment of the present application;
[0042] Figure 3 Schematic diagram of the IO interface provided by an embodiment of the present application;
[0043] Figure 4 Structural schematic diagram of an apparatus for obtaining multi-point status provided by an embodiment of the present application;
[0044] Figure 5 Structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0046] A method for obtaining multi-point status provided by an embodiment of the present application can be applied in Figure 1 the system architecture shown in Figure 1 As shown, the system may include: an industrial control computer and a host computer; among them, the industrial control computer is configured with a Googol motion board card including an IO expansion module card. Among them, the hardware connection: the industrial control computer is connected to the Googol motion board card, multiple IO expansion module cards are connected to the Googol motion board card, and each IO expansion module card is connected to the IO input / output points in the electrical connection order. Communication connection: The host computer software has installed the Googol motion board card driver and can communicate with the IO expansion module of the lower computer through the Googol motion board card, and has instruction functions for single-point control of IO and byte-by-byte control of IO.
[0047] In the field of industrial automation, input / output (I / O) modules are key components connecting field devices and control systems. These modules are responsible for collecting sensor data and controlling the actions of actuators, thereby realizing the monitoring and management of the production process. However, with the continuous improvement of the complexity of automation systems, some technical limitations have gradually emerged in the application methods of traditional I / O modules, as follows:
[0048] 1. High communication frequency and latency issues
[0049] In traditional methods, the status information of each point needs to be transmitted separately through the communication network, which leads to frequent data exchange requirements. For large industrial systems, this means that a large number of communication requests need to be processed, increasing the overall communication burden of the system and possibly resulting in a high latency time. High latency not only affects the speed of obtaining real-time data but also may reduce the response efficiency of the entire system, especially when quick decisions are needed in emergency situations.
[0050] 2. Limited scalability and manual calibration requirements
[0051] Whenever a new I / O module is added or an existing module is replaced, manual intervention is usually required for reconfiguration and calibration. This method greatly limits the scalability and flexibility of the system. In the face of rapidly changing market demands, this manual-dependent method obviously cannot meet the requirements of rapid deployment and adjustment, and at the same time increases the maintenance cost and technical difficulty.
[0052] 3. Reliability risks and human errors
[0053] Due to the large amount of manual configuration work involved, human errors are extremely likely to occur during the actual operation process. These errors may lead to chaos in the control logic and even cause the entire system to operate unstably. Especially in a complex and changeable industrial environment, ensuring that every detail is accurate is a very challenging task. In addition, human factors also make it difficult to effectively guarantee the consistency and stability of the system.
[0054] In summary, in order to overcome the above technical drawbacks and improve the performance, reliability, and scalability of the automation system, there is an urgent need for a more efficient, flexible, and reliable solution. This solution should be able to reduce unnecessary communication times to reduce latency, provide the ability to easily expand without manual intervention, and minimize the risks brought by human errors, thereby ensuring the stable operation and efficient management of the industrial automation system.
[0055] Therefore, this application provides a method for obtaining multi-point statuses to solve the above problems existing in the prior art, and can improve the response efficiency while obtaining accurate point statuses.
[0056] The preferred embodiments of this application are described below in conjunction with the accompanying drawings of the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain this application and are not used to limit this application. And without conflict, the embodiments in this application and the features in the embodiments can be combined with each other.
[0057] Figure 2 It is a schematic flowchart of a method for obtaining multi-point statuses provided by an embodiment of this application. As Figure 2 shown, this method may include:
[0058] Step S210: Calibrate the point sequence to be processed to obtain a target point sequence.
[0059] Specifically, divide the multiple points in the point sequence to be processed to obtain multiple point bytes and the corresponding byte order; among them, divide the multiple points in the point sequence according to the byte rule to obtain at least two point bytes. Taking an IO control card (the IO control card is configured in the upper computer and communicates with the IO expansion module card) as an example, it has 16 points. Divide them according to every 8 points to obtain 2 point bytes.
[0060] After that, multiple non - consecutive target points are selected from multiple points; the multiple target points cover all point bytes; this step can be understood as follows: taking an IO control card (the IO control card is configured in the upper computer and communicates with the IO expansion module card) as an example, which has 16 points; In0 to In15, where In0 to In7 are byte 0, and In8 to In15 are byte 1; select 3 non - consecutive input or output points (the point interval ≥ 3 physical points, such as In2, In7, In12; covering the boundaries of at least two bytes, such as In7 is at bit7 of the first byte and In12 is at bit4 of the second byte), and by controlling the input or output points of the lower computer, make the point states of the above 3 points be 1 and the point states of the remaining points be 0. The accuracy of the test point state setting can be ensured by observing the point states of the current IO expansion module card on the upper computer IO interface.
[0061] Select non - consecutive input or output points on the IO control card (such as In2, In7, In12), and ensure that the interval between these points is at least 3 physical points and covers the boundaries of at least two bytes. The advantages of this approach are as follows: 1. Improve system reliability and disperse risks: By selecting non - consecutive points, the risk of the entire system failing due to a failure in a certain area can be reduced. If all key points are concentrated in a certain area, any problem in that area will directly affect multiple functions. 2. Enhance diagnostic capabilities and locate faults: When the system has problems, the fault location can be more accurately located by checking specific points in different bytes. Since points spanning byte boundaries are selected, this helps to identify whether it is a hardware problem or a software configuration problem. 3. Improve flexibility and scalability and optimize resource utilization: This method allows for more flexible use of available resources, avoids over - reliance on a specific area, and makes the system design more balanced. Future expansion consideration: Considering possible future expansion, this method leaves room for adding more devices or functions in the future and will not limit subsequent development due to a compact initial layout. 4. Improve signal integrity and reduce interference: By maintaining the physical distance between points, the mutual interference between signals can be effectively reduced, especially in high - frequency applications, which is crucial for ensuring the accuracy and stability of data transmission. 5. Strengthen test verification and comprehensive testing: Such a point - selection method can ensure that different bytes and areas are covered during system testing, thus providing a more comprehensive test plan and helping to discover hidden problems.
[0062] The method of selecting target points can distinguish between byte 0 and byte 1. Currently, without the need to identify the bytes, the corresponding bytes can be determined by the characters in the bytes. By looking at specific positions in the data or based on certain characteristic characters contained therein, this byte 0 or byte 1 can be identified. This method simplifies the data identification process without the need to add additional marks or explanations to each byte, because the identity (0 or 1) of each byte can be directly determined according to its inherent characteristics. This can improve efficiency and reduce the complexity and errors that may be introduced by adding additional identifications.
[0063] Furthermore, in combination with Figure 3 As shown, the IO interface displays the status of 16-bit input points and 16-bit output points. The page number of each page corresponds to an IO control card. The order of the displayed points is consistent with the hardware connection order of the expansion module card. After switching the page, the input and output IO point status of the corresponding page (IO control card) is refreshed, and only the input and output point status of the current page (IO control card) is displayed. The input points cannot be clicked, and the output points can be clicked to control the output IO status.
[0064] Configure the point status of each target point to 1;
[0065] Configure the point status of other points except for multiple target points to 0.
[0066] In another embodiment, points can be selected based on physical layout optimization to ensure the shortest signal transmission path, reduce wiring complexity, and potential electromagnetic interference.
[0067] After that, the host computer reads the point status by byte: Specifically, the host computer software calls the function of reading the point status by byte and reads two bytes at a time, a total of 16-bit input point status.
[0068] For any point byte, perform binary conversion on the configuration status of each point in the point byte to obtain multiple point characters in the point byte. Specifically, convert the obtained byte 0 and byte 1 into 8-bit binary data respectively, such as: 00100001 and 00001000.
[0069] Sort the byte order of each point byte and the character order of multiple point characters corresponding to the respective points separately to obtain the target byte order of multiple point bytes and the target character order of each point character in the corresponding point byte; specifically, by adjusting the connection order of byte 0 and byte 1 (i.e., byte 0 is in the high 8 bits and byte 1 is in the low 8 bits / byte 1 is in the high 8 bits and byte 0 is in the low 8 bits, e.g., for 0000100000100001, byte 1 is in the high 8 bits and byte 0 is in the low 8 bits) and the head-tail order of the bits in byte 0 / byte 1 (i.e., whether the 0th bit or the 7th bit in byte 0 / byte 1 is in the front, e.g., for 00010000 10000100, byte 1 adjusts the head-tail order and byte 0 adjusts the head-tail order), the 16-bit IO point status parsed is made consistent with the lower computer status.
[0070] That is to say, two bytes of data are read from the lower computer: byte 0 = 00100001; byte 1 = 00001000;
[0071] At the same time, observe that the input point status displayed on the upper computer IO interface is: the point statuses of In2, In7, and In12 are "1", and the rest are "0". According to the point selection rules, these three points respectively correspond to certain specific positions in the binary. For example:
[0072] In2 corresponds to the 2nd bit (counting from right to left, the lowest bit is the 0th bit). In7 corresponds to the 7th bit. In12 corresponds to the 12th bit.
[0073] First, adjust the byte order: When combining byte 0 and byte 1 into a 16-bit binary number, there may be two orders:
[0074] One, byte 0 is in the high 8 bits and byte 1 is in the low 8 bits: 00100001 00001000;
[0075] Two, byte 1 is in the high 8 bits and byte 0 is in the low 8 bits: 00001000 00100001;
[0076] By comparing and observing the status of the upper computer IO interface, determine which order is correct. If the status displayed on the interface is consistent with 00001000 00100001, then select the second order.
[0077] After that, adjust the bit order:
[0078] To make the byte order correct, the bit order within each byte may also need to be adjusted. For example:
[0079] The original byte 0 = 00100001, but if the actual order returned by the lower computer is from the high bit to the low bit (i.e., the 7th bit is in the front), then it needs to be reversed to 10000100.
[0080] Similarly, byte 1 = 00001000 may need to be adjusted to 00000010.
[0081] By obtaining the status of the host computer IO interface again, confirm whether the adjusted bit order is correct. If correct, determine the target point position sequence based on the target character order and the target byte order.
[0082] In another embodiment, after obtaining the target byte order and the target character order, the method may further include:
[0083] Select multiple non - consecutive test point positions from multiple point positions; the multiple test point positions cover all point position bytes; arbitrarily select any other 3 non - consecutive test point positions of the current IO control card.
[0084] Based on the target byte order and the target character order, obtain the current point position status of each point position in the target point position sequence; view the point position status of the test point positions through the IO display interface: call the function of reading the point position status by byte to read the current point position status of the corresponding multiple point positions in the current 2 bytes;
[0085] Based on the point position identifier of the test point position, determine the test point position status among multiple current point position statuses;
[0086] If the test point position status is consistent with the configured point position status, execute the step: determine the target point position sequence based on the target character order and the target byte order.
[0087] In another embodiment, the currently parsed target point position sequence can be applied to the parsing function of the IO control card corresponding to all IO expansion boards that are the same as the current IO expansion board.
[0088] Step S220, based on the target point position sequence, obtain the target point position status of each point position in the Gu Gao motion board card configured with the IO expansion module card.
[0089] Specifically, based on the configured real - time refresh function, refresh the point position status of each point position in the target point position sequence at a preset time interval to obtain the refreshed point position status;
[0090] Based on the configured point position status function, extract the refreshed point position status to obtain the target point position status.
[0091] In some embodiments, the position of each point position in the corresponding byte can be marked to obtain the target point position status of multiple point positions (not the target point position status of all point positions) according to the mark. Specifically, first, determine the specific position of each point position in 2 bytes (16 bits). For example, if you have 8 digital input point positions, they may be distributed from bit 0 to bit 7.
[0092] The present application provides a method for obtaining the state of multiple points, the method comprising: dividing multiple points in a point sequence to be processed to obtain multiple point bytes and corresponding byte orders; for any point byte, performing binary conversion on the configuration state of each point in the point byte to obtain multiple point characters in the point byte; sorting the byte order of each point byte and the character order of multiple point characters corresponding to the corresponding point, respectively, to obtain the target byte order of multiple point bytes and the target character order of each point character in the corresponding point byte; based on the target character order and the target byte order, determining the target point sequence; based on the target point sequence, obtaining the target point state of each point in the Googol motion board configured with an IO expansion module card. The present application reads the point state of two bytes in batches, replacing the traditional bit-by-bit reading, which can reduce the number of communications, reduce the complexity of the code, and simplify the code; calibrating an IO expansion module card can be applied to the same type of IO expansion module card, without the need to calibrate each card once, thereby improving the calibration efficiency; using 3 discontinuous point calibration, the accuracy is higher and the efficiency is higher (only one calibration and one verification are required). In summary, this application improves the efficiency and accuracy of point calibration, while reducing the complexity of communication and code. It is particularly suitable for scenarios that require large-scale and high-frequency reading of point status, and provides new ideas and solutions for technical research and development in the field of industrial automation.
[0093] Corresponding to the above method, the embodiment of the present application also provides a device for obtaining a multi-point position state, such as Figure 4 As shown, the device comprises:
[0094] A division unit 410 is used to divide a plurality of points in the point sequence to be processed to obtain a plurality of point bytes and corresponding byte sequences;
[0095] The conversion unit 420 is used for performing binary conversion on the configuration state of each point in any point byte to obtain a plurality of point characters in the point byte;
[0096] The processing unit 430 is used to sort the byte order of each point position byte and the character order of multiple point position characters corresponding to the corresponding point position, so as to obtain the target byte order of the multiple point position bytes and the target character order of each point position character in the corresponding point position byte;
[0097] A determination unit 440 determines a target point sequence based on the target character sequence and the target byte sequence;
[0098] The acquisition unit 450 acquires the target point status of each point in the Googol motion board configured with the IO expansion module card based on the target point sequence.
[0099] The functions of the functional units of a multi-point state acquisition device provided in the above embodiments of the present application can be implemented by the above method steps. Therefore, the specific working processes and beneficial effects of each unit in the multi-point state acquisition device provided in the embodiments of the present application will not be repeated here.
[0100] The embodiments of the present application also provide an electronic device, as Figure 5 shown, including a processor 510, a communication interface 520, a memory 530, and a communication bus 540. Among them, the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540.
[0101] The memory 530 is used to store computer programs;
[0102] When the processor 510 is used to execute the program stored on the memory 530, the following steps are implemented:
[0103] Divide multiple points in the point sequence to be processed to obtain multiple point bytes and the corresponding byte order;
[0104] For any point byte, perform binary conversion on the configuration states of the points in the point byte to obtain multiple point characters in the point byte;
[0105] Perform sorting processing on the byte order of each point byte and the character order of the multiple point characters corresponding to the corresponding points respectively to obtain the target byte order of the multiple point bytes and the target character order of the point characters in the corresponding point bytes;
[0106] Based on the target character order and the target byte order, determine the target point sequence;
[0107] Based on the target point sequence, obtain the target point states of each point in the Googol motion board card configured with the IO expansion module card.
[0108] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a thick line is used in the figure to represent it, but it does not mean that there is only one bus or one type of bus.
[0109] The communication interface is used for communication between the above electronic device and other devices.
[0110] The memory may include a Random Access Memory (RAM), or may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0111] The aforementioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0112] Since the implementation manners and beneficial effects of the various components of the electronic device in the above embodiments can be realized by referring to the steps in the Figure 2 embodiments shown, therefore, the specific working process and beneficial effects of the electronic device provided in the embodiments of the present application will not be repeated here.
[0113] In another embodiment provided by the present application, there is also provided a computer-readable storage medium, in which instructions are stored. When it runs on a computer, it causes the computer to execute the method for obtaining a multi-point state described in any one of the above embodiments.
[0114] In another embodiment provided by the present application, there is also provided a computer program product containing instructions. When it runs on a computer, it causes the computer to execute the method for obtaining a multi-point state described in any one of the above embodiments.
[0115] Those skilled in the art should understand that the embodiments in the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the embodiments in the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments in the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0116] Embodiments of the present application are described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate a means for implementing the specified functions in the process Figure 1 one process or multiple processes and / or blocks Figure 1 or a means for implementing the specified functions in multiple blocks.
[0117] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction means that implements the specified functions in the process Figure 1 one process or multiple processes and / or blocks Figure 1 or a means for implementing the specified functions in multiple blocks.
[0118] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the specified functions in the process Figure 1 one process or multiple processes and / or blocks Figure 1 or a means for implementing the specified functions in multiple blocks.
[0119] Unless otherwise defined, the technical terms or scientific terms used in the present application should have the ordinary meaning understood by those of ordinary skill in the art to which the present invention belongs. The "first", "second", and similar terms used in the present application do not denote any order, quantity, or importance, but are only used to distinguish different components. Words such as "including" or "comprising" mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connected", "coupled", or "linked" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right", etc. are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.
[0120] Although the preferred embodiments in the embodiments of the present application have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the embodiments of the present application are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0121] Obviously, those skilled in the art can make various changes and modifications to the embodiments in the embodiments of the present application without departing from the spirit and scope of the embodiments in the embodiments of the present application. Thus, if these modifications and variations of the embodiments in the embodiments of the present application fall within the scope of the embodiments of the present application and their equivalent technologies, the embodiments of the present application also intend to include these changes and modifications.
Claims
1. A method for obtaining multi-point state, characterized in that, Applied to the host computer connected to the industrial control computer; a Guogao motion board card including an IO expansion module card is configured in the industrial control computer, and the method includes: Dividing multiple points in the point sequence to be processed to obtain multiple point bytes and corresponding byte orders; For any point byte, performing binary conversion on the configuration status of each point in the point byte to obtain multiple point characters in the point byte; Sorting the byte orders of each point byte and the character orders of the multiple point characters corresponding to the respective points respectively to obtain the target byte order of the multiple point bytes and the target character order of each point character in the corresponding point byte; Determining a target point sequence based on the target character order and the target byte order; Based on the target point sequence, obtaining the target point status of each point in the Guogao motion board card configured with the IO expansion module card.
2. The method according to claim 1, wherein Sorting the byte orders of each point byte and the character orders of the multiple point characters corresponding to the respective points respectively to obtain the target byte order of the multiple point bytes and the target character order of each point character in the corresponding point byte, including: Analyzing the arrangement order of the point characters of each point and the arrangement order of each point byte to obtain multiple byte orders and multiple character orders; Determining a target sub-order and a target group order from the multiple sub-orders and multiple group orders based on the point status configured for each point.
3. The method according to claim 2, wherein Dividing multiple points in the point sequence to obtain multiple point bytes, including: Dividing multiple points in the point sequence according to byte rules to obtain at least two point bytes.
4. The method according to claim 2, characterized in that After dividing multiple points in the point sequence to be processed to obtain multiple point bytes and corresponding byte orders, the method further includes: Selecting multiple non-consecutive target points from the multiple points; the multiple target points cover each point byte; Configuring the point status of each target point to 1; Configuring the point status of other points except the multiple target points to 0.
5. The method according to claim 4, characterized in that After obtaining the target byte order and the target character order, the method further includes: Selecting multiple non-consecutive test points from the multiple points; the multiple test points cover each point byte; Based on the target byte order and the target character order, obtaining the current point status of each point in the target point sequence; Determining the test point status from the multiple current point statuses based on the point identifier of the test point; If the test point status is consistent with the configured point status, then execute the step: determining a target point sequence based on the target character order and the target byte order.
6. The method according to claim 1, characterized in that The points include input points and output points.
7. The method according to claim 1, wherein Based on the target point sequence, obtaining the target point status of each point, including: Based on the configured real-time refresh function, refreshing the point status of each point in the target point sequence at a preset time interval to obtain the refreshed point status; Based on the configured point status function, extracting the refreshed point status to obtain the target point status.
8. An acquisition device for multi-point status, characterized in that, The device is applied to a host computer connected to an industrial computer; the industrial computer is equipped with a Googol motion board including an IO expansion module card, and the device includes: A division unit, used for dividing a plurality of points in a point sequence to be processed to obtain a plurality of point bytes and corresponding byte sequences; A conversion unit, for performing binary conversion on the configuration state of each point in any point byte to obtain a plurality of point characters in the point byte; A processing unit, used to sort the byte order of each point-position byte and the character order of multiple point-position characters corresponding to the corresponding point positions, to obtain a target byte order of the multiple point-position bytes and a target character order of each point-position character in the corresponding point-position byte; A determination unit, which determines a target point sequence based on the target character sequence and the target byte sequence; The acquisition unit acquires the target point status of each point in the Googol motion board configured with the IO expansion module card based on the target point sequence.
9. An electronic device, characterized in that, The electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.