A configuration system based on a free protocol of industrial control configuration software
By introducing a free protocol configuration system into the configuration software, the problem of flexible configuration of non-standard protocol devices in the configuration software is solved, communication between multi-interface devices is realized, and the need for hardware customization is reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-03
- Publication Date
- 2026-04-10
AI Technical Summary
Existing configuration software requires customized drivers when dealing with non-standard protocol devices, which makes it inconvenient to use and unable to flexibly configure new devices and new protocols.
A free protocol configuration system based on industrial control configuration software is provided, including a protocol configuration module that supports operation configuration, command configuration, data configuration, mode configuration and verification configuration, enabling communication between different devices using different protocols.
Users can configure the protocol themselves to access non-standard protocol devices, supporting multiple interfaces such as serial port, Ethernet, CAN, IIC, GPIO, etc., reducing the need for hardware customization.
Smart Images

Figure CN117336166B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to computer communication, and in particular to a configuration system based on an industrial control configuration software free protocol. BACKGROUND
[0002] Industrial control configuration software refers to some special software for data acquisition and process control. It is a software platform and development environment at the monitoring level of an automatic control system, and provides users with a general level software tool for quickly building monitoring functions of an industrial automatic control system using a flexible configuration method. Configuration software is widely used in many fields such as machinery, automobiles, petroleum, chemical industry, papermaking, water treatment, and process control. The configuration software is generally designed on a host computer and then downloaded to a HMI touch screen and the like, and communication with PLC and the like is realized by the HMI (Human Machine Interface) touch screen. The configuration software mainly uses a serial port and a network interface as the main communication port, supports a Modbus protocol, and the communication device is mainly PLC and the like. Foreign configuration software such as InTouch, iFix, and domestic configuration software such as Kingview and MCGS mainly use a serial port and an Ethernet communication interface as the main communication interface, and support several thousand kinds of industrial device drivers. However, if other interfaces such as CAN, IIC (Inter-Integrated Circuit), and GPIO (General-purpose input / output) or devices accessing new non-standard protocols are needed, customized hardware and configuration software with customized drivers are needed to realize communication.
[0003] With the development of configuration software and the expansion of application fields, the configuration software needs to support more and more devices, and the interfaces and protocols of these devices are not only serial ports, Ethernet, and Modbus protocols. The configuration software needs to gradually increase the number of adapted and customized drivers, which brings great inconvenience to users. The OPC (OLE for Process Control) standard is an object-oriented technology proposed by Microsoft Corporation, which is used to share data and functions between different application programs. The OPC technology is applied to the process control field to realize the interconnection and intercommunication between devices, sensors, and control systems. The support of the OPC standard in the configuration software can realize communication with devices supporting the OPC driver without separately adapting the driver. The OPC standard solves the problem of the need for a large number of adapted device drivers for the configuration software, but devices supporting the OPC standard are needed. For devices that do not support the OPC standard, the configuration software still needs to adapt the driver, so the configuration software needs another way to solve the problem of adapting new devices and new protocols. SUMMARY
[0004] The present application aims at the deficiency of the prior art, and provides a configuration system based on a free protocol of industrial control configuration software, which can be configured by a user of the configuration software to realize access to a sensor and other devices with a non-standard protocol.
[0005] To achieve the above object, the present application adopts the following technical scheme:
[0006] The present application provides a configuration system based on a free protocol of industrial control configuration software, which comprises a protocol configuration module for realizing communication of different protocols of different devices; and the configuration mode of the protocol configuration module comprises operation configuration, instruction configuration, data configuration, mode configuration and verification configuration.
[0007] Further, the operation mode of the operation configuration comprises a sending mode, a receiving mode, a first-sending-then-receiving mode and a first-receiving-then-sending mode.
[0008] Further, the instruction configuration configures specific instructions to be sent, and the specific instructions are complete contents to be sent.
[0009] Further, the data configuration configures formats of sending data and receiving data, and adds one or more sending data elements or receiving data elements, and each of the sending data elements and the receiving data elements needs to be configured with a starting position of data, a data mapping variable, a Bit position and a byte sequence.
[0010] The starting position is an offset address of data in a whole command; the data mapping variable is a variable mapped to a local variable table; the Bit position is a Bit position if the data mapping variable is a switch value type; and the byte sequence is a byte ordering mode of the current data.
[0011] Further, the mode configuration configures a sending mode and a receiving mode, the sending mode configures an execution mode, including a periodic execution, an execution when a data value changes, a manual execution or an automatic trigger execution; and the receiving mode configures contents to be received, including specific start contents, end contents and fixed contents.
[0012] Further, the verification configuration configures sending verification and receiving verification, and the sending verification and the receiving verification configure a verification mode, a verification starting position, a verification end position and a storage position of a verification result; and the verification mode comprises no verification, single-byte and verification, double-byte and verification, four-byte and verification, single-byte XOR, double-byte XOR, four-byte XOR, LRC, CRC verification and fixed value verification.
[0013] Further, the flow of the sending mode is specifically as follows:
[0014] S101, the operation is configured to send mode, set the total number of bytes sent n;
[0015] S102, the instruction configuration in the sending instruction fills m bytes of data;
[0016] S103, the data configuration adds sending data, which can add one or more sending data elements, each of which needs to be configured in the offset address of the whole command and the data mapping to the local address variable or the register variable of the remote IO device;
[0017] S104, the mode configuration configures the execution mode of the sending mode, which can be set to data value change execution, periodic execution and manual execution; the periodic execution needs to configure the periodic time of execution; the data value change execution means executing the sending command when the value of the mapping variable configured by the data configuration changes; the periodic execution executes the sending command according to the configured periodic time; the manual execution means manually triggering the sending command;
[0018] S105, the check configuration configures the sending check, the check start position is the check start address in the offset address of the whole command; the check result storage position is used to set the value of the check in the offset address of the whole command.
[0019] Further, the flow of the receiving mode is specifically:
[0020] S201, the operation is configured to receive, and the total number of received bytes is n';
[0021] S202, the data configuration adds receiving data, which can add one or more receiving data elements, each of which needs to be configured in the actual position and the data mapping to the local address variable or the register variable of the remote IO device;
[0022] S203, the mode configuration configures the receiving mode, the receiving command starts with a fixed byte to configure the start content of the data, the receiving command ends with a fixed byte to configure the end content of the data, and the receiving command appears in a fixed position with a fixed byte to configure the fixed content of the data;
[0023] S204, the check configuration configures the receiving check, the check start position is the check start address in the offset address of the whole command; the check end position is the check end address in the offset address of the whole command; the check result storage position is used to set the value of the check in the offset address of the whole command.
[0024] Further, the first sending and then receiving mode is specifically: the operation configuration is first sending and then receiving, the sending length is n1, and the receiving length is n2; the sending command configuration is the same as the sending command configuration of the first sending command configuration mode, and the receiving command configuration is the same as the receiving command configuration of the second receiving command configuration.
[0025] Further, the first receiving and then sending mode is specifically: the operation configuration is first receiving and then sending, the sending length is n1', and the receiving length is n2'; the sending mode of the sending command configuration is automatically triggered, other configurations are the same as the sending command configuration of the first sending command configuration mode, and the receiving command configuration is the same as the receiving command configuration of the second receiving command configuration.
[0026] The application has the advantages that the protocol can be configured by the user of the configuration software, and the non-standard protocol sensor and other devices can be accessed. The protocol configuration belongs to the application layer protocol configuration, and does not depend on specific hardware interfaces, and supports devices with serial ports, Ethernet, CAN, IIC, GPIO and other interfaces. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 The protocol configuration module flowchart of the application is shown in the figure;
[0028] Figure 2 The sending command protocol configuration flowchart is shown in the figure;
[0029] Figure 3 The receiving command protocol configuration flowchart is shown in the figure;
[0030] Figure 4 The first sending and then receiving command protocol configuration flowchart is shown in the figure;
[0031] Figure 5 The first receiving and then sending command protocol configuration flowchart is shown in the figure. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical scheme and advantages of the application more clear, the application is further described in detail below with reference to the drawings. It should be understood that the specific embodiments described herein are only used to explain the application, and are not used to limit the application.
[0033] Please refer to Figure 1 A configuration system based on a free protocol of industrial control configuration software, comprising a protocol configuration module, which is used for realizing communication of different devices with different protocols; the configuration mode of the protocol configuration module comprises operation configuration, instruction configuration, data configuration, mode configuration and verification configuration.
[0034] The operation mode of the operation configuration comprises a sending mode, a receiving mode, a first sending and then receiving mode and a first receiving and then sending mode.
[0035] The instruction configuration configures specific instructions to be sent, and the specific instructions are complete contents to be sent.
[0036] The data configuration configures formats of sent data and received data, adds one or more sent data elements or received data elements, and each of the sent data elements and the received data elements needs to be configured with a start position of data, a data mapping variable, a Bit position, and a byte sequence.
[0037] The start position is an offset address of data in a whole command; the data mapping variable is a variable mapped by data in a local variable table; the Bit position is a Bit position if the data mapping variable is a switch value type; and the byte sequence is a byte sequence of data.
[0038] The mode configuration configures sending modes and receiving modes, the sending modes configure execution manners, including periodic execution, data value change execution, manual execution, or automatic trigger execution; and the receiving modes configure contents to be received, including specific start contents, end contents, and fixed contents.
[0039] The check configuration configures sending checks and receiving checks, the sending checks and the receiving checks configure check manners, check start positions, check end positions, and storage positions of check results; and the check manners include no check, single-byte and check, double-byte and check, four-byte and check, single-byte XOR, double-byte XOR, four-byte XOR, LRC, CRC check, and fixed value check.
[0040] The flow of the sending mode is specifically as follows:
[0041] S101, the operation configuration is a sending mode, and a total number of bytes to be sent is set as n;
[0042] S102, the instruction configuration fills m bytes of data;
[0043] S103, the data configuration adds sent data, one or more sent data elements can be added, and each of the sent data elements needs to be configured with an offset address in a whole command and a data mapping to a local address variable or a register variable of a remote IO device;
[0044] S104, the mode configuration configures an execution manner of the sending mode, the sending mode can be set as data value change execution, periodic execution, and manual execution; the periodic execution needs to be configured with a periodic time; the data value change execution indicates that the sending command is executed when a value of the mapping variable configured by the data changes; the periodic execution is to execute the sending command according to the configured periodic time; and the manual execution indicates that the sending command needs to be manually triggered.
[0045] S105, the check configuration is configured to send a check, the check start position is the offset address of the check start address in the whole command; and the check result storage position is used to set the value of the check in the offset address of the whole command.
[0046] A specific embodiment is that the sending command is: 0xaa 0xbb 0x02 0x00 0x67 0xcc 0xdd, a total of 7 bytes. Among them, 0xaa 0xbb is a fixed frame header, 0x02 is a fixed content, 0x00 is data, 0x67 is the sum of the first 4 bytes, and 0xcc 0xdd is a fixed frame tail. The configuration mode is: the operation configuration is configured to send only, the total number of bytes sent is 7, the sending instruction of the instruction configuration is filled with 0xaa 0xbb 0x02 0x00 0x67 0xcc 0xdd, a data is added in the sending data of the data configuration, the configuration start position is 4 (the offset in the whole command is 4, that is, the position of byte 0x00), the data is mapped to the local variable var_1 (the variable data type is char single byte), the mode configuration is configured in the sending mode to execute when the data value changes, the check configuration is configured to send a check, which is a single-byte sum check, the check start position is 1, the end is 4, and the check result storage position is 5 (that is, the position of 0x67 of the instruction). After the above configuration is completed, when the value of the var_1 variable changes, the sending command will be triggered to send to the device, such as the value of var_1 being 10, the sending command triggered is: 0xaa 0xbb 0x02 0x0a 0x71 0xcc 0xdd.
[0047] The flow of the receiving mode is specifically:
[0048] S201, the operation configuration is configured to receive, and the total number of bytes received is n';
[0049] S202, the data configuration is added with received data, and one or more received data elements can be added, and each received data needs to be configured with its position and data mapping to a local address variable or a register variable of a remote IO device;
[0050] S203, the receiving mode is configured in the mode configuration, the receiving command starts with a fixed byte to configure the start content of the data, the receiving command ends with a fixed byte to configure the end content of the data, and the receiving command appears at a fixed position to configure the fixed content of the data;
[0051] S204, the check configuration is configured to receive a check, the check start position is the offset address of the check start address in the whole command; the check end position is the offset address of the check end address in the whole command; and the check result position is used to set the value of the check in the offset address of the whole command.
[0052] The specific embodiment is that the command to be received is 0xaa 0xbb 0x02 0x01 0x67 0xcc 0xdd, a total of 7 bytes. Among them, 0xaa 0xbb is a fixed frame header, 0x02 is a fixed content, 0x01 is data, 8 bits represent the state of 8 lights, 0x67 is the sum of the first 4 bytes, 0xcc 0xdd is a fixed frame tail. The configuration mode is that the operation configuration is only receiving, the total number of bytes received is 7, the data configuration is increased by 8 data elements, the start address of each data is set to 4 (the offset in the whole command is 4), the data mapping of the 8 data is set to switch variables var_1 to var_8, the bits of the 8 data are set to 0-7, the receiving mode is set in the mode configuration, the start data is set to “0xaa 0xbb”, the end content is set to “0xcc 0xdd”, the check configuration is configured to receive the check, the check mode is single-byte summation, the start position is 1, the end position is 4, and the check storage position is 5 (that is, the position of 0x67). After the above configuration is completed, when the command sent by the device is received and the start data, the end data and the check are met, the data is automatically received and parsed to the variables var1-var8.
[0053] The first sending and then receiving mode is specifically that the operation configuration is first sending and then receiving, the sending length is n1, and the receiving length is n2; the sending command configuration is the same as the sending command configuration of the first one, and the receiving command configuration is the same as the receiving command configuration of the second one.
[0054] The first receiving and then sending mode is specifically that the operation configuration is first receiving and then sending, the sending length is n1', and the receiving length is n2'; the sending mode in the sending command configuration is selected as automatic triggering, and the other configurations are the same as the sending command configuration of the first one, and the receiving command configuration is the same as the receiving command configuration of the second one.
[0055] The above embodiments only express the implementation of the present application, and the description is more specific and detailed, but it cannot be understood as a limitation on the scope of the patent of the present application. It should be noted that for ordinary skilled persons in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the patent of the present application should be based on the appended claims.
Claims
1. A configuration system based on a free protocol of industrial control configuration software, characterized in that: It includes a protocol configuration module for enabling communication between different devices using different protocols; the configuration modes of the protocol configuration module include operation configuration, command configuration, data configuration, mode configuration, and verification configuration. The operation modes configured include sending mode, receiving mode, sending before receiving mode, and receiving before sending mode; The instruction configuration specifies the specific instructions to be sent, and the specific instructions are the complete content to be sent. The data configuration includes configuring the format of the sent data and the format of the received data, and adding one or more sent data elements or received data elements. The mode configuration includes a sending mode and a receiving mode. The sending mode configures the execution method, including periodic execution, execution when data value changes, manual execution, and automatic triggering execution. The receiving mode configures the received content, including specific start content, end content, and fixed content. The verification configuration includes sending verification and receiving verification, and the sending verification and receiving verification are configured with verification method, verification start position, verification end position, and storage location of verification result; The specific process of the sending mode is as follows: S101, The operation is configured as a sending mode, and the total number of bytes to be sent is set to... ; S102, The instruction configuration is filled with sending instructions. byte of data; S103. Adding send data in the data configuration can add one or more send data elements. Each send data element needs to be configured in the offset address of the entire command and the data mapping to the local address variable or the register variable of the remote IO device. S104. The mode configuration specifies the execution method of the sending mode. The sending mode can be set to execute when the data value changes, execute periodically, or execute manually. The periodic execution requires configuring the execution period. The execution when the data value changes means that the sending command is executed when the value of the mapped variable configured in the data changes. The periodic execution means that the sending command is executed according to the configured period. The manual execution means that the sending command needs to be triggered manually. S105. The verification configuration configures the sending verification, and the verification start position is the offset address of the verification start address in the entire command; the storage location of the verification result is used to set the offset address of the verification value in the entire command. The specific process of the receiving mode is as follows: S201, The operation is configured in receive mode, and the total number of bytes received is... ; S202. In the data configuration, one or more receiving data elements can be added. Each receiving data element needs to be configured with a start position and data mapping to a local address variable or a register variable of a remote I / O device. S203. Configure the receiving mode in the mode configuration. The receiving command starts with a fixed byte and the data start content is configured. The receiving command ends with a fixed byte and the data end content is configured. The receiving command appears at a fixed position with a fixed byte and the data is configured with fixed content. S204. The verification configuration configures receive verification, the verification start position is the offset address of the verification start address in the whole command; the verification end position is the offset address of the verification end address in the whole command; the storage location of the verification result is used to set the value of the verification in the offset address of the whole command.
2. The configuration system based on a free protocol for industrial control configuration software according to claim 1, characterized in that: Each of the transmitted data elements and the received data elements needs to be configured with the starting position of the data, data mapping variables, bit positions, and byte order; The starting position is the offset address of the data in the entire command; the data mapping variable is the variable that the data is mapped to in the local variable table; the bit is the bit when the data mapping variable is a switch type; the byte order is the byte sorting method that makes up the current data.
3. A configuration system based on a free protocol for industrial control configuration software according to claim 2, characterized in that: The verification methods include no verification, single-byte verification, double-byte verification, four-byte verification, single-byte XOR verification, double-byte XOR verification, four-byte XOR verification, LRC verification, CRC verification, and fixed value verification.
4. A configuration system based on a free protocol for industrial control configuration software according to claim 3, characterized in that, The send-then-receive mode specifically refers to: the operation configuration is set to send first and then receive, with a sending length of [missing information]. The received length is ; The configuration is sent first in the same way as the configuration in the sending mode, and the configuration is received later in the same way as the configuration in the receiving mode.
5. A configuration system based on a free protocol for industrial control configuration software according to claim 4, characterized in that, The "receive first, send later" mode specifically refers to: the operation configuration is set to receive first, then send, with a sending length of [missing information]. The received length is In the subsequent sending configuration, the execution mode is set to automatic triggering. Other configurations are the same as those in the sending mode's process. The receiving configuration is the same as those in the receiving mode's process.
Citation Information
Patent Citations
Fast universal multi-protocol gateway realization system and method
CN109510759A