A method, apparatus and device for inter-station direct reference of bit numbers, and a storage medium
Patent Information
- Application Number
- CN202311746015.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-18
- Publication Date
- 2026-09-29
- Estimated Expiration
- 2043-12-18
AI Technical Summary
在现有技术中,若实行间接引用,则需要用户在发送站组态发送表、在接收站组态接收表,且组态操作复杂、限制多,易出错,进而导致站间位号引用难度大;若基于UCP协议的直接引用,则必须修改控制器,所以只有特定型号的控制器才支持,进而导致站间位号引用难度大
[0044]本申请提供了一种站间位号直接引用方法。在执行该方法时,先判断被引用位号所在的第一控制站是否检出,若是,则打开第一控制站的第一站间通讯程序页,并在第一站间通讯程序页中,查找第一控制站的发送引脚连接的数据引用块中是否存在被引用位号,若是,则控制第二控制站添加与被引用位号类型相同的位号,接着打开第二控制站的第二站间通讯程序页,并在第二站间通讯程序页中,查找与第一控制站功能块对应的、功能块序号以及功能块引脚序号一致的功能块引脚,再判断功能块引脚是否连接数据引用块,若否,则添加数据引用块并与功能块引脚相连接,以引用被引用位号。这样,实现了站间位号引用并降低站间位号引用难度。
Smart Images

Figure CN117724424B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of distributed control technology, and in particular to a method, apparatus, device and storage medium for direct reference of station tag numbers. Background Technology
[0002] In medium to large-scale industrial control systems, control application data is typically distributed across multiple control stations. Therefore, inter-station communication is necessary for data exchange. Specifically, inter-station communication involves the sending station transmitting data to the receiving station using a specific communication protocol, and the receiving station receiving and using this data according to the same protocol, thus completing the data exchange. In existing technologies, indirect referencing requires users to configure a sending table at the sending station and a receiving table at the receiving station. This configuration process is complex, restrictive, and prone to errors, making inter-station tag reference difficult. Direct referencing based on the UCP protocol requires modification of the controller, limiting its support to specific controller models and further complicating inter-station tag reference.
[0003] In conclusion, how to reduce the difficulty of referencing station reference numbers is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] In view of this, this application provides a method, apparatus, device and storage medium for direct reference of inter-station tag numbers, aiming to reduce the difficulty of referencing inter-station tag numbers.
[0005] Firstly, this application provides a method for directly referencing station reference numbers, including:
[0006] Determine whether the first control station containing the referenced bit number has detected it;
[0007] If so, then open the first station inter-station communication program page of the first control station;
[0008] In the first inter-station communication program page, check whether the referenced bit number exists in the data reference block connected to the transmit pin of the first control station;
[0009] If so, control the second control station to add a bit with the same type as the referenced bit;
[0010] Open the inter-station communication program page of the second control station;
[0011] In the second inter-station communication program page, find the function block pin that corresponds to the function block of the first control station and whose function block number and function block pin number are consistent.
[0012] Determine whether the function block pin is connected to the data reference block;
[0013] If not, add a data reference block and connect it to the function block pin to reference the referenced bit number.
[0014] Optionally, after checking whether the referenced bit number exists in the data reference block connected to the transmit pin of the first control station in the first inter-station communication program page, the method further includes:
[0015] If not, then search from top to bottom in the first inter-station communication program page for the first pin that matches the sending pin type;
[0016] Write the referenced bit number into the data reference block connected to the pin.
[0017] Optionally, if the pin does not exist, then after searching from top to bottom in the first inter-station communication program page for the first pin that matches the transmitting pin type, the method further includes:
[0018] If a pin matching the transmit pin type cannot be found, the system will indicate that the first control station's transmit bit number is full.
[0019] Optionally, after determining whether the first control station has been detected based on its tag number, the method further includes:
[0020] If not, a message will be displayed indicating that adding the reference bit failed.
[0021] Optionally, after determining whether the first pin is connected to a data reference block, the method further includes:
[0022] If so, it will indicate that the receiving address of the second control station is already in use.
[0023] Secondly, this application provides a device for direct reference of station tag numbers, comprising:
[0024] The first judgment module is used to determine whether the first control station where the referenced bit number is located has been detected.
[0025] The first opening module is used to open the first inter-station communication program page of the first control station if the condition is met.
[0026] The first lookup module is used to search in the first inter-station communication program page for whether the referenced bit number exists in the data reference block connected to the transmit pin of the first control station;
[0027] The control module is used to control the second control station to add a bit with the same type as the referenced bit;
[0028] The second opening module is used to open the inter-station communication program page of the second control station;
[0029] The second search module is used to search in the second inter-station communication program page for the function block pin that corresponds to the first control station function block and whose function block number and function block pin number are consistent.
[0030] The second judgment module is used to determine whether the function block pin is connected to the data reference block;
[0031] A connection module is used, if not, to add a data reference block and connect it to the pin of the function block to reference the referenced bit number.
[0032] Optionally, the device further includes:
[0033] The second search module is used to search for the first pin that matches the sending pin type from top to bottom in the first inter-station communication program page if no.
[0034] The writing module is used to write the referenced bit number into the data reference block connected to the pin.
[0035] Optionally, the device further includes:
[0036] The first prompt module is used to prompt that the first control station's transmission bit number is full if a pin of the same type as the transmission pin cannot be found.
[0037] Optionally, the device further includes:
[0038] The second prompt module is used to indicate failure in adding the reference bit if no.
[0039] Optionally, the device further includes:
[0040] The third prompt module is used to prompt that the receiving address of the second control station has been occupied if the condition is met.
[0041] This application also provides corresponding devices and computer storage media for implementing the solutions provided in this application.
[0042] Thirdly, embodiments of this application provide a computer device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the inter-station tag number direct reference method as described in any one of the first aspects of embodiments of this application.
[0043] Fourthly, embodiments of this application provide a computer-readable storage medium storing instructions that, when executed on a terminal device, cause the terminal device to perform the inter-station tag number direct reference method as described in any one of the first aspects of embodiments of this application.
[0044] This application provides a method for direct reference of inter-station tag numbers. When executing this method, it first determines whether the first control station containing the referenced tag number has been detected. If so, the first inter-station communication program page of the first control station is opened, and the referenced tag number is searched within the data reference block connected to the first control station's transmit pin. If found, the second control station is controlled to add a tag number of the same type as the referenced tag number. Next, the second inter-station communication program page of the second control station is opened, and the function block pin corresponding to the first control station's function block, with the same function block number and pin number, is searched within the second inter-station communication program page. It is then determined whether the function block pin is connected to a data reference block. If not, a data reference block is added and connected to the function block pin to reference the referenced tag number. This achieves inter-station tag number reference and reduces the difficulty of inter-station tag number reference. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in this embodiment or the prior art, the drawings used in the description of the embodiment or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 A flowchart illustrating a method for directly referencing station tag numbers provided in this application embodiment;
[0047] Figure 2 This application provides a schematic diagram of the structure of a device for direct reference of station tag numbers in an embodiment of the present application.
[0048] Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0049] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. This application provides a method, apparatus, device, and storage medium for direct reference of inter-station tag numbers, applicable to the field of distributed control technology. The above are merely examples and do not limit the application areas of the methods and apparatuses provided in this application.
[0050] In medium to large-scale industrial control systems, control application data is typically distributed across multiple control stations. Therefore, inter-station communication is necessary for data exchange. Specifically, inter-station communication involves the sending station transmitting data to the receiving station using a specific communication protocol, and the receiving station receiving and using this data according to the same protocol, thus completing the data exchange. In existing technologies, indirect referencing requires users to configure a sending table at the sending station and a receiving table at the receiving station. This configuration process is complex, restrictive, and prone to errors, making inter-station tag reference difficult. Direct referencing based on the UCP protocol requires modification of the controller, limiting its support to specific controller models and further complicating inter-station tag reference.
[0051] The inventors, through research, proposed the technical solution of this application. When executing this method, firstly, it is determined whether the first control station containing the referenced bit number has been detected. If so, the first inter-station communication program page of the first control station is opened. Within the first inter-station communication program page, it is searched to see if the referenced bit number exists in the data reference block connected to the first control station's transmit pin. If so, the second control station is controlled to add a bit number of the same type as the referenced bit number. Next, the second inter-station communication program page of the second control station is opened. Within the second inter-station communication program page, it is searched to find the function block pin corresponding to the first control station's function block, with the same function block number and function block pin number. Then, it is determined whether the function block pin is connected to the data reference block. If not, a data reference block is added and connected to the function block pin to reference the referenced bit number. In this way, inter-station bit number referencing is achieved and the difficulty of inter-station bit number referencing is reduced.
[0052] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all of them. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present application. It should be noted that, for ease of description, only the parts related to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features in the embodiments of the present application can be combined with each other.
[0053] Before executing the embodiments of this application, it is necessary to configure an inter-station communication FBD program page, configuring various types of inter-station function blocks, with one-to-one correspondence between sending and receiving, and placing it as a template file in the installation directory. Next, modify the logic for creating a new control station to automatically copy the inter-station FBD program page template configuration file from the installation directory to the configuration directory, and rename the inter-station communication FBD program page template file to a specific name, such as "Interstation_communication_Domain_Station_Number," with one fixed file for each control station. Finally, add an "Inter-station Reference Link" module to the FBD configuration program, similar to the "Data Reference" module. Users who want to reference the tag number of other control stations only need to add the "Inter-station Reference Link" module to the FBD configuration program, double-click the module, and in the pop-up "Inter-station Reference Tag Number Selection" dialog box, select the control station to reference and the tag number within that control station, and click OK to complete the direct reference of the inter-station tag number. The specific referencing method is as follows:
[0054] See Figure 1 , Figure 1 A flowchart of a method for directly referencing inter-station tag numbers provided in this application embodiment includes:
[0055] S101: Determine whether the first control station where the referenced bit number is located has been detected.
[0056] In response to the user's reference operation, the referenced bit number is determined, and the first control station where the referenced bit number is located is identified. First, it is determined whether the first control station where the referenced bit number is located has been detected. If not, step S102 is executed; if yes, step S103 is executed.
[0057] S102: Error message: Adding bit reference failed.
[0058] If the first control station containing the referenced tag number is not detected, a tag number reference addition failure message will be displayed. For example, a pop-up message will appear saying "Control station xx not detected, tag number reference addition failure!".
[0059] S103: Open the first station inter-station communication program page of the first control station.
[0060] If the first control station where the referenced tag number is located has been detected, the inter-station FBD communication program page of the first control station where the referenced tag number is located will be opened in the background, i.e., the first inter-station communication program page.
[0061] S104: In the first station inter-station communication program page, check if the referenced bit number exists in the data reference block connected to the transmit pin of the first control station.
[0062] In the first station communication program page, check if there is a referenced bit number in the data reference block connected to the transmit pin of the first control station. If yes, proceed to step S105; otherwise, proceed to step S107.
[0063] S105: In the first inter-station communication program page, search from top to bottom for the first pin that matches the transmit pin type.
[0064] In the first inter-station communication program page, search from top to bottom for the first pin that matches the transmitting pin type. If a pin that matches the transmitting pin type exists, proceed to step S106. If no pin that matches the transmitting pin type exists in the first inter-station communication program page, prompt that the transmitting pin number of the first control station is full. For example, a pop-up message will appear saying "The transmitting pin number of xx control station is full and cannot be added!".
[0065] S106: Write the referenced bit number into the data reference block connected to the pin.
[0066] If a pin of the same type as the transmit pin exists, the referenced bit number is written into the data reference block connected to the first pin of the same type as the transmit pin from top to bottom in the first inter-station communication program page. Then, step S107 is executed.
[0067] S107: Control the second control station to add a tag with the same type as the referenced tag.
[0068] The second control station adds a custom bit number of the same type as the referenced bit number, such as "CUSTOM_AI001", to ensure bit number consistency.
[0069] S108: Open the second station inter-station communication program page of the second control station.
[0070] Open the inter-station FBD communication program page of the second control station in the background, i.e., the second inter-station communication program page.
[0071] S109: In the second station communication program page, find the function block pin that corresponds to the function block of the first control station and whose function block number and function block pin number are consistent.
[0072] In the second station communication program page, find the function block pin that corresponds to the function block of the first control station and that matches the function block number and function block pin number.
[0073] S110: Determine whether the function block pin is connected to the data reference block.
[0074] Determine whether the function block pin found in step S109 is connected to the data reference block. If yes, proceed to step S111; otherwise, proceed to step S112.
[0075] S111: Add a data reference block and connect it to the function block pin.
[0076] If a function block pin is not connected to a data reference block, a data reference block is added, a custom bit number is written before the bit number, and the function block pin is connected to the added data reference block to enable referencing of the referenced bit number.
[0077] S112: Indicates that the receiving address of the second control station has been occupied.
[0078] If a function block pin is connected to a data reference block, a message will appear indicating that the second control station receiving address is already in use. For example, a pop-up message will appear saying "The receiving station address is already in use and cannot be added!".
[0079] In this embodiment, it is first determined whether the first control station containing the referenced bit number has been detected. If so, the first inter-station communication program page of the first control station is opened, and the referenced bit number is checked in the data reference block connected to the transmit pin of the first control station. If so, the second control station is controlled to add a bit number of the same type as the referenced bit number. The second inter-station communication program page of the second control station is opened, and the function block pin corresponding to the function block of the first control station, with the same function block number and function block pin number, is checked. Then it is determined whether the function block pin is connected to the data reference block. If not, a data reference block is added and connected to the function block pin to reference the referenced bit number. This realizes inter-station bit number referencing and reduces the difficulty of inter-station bit number referencing.
[0080] The above are some specific implementations of the method for directly referencing station tag numbers provided in the embodiments of this application. Based on this, this application also provides a corresponding apparatus. The apparatus provided in the embodiments of this application will be described below from the perspective of functional modularity.
[0081] See Figure 2 , Figure 2 This is a schematic diagram of a direct reference device for inter-station tag numbers provided in an embodiment of this application. The direct reference device for inter-station tag numbers 200 includes:
[0082] The first judgment module 210 is used to determine whether the first control station where the referenced bit number is located has been detected.
[0083] The first opening module 220 is used to open the first inter-station communication program page of the first control station if the condition is met.
[0084] The first lookup module 230 is used to search in the first inter-station communication program page whether the referenced bit number exists in the data reference block connected to the transmit pin of the first control station;
[0085] Control module 240 is used to control the second control station to add a bit with the same type as the referenced bit; if so,
[0086] The second opening module 250 is used to open the second station inter-station communication program page of the second control station;
[0087] The second lookup module 260 is used to search in the second inter-station communication program page for a function block pin that corresponds to the first control station function block and whose function block number and function block pin number are the same.
[0088] The second judgment module 270 is used to determine whether the function block pin is connected to the data reference block;
[0089] Connection module 280 is used to add a data reference block and connect it to the function block pin if no, to reference the referenced bit number.
[0090] Optionally, the device 200 further includes:
[0091] The second search module is used to search for the first pin that matches the sending pin type from top to bottom in the first inter-station communication program page if no.
[0092] The writing module is used to write the referenced bit number into the data reference block connected to the pin.
[0093] Optionally, the device 200 further includes:
[0094] The first prompt module is used to prompt that the first control station's transmission bit number is full if a pin of the same type as the transmission pin cannot be found.
[0095] Optionally, the device 200 further includes:
[0096] The second prompt module is used to indicate failure in adding the reference bit if no.
[0097] Optionally, the device 200 further includes:
[0098] The third prompt module is used to prompt that the receiving address of the second control station has been occupied if the condition is met.
[0099] This application also provides corresponding devices and computer storage media for implementing the solutions provided in this application.
[0100] like Figure 3As shown, the computer device 01 is represented in the form of a general-purpose computing device. The components of the computer device 01 may include, but are not limited to: one or more processors or processing units 03, system memory 08, and bus 04 connecting different system components (including system memory 08 and processing unit 03).
[0101] Bus 04 represents one or more of several bus architectures, including memory buses or memory controllers, peripheral buses, graphics acceleration ports, processors, or local buses using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0102] Computer device 01 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 01, including volatile and non-volatile media, removable and non-removable media.
[0103] System memory 08 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 09 and / or cache memory 10. Computer device 01 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 11 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 3 Not shown; usually referred to as a "hard drive"). Although Figure 3 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 04 via one or more data media interfaces. Memory 08 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0104] A program / utility 12 having a set (at least one) of program modules 13 may be stored in, for example, memory 08. Such program modules 13 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 13 typically perform the functions and / or methods described in the embodiments of the present invention.
[0105] Computer device 01 can also communicate with one or more external devices 02 (e.g., keyboard, pointing device, display 07, etc.), and with one or more devices that enable a user to interact with the computer device 01, and / or with any device that enables the computer device 01 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through input / output (I / O) interface 06. Furthermore, computer device 01 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) through network adapter 05. Figure 3 As shown, network adapter 05 communicates with other modules of computer device 01 via bus 04. It should be understood that, although... Figure 3 As not shown in the diagram, it can be used in conjunction with computer device 01 with other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0106] The processor unit 03 executes various functional applications and data processing by running programs stored in the system memory 08, such as implementing a direct reference method for inter-station tag numbers provided in the embodiments of this application.
[0107] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0108] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps in the methods of the above embodiments can be implemented by means of software plus a general-purpose hardware platform. Based on this understanding, the technical solution of this application can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as a read-only memory (ROM) / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0109] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0110] The above description is merely an exemplary implementation of this application and is not intended to limit the scope of protection of this application.
Claims
1. A method for directly referencing station tag numbers, characterized in that, include: Determine whether the first control station containing the referenced bit number has detected it; If so, then open the first station inter-station communication program page of the first control station; In the first inter-station communication program page, check whether the referenced bit number exists in the data reference block connected to the transmit pin of the first control station; If so, control the second control station to add a bit with the same type as the referenced bit; Open the inter-station communication program page of the second control station; In the second inter-station communication program page, find the function block pin that has the same function block number and the same function block pin number as the first control station. Determine whether the function block pin is connected to the data reference block; If not, add a data reference block and connect it to the function block pin to reference the referenced bit number.
2. The method according to claim 1, characterized in that, After checking whether the referenced bit number exists in the data reference block connected to the transmit pin of the first control station in the first inter-station communication program page, the method further includes: If not, then search from top to bottom in the first inter-station communication program page for the first pin that matches the sending pin type; Write the referenced bit number into the data reference block connected to the pin.
3. The method according to claim 2, characterized in that, If the specified pin does not exist, then after searching from top to bottom in the first inter-station communication program page for the first pin that matches the transmitting pin type, the method further includes: If a pin matching the transmit pin type cannot be found, the system will indicate that the first control station's transmit bit number is full.
4. The method according to claim 1, characterized in that, After determining whether the first control station has been detected based on its tag number, the method further includes: If not, a message will be displayed indicating that adding the reference bit failed.
5. The method according to claim 1, characterized in that, After determining whether the function block pin is connected to the data reference block, the method further includes: If so, a message will be displayed indicating that the receiving address of the second control station is already in use.
6. A device for direct reference of station tag numbers, characterized in that, include: The first judgment module is used to determine whether the first control station where the referenced bit number is located has been detected. The first opening module is used to open the first inter-station communication program page of the first control station if the condition is met. The first lookup module is used to search in the first inter-station communication program page for whether the referenced bit number exists in the data reference block connected to the transmit pin of the first control station; The control module is used to control the second control station to add a bit with the same type as the referenced bit; The second opening module is used to open the inter-station communication program page of the second control station; The second search module is used to search for function block pins in the second inter-station communication program page that have the same function block number and function block pin number as the first control station. The second judgment module is used to determine whether the function block pin is connected to the data reference block; A connection module is used, if not, to add a data reference block and connect it to the pin of the function block to reference the referenced bit number.
7. The apparatus according to claim 6, characterized in that, The device further includes: The second search module is used to search for the first pin that matches the sending pin type from top to bottom in the first inter-station communication program page if no. The writing module is used to write the referenced bit number into the data reference block connected to the pin.
8. The apparatus according to claim 7, characterized in that, The device further includes: The first prompt module is used to prompt that the first control station's transmission bit number is full if a pin of the same type as the transmission pin cannot be found.
9. A computer device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the inter-station tag number direct reference method as described in any one of claims 1-5.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a terminal device, cause the terminal device to perform the inter-station tag number direct reference method as described in any one of claims 1-5.
Citation Information
Patent Citations
Sending method and receiving method for inter-station communication data and associated equipment
CN104660373A
Method and system for generating communication data between DCS controllers, equipment and storage medium
CN113778041A