C2D communication system and I / O data communication method based on direct transmission of base station MAC sublayer
By integrating the PLC operating environment on the mobile communication base station side and establishing address information mapping relationships, combining the slave driver module to realize data interaction on the I/O device side, the problem of communication delay between the PLC and the industrial terminal equipment is solved, and industrial control service data is improved transmission efficiency.
Patent Information
- Application Number
- CN202211140073.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-20
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2042-09-20
AI Technical Summary
In the prior art, when industrial control and mobile communication are combined, the communication link delay between PLC and industrial terminal equipment cannot meet the requirements of process control data, and there is a simplified space for the transmission link between cloud PLC and hardware equipment. 5G NR technology is highly incompatible with PLC business models, and it is difficult to meet the delay requirements of industrial applications.
The PLC operation environment is integrated on the mobile communication base station side, and the mapping relationship between the address information of the I/O device read and write data and the network ID is established through the main station driver module, so as to realize the direct data of the PLC and the MAC sublayer of the protocol stack on the base station side. Interaction; add a slave driver module to the I/O device side to realize data interaction between the microcontroller and the MAC sublayer of the protocol stack on the I/O device side, simplify the data processing flow, and shorten the communication link.
It realizes the deep integration of PLC and mobile communication base stations, simplifies data processing flow, shortens transmission delay, and improves the transmission efficiency of industrial control service data.
Smart Images

Figure CN115361704B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial control, and in particular to a C2D communication system and an I / O data communication method based on direct transmission of a base station MAC sublayer. Background Art
[0002] In the industrial field, the combination of industrial control and the new generation of mobile communication technology has gradually become a new trend in industrial Internet and industrial informatization. As the main equipment of industrial control, how PLC (Programmable logic controller) can efficiently transmit data in the field of mobile communications is a difficult problem that needs to be solved.
[0003] In C2D (Controller-Device) communication scenarios using mobile communication technology, whether it is traditional hardware PLC or emerging cloud PLC, the communication link latency between it and industrial terminal equipment often cannot meet the arrival time limit requirements of process control data. Shortening the transmission link and deeply integrating PLC with mobile communication base stations will be an effective way to improve the transmission efficiency of industrial control business data in mobile communication networks.
[0004] In the existing technology, the mobile communication network architecture of cloud-based PLC industrial control scenarios based on MEC (Multi-access Edge Computing) is as follows: Figure 1 As shown in the figure. The cloud-based PLC is deployed on the MEC server at the industrial site. The generated I / O data is encapsulated into IP data packets and sent to the UPF network element. The UPF network element encapsulates the GTP protocol and sends it to the mobile communication base station. After decapsulating the GTP protocol, it is processed by each layer of the protocol stack on the base station side, and the physical layer generates a wireless RF signal and sends it to the terminal device. The mobile communication module of the terminal device demodulates the received RF signal, and then obtains the IP data packet after processing by each layer of the protocol stack. In the entire communication process, the gNB (the next Generation Node B, 5G base station) and UE (User Equipment, user terminal) devices use the same protocol stack structure, and the overall number of protocol layers is large. Since the data conversion between each layer requires the addition of a header or unpacking operation, and the PLC operating environment is placed on the MEC, the data communication link is long, which greatly increases the transmission delay. In the face of the latency requirements of industrial control applications, this implementation solution is still not the optimal solution, and there is still room for simplification of the transmission link between the cloud-based PLC and the hardware device. In addition, the existing solution uses standard 5G NR technology to encapsulate and transmit PLC data. This method is not highly adaptable to the PLC business model and is difficult to meet the latency requirements of industrial applications. Summary of the invention
[0005] The embodiment of the present invention provides a C2D communication system and an I / O data communication method based on direct transmission of the base station MAC sublayer, which can improve the transmission efficiency of industrial control business data. The technical solution is as follows:
[0006] On the one hand, a C2D communication system based on direct transmission of a base station MAC sublayer is provided, comprising: a base station and an I / O device; wherein,
[0007] The base station is used to integrate and deploy the PLC operating environment and the master station driver module on the basis of the mobile communication base station side protocol stack, establish a mapping relationship between the address information of the I / O device reading and writing data and the I / O device network ID through the master station driver module, and realize data interaction between the PLC operating environment and the MAC sublayer of the base station side protocol stack based on the mapping relationship;
[0008] The I / O device is used to add a slave driver module based on the microcontroller and the mobile communication I / O device side protocol stack, and realize the I / O data interaction between the microcontroller and the MAC sublayer of the I / O device side protocol stack through the slave driver module.
[0009] Furthermore, the C2D communication system further comprises: a PLC integrated development environment;
[0010] The master station driving module includes: a control module and a read-write module; wherein,
[0011] The control module is used to send an I / O device scan request to the I / O device in the C2D system through the base station side protocol stack, and receive the device information response sent by the I / O device; gather the device information of all I / O devices in the C2D system, and report the device information of all I / O devices to the PLC integrated development environment; receive the address information and read cycle of each I / O device read and write data from the PLC operating environment; establish a mapping relationship between the address information of the I / O device read and write data and the I / O device network ID; send the mapping relationship between the address information of the I / O device read and write data and the I / O device network ID, as well as the read cycle of the I / O data to the read and write module;
[0012] The read / write module is used to receive the mapping relationship between the address information of the I / O device read / write data and the I / O device network ID, as well as the reading cycle of the I / O data, sent by the management and control module; read the I / O data from the PLC operating environment input and output list according to the address information and the reading cycle of the read data, and send the I / O data and the network ID of the corresponding I / O device to the MAC sublayer of the base station side protocol stack according to the mapping relationship; receive the I / O data and the network ID from the MAC sublayer of the base station side protocol stack, obtain the address information of the read data according to the mapping relationship, and write the I / O data into the PLC operating environment input and output list.
[0013] Furthermore, the slave station driver module includes: a device information management module and a service data transceiver module; wherein,
[0014] The device information management module is used to manage the device information of the I / O device, including the I / O device hardware ID and I / O service parameter information; receive the device scan request sent by the base station; and send the device information to the base station through the I / O device side protocol stack;
[0015] The business data transceiver module serves as a buffer between the microcontroller and the I / O device side protocol stack, and is used to receive I / O data from the MAC sublayer of the I / O device side protocol stack and send it to the microcontroller; and receive I / O data from the microcontroller and send it to the MAC sublayer of the I / O device side protocol stack.
[0016] On the one hand, a method for I / O data communication based on direct transmission of a base station MAC sublayer is provided, comprising:
[0017] The base station integrates and deploys the PLC operating environment and the master station driver module on the basis of the mobile communication base station side protocol stack, and adds a slave station driver module on the basis of the microcontroller and the mobile communication I / O device side protocol stack on the I / O device side; wherein, the mapping relationship between the address information of the I / O device read and write data and the I / O device network ID is established through the master station driver module to realize the data interaction between the PLC operating environment and the MAC sublayer of the base station side protocol stack; the I / O data interaction between the microcontroller and the MAC sublayer of the I / O device side protocol stack is realized through the slave station driver module;
[0018] Execute a downlink I / O data sending operation according to the I / O data reading cycle and the established mapping relationship;
[0019] When the I / O device needs to upload I / O data, an uplink I / O data sending operation is performed based on the established mapping relationship.
[0020] Furthermore, the master station driving module includes: a control module and a read-write module;
[0021] The slave station driving module includes: a device information management module and a service data transceiver module;
[0022] The mapping relationship between the address information of the I / O device reading and writing data and the I / O device network ID is established by the master station driver module, including:
[0023] The control module of the master station driver module initiates an I / O device scan request and sends the scan request to the SDAP layer of the base station protocol stack through the Mcf interface. After being processed by the protocol stack, a wireless signal carrying the scan request is broadcast to each I / O device.
[0024] After the I / O device side protocol stack demodulates the scan request, it sends it to the device information management module of the slave station driver module through the Scf interface. The device information management module takes the device information as a response to the request. The device information management module sends the device information response to the SDAP layer of the I / O device side protocol stack through the Scf interface. After being processed by the protocol stack, a wireless signal carrying the device information response is sent to the base station; wherein the device information includes: I / O device hardware ID and I / O service parameter information;
[0025] After the protocol stack on the base station side demodulates the device information response, it sends the device information response and the network ID of the I / O device to which the device information response belongs to the control module of the master station driver module through the Mcf interface;
[0026] After receiving the device information and corresponding network ID of all I / O devices, the control module of the master station driver module records the correspondence between the hardware ID of the I / O device and the network ID, and sends the device information of all I / O devices to the PLC integrated development environment through the Mmd interface. The PLC integrated development environment generates a PLC program based on the device information of the I / O devices.
[0027] After the PLC integrated development environment generates the PLC program, it sends the PLC program to the PLC operating environment through the Dr interface. After the PLC operating environment loads the PLC program, it reads the I / O data uploaded by each I / O device from the input and output list. After executing the logical function of the PLC program, it writes the generated I / O data into the input and output list for the I / O device to read to realize the control function.
[0028] The PLC operating environment sends the corresponding relationship between the hardware ID of each I / O device and the address information of the read and write data of each I / O device, as well as the reading cycle of each I / O data, to the control module of the master station driver module through the MMR interface; after receiving the control module of the master station driver module, the mapping relationship between the address information of the read and write data of the I / O device and the network ID of the I / O device is established;
[0029] After the mapping relationship is established, the management and control module sends the mapping relationship and the reading cycle of each I / O data to the read-write module through the MMC interface.
[0030] Furthermore, after receiving the information, the control module of the master station driver module establishes a mapping relationship between the address information of the I / O device reading and writing data and the I / O device network ID, including:
[0031] Based on the correspondence between the I / O device hardware ID and the network ID recorded by the management and control module, and the correspondence between the received I / O device hardware ID and the address information of the I / O device read and write data, according to the uniquely determined I / O device hardware ID, a mapping relationship is established between the I / O device network ID bound to the hardware ID and the address information of the I / O device read and write data.
[0032] Further, the performing of the downlink I / O data sending operation according to the I / O data reading cycle and the established mapping relationship includes:
[0033] The read / write module of the master station driver module reads the I / O data from the input and output list of the PLC operating environment through the Mrw interface according to each I / O data reading cycle and the address information of the read data, and searches for the network ID of the corresponding I / O device according to the mapping relationship, and sends the I / O data and network ID to the MAC sublayer of the protocol stack on the base station side through the Mtr interface;
[0034] After receiving the data, the MAC sublayer of the protocol stack on the base station side generates a wireless signal with the received I / O data and network ID and sends it to the I / O device;
[0035] The protocol stack on the I / O device side receives the wireless signal and obtains the I / O data after decapsulating the MAC PDU at the MAC sublayer;
[0036] The service data transceiver module of the slave driver module obtains I / O data from the MAC sublayer of the protocol stack through the Str interface, and the microcontroller receives I / O data from the service data transceiver module through the Srw interface to complete the downlink I / O data sending operation.
[0037] Further, when the I / O device needs to upload I / O data, performing an uplink I / O data sending operation based on the established mapping relationship includes:
[0038] When the microcontroller has I / O data to upload, it sends the I / O data to the business data transceiver module of the slave driver module through the Srw interface, and the business data transceiver module sends the I / O data to the MAC sublayer of the protocol stack on the I / O device side through the Str interface;
[0039] The MAC sublayer of the protocol stack on the I / O device side receives the I / O data, generates a wireless signal from the received data, and sends it to the base station;
[0040] The protocol stack on the base station side receives the wireless signal, and the MAC sublayer decapsulates the MAC PDU to obtain the I / O data;
[0041] The read / write module of the master station driver module receives the I / O data and the network ID of the I / O device to which the I / O data belongs from the MAC sublayer of the protocol stack on the base station side through the Mtr interface, obtains the address information of the I / O device read / write data according to the mapping relationship, and writes the I / O data into the input and output list of the PLC operating environment through the Mrw interface;
[0042] The PLC program reads the I / O data and completes the upstream I / O data sending process.
[0043] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:
[0044] In an embodiment of the present invention, on the basis of an existing mobile communication base station, a PLC operating environment is integrated and deployed, and a master station driver module is added to establish a mapping relationship between the address information of the I / O device reading and writing data and the network ID of the I / O device, and based on the mapping relationship, the I / O data interaction between the PLC and the MAC sublayer of the protocol stack on the base station side is realized; at the same time, on the basis of the microcontroller and the mobile communication I / O device side protocol stack on the I / O device side, a slave station driver module is added, and the I / O data interaction between the microcontroller and the MAC sublayer of the protocol stack on the I / O device side is realized through the slave station driver module, thereby obtaining a new I / O data transmission system and method for directly transmitting data between the PLC and the I / O device based on the MAC sublayer of the mobile communication base station protocol stack. Such a system and method can realize the deep integration of the PLC and the mobile communication base station, simplify the data processing process, shorten the communication link between the PLC and the I / O device, thereby reducing the transmission delay and improving the transmission efficiency of industrial control business data. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0046] Figure 1 This is a schematic diagram of the mobile communication network architecture for cloud-based PLC industrial control scenarios;
[0047] Figure 2 A schematic diagram of the structure of a C2D communication system based on direct transmission of a base station MAC sublayer provided by an embodiment of the present invention;
[0048] Figure 3 A schematic flow chart of an I / O data communication method based on direct transmission of a base station MAC sublayer is provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0050] Embodiment 1
[0051] like Figure 2 As shown, an embodiment of the present invention provides a C2D communication system based on direct transmission of a base station MAC sublayer, including: a base station and an I / O device; wherein,
[0052] The base station is used to integrate and deploy the PLC operating environment and the master station driver module on the basis of the existing mobile communication base station side protocol stack, establish a mapping relationship between the address information of the I / O device reading and writing data and the I / O device network ID through the master station driver module, and realize data interaction between the PLC operating environment and the MAC sublayer of the base station side protocol stack based on the mapping relationship;
[0053] The I / O device is used to add a slave driver module based on the microcontroller and the mobile communication I / O device side protocol stack, and realize the I / O data interaction between the microcontroller and the MAC sublayer of the I / O device side protocol stack through the slave driver module.
[0054] In this embodiment, the base station is a mobile communication base station.
[0055] In this embodiment, Figure 2 As shown, the C2D communication system also includes: a PLC integrated development environment; wherein, the PLC integrated development environment is an existing functional module, responsible for receiving device information of each I / O device in the C2D system, and generating a PLC program according to the device information; wherein, the device information mainly includes: an I / O device hardware ID and I / O service parameter information, and may also include information such as a manufacturer's logo; wherein, the I / O device hardware ID may be a product code, product number, serial number, or other information that can uniquely identify the device.
[0056] In this embodiment, the I / O device hardware ID in the device information is used to describe the unique hardware identity information of the device, and the I / O business parameter information in the device information is used to describe the business function of the device. The device information is ultimately aggregated into the PLC integrated development environment for PLC program developers to write PLC programs based on the device information.
[0057] In this embodiment, the device data (I / O data) refers to the business data transmitted between the PLC and the I / O device after the configuration operation between the PLC and the I / O device is completed.
[0058] In order to better understand the present invention, the specific functions of the PLC operating environment, the master station driver module, the base station side protocol stack, the I / O device side protocol stack, the slave station driver module, the microcontroller and the related interfaces in the PLC system are described in detail:
[0059] 1) PLC operating environment
[0060] The PLC operating environment is the main component of the existing software PLC. It is a software system that runs on a real-time operating system. After the PLC operating environment is deployed on a general-purpose industrial server, the PLC program can be run to achieve the same functions as the hardware PLC. The PLC operating environment periodically completes the three steps of input processing, execution of PLC programs, and output processing; among them,
[0061] In the input processing stage, the PLC operating environment receives I / O data from the master station driver module and writes it into the input list.
[0062] The PLC program execution phase obtains data from the input list, executes the program's logical functions, and generates I / O data.
[0063] In the output processing stage, the I / O data generated by the PLC program is written into the output list and waits for the master station driver module to read it.
[0064] Based on the existing functions, the PLC operating environment needs to send the address information of the I / O device read and write data and the read cycle to the control module of the master station driver module.
[0065] 2) Master station driver module
[0066] The master station driver module is a new functional module that is used to establish a mapping relationship between the address information of the I / O device read and write data and the I / O device network ID, thereby realizing functions such as data interaction between the PLC operating environment and the MAC sublayer of the base station side protocol stack.
[0067] In this embodiment, the master station driver module includes: a control module and a read-write module; wherein,
[0068] The main functions of the control module include:
[0069] a) Responsible for sending device scan requests to I / O devices in the C2D system through the base station side protocol stack, and receiving device information responses sent by I / O devices;
[0070] b) Responsible for gathering the device information of all I / O devices in the C2D system and reporting the device information of all I / O devices to the PLC integrated development environment;
[0071] c) Responsible for receiving the address information of each I / O device reading and writing data and the reading cycle from the PLC operating environment; the address information of the I / O device reading and writing data is the address information of the I / O device reading and writing data in the input and output list of the PLC operating environment, and this information is specified in the PLC program.
[0072] d) Responsible for establishing the mapping relationship between the address information of the I / O device reading and writing data and the I / O device network identity ID;
[0073] e) Responsible for sending the mapping relationship between the address information of the I / O device read and write data and the I / O device network identity ID, as well as the reading cycle of the I / O data to the read and write module.
[0074] The main functions of the read-write module include:
[0075] a) Responsible for receiving the mapping relationship between the address information of the I / O device read and write data sent by the control module and the I / O device network identity ID, as well as the reading cycle of the I / O data;
[0076] b) Responsible for reading I / O data from the PLC operating environment input and output list according to the address information and reading cycle of the read data, and sending the I / O data and the network ID of the corresponding I / O device (for example, RNTI (Radio Network Temporary Identifier)) to the protocol stack MAC sublayer according to the mapping relationship;
[0077] c) Responsible for receiving I / O data and network ID from the MAC sublayer of the protocol stack, obtaining address information according to the mapping relationship, and writing the I / O data into the input and output list of the PLC operating environment.
[0078] 3) Base station side protocol stack
[0079] The base station side protocol stack is an existing function of the base station, responsible for providing mobile communication capabilities for the base station. Based on the existing functions, this embodiment adds a data interaction interface between the read-write module of the master station driver module and the MAC sublayer of the base station side protocol stack.
[0080] 4) I / O device side protocol stack
[0081] The I / O device side protocol stack is provided by the existing mobile communication module and is responsible for providing mobile communication capabilities for the I / O device. Based on the existing functions, this embodiment adds a data interaction interface between the read-write module of the slave station driver module and the MAC sublayer.
[0082] 5) Slave driver module
[0083] The slave driver module is a newly added functional module used to realize data interaction between the microcontroller and the MAC sublayer of the protocol stack on the I / O device side.
[0084] The slave station driver module includes: a device information management module and a service data transceiver module; wherein,
[0085] The main functions of the device information management module include:
[0086] a) Responsible for managing the device information of I / O devices;
[0087] b) Responsible for receiving device scanning requests sent by the base station;
[0088] c) Responsible for sending device information to the base station through the I / O device side protocol stack.
[0089] The business data transceiver module serves as a buffer between the microcontroller and the I / O device side protocol stack, and is responsible for receiving I / O data from the MAC sublayer of the I / O device side protocol stack and sending it to the microcontroller; and receiving I / O data from the microcontroller and sending it to the MAC sublayer of the I / O device side protocol stack.
[0090] 6) Microcontroller
[0091] The microcontroller is an existing functional module, which is responsible for receiving I / O data from the business data transceiver module of the slave drive module and completing the control function; and is responsible for sending the I / O data that needs to be sent to the PLC to the business data transceiver module of the slave drive.
[0092] 7) Interface
[0093] a) Dr interface
[0094] The existing interface between the PLC integrated development environment and the PLC operating environment is used for the PLC integrated development environment to send the PLC program to the PLC operating environment.
[0095] b) Pd interface
[0096] The interface between the PLC program and the input / output list in the PLC runtime environment is used by the PLC program to read or write I / O data in the input / output list.
[0097] c) Mcf interface
[0098] The interface between the control module of the master station driver module and the SDAP layer of the protocol stack on the base station side is used for the control module to send device scan requests and receive device information responses.
[0099] d) Mmd interface
[0100] A new interface between the PLC integrated development environment and the control module of the master station driver module is used for the control module to send device information to the PLC integrated development environment.
[0101] e) Mmr interface
[0102] A new interface between the PLC operating environment and the control module of the master station driver module is used by the PLC operating environment to send the address information of the I / O device read and write data, as well as the read cycle, to the control module.
[0103] f) Mmc interface
[0104] In the master station driver module designed in this solution, the interface between the control module and the read-write module is used for the control module to send the mapping relationship between the address information of the I / O device read and write data and the I / O device network identity ID to the read-write module, as well as the cycle of the I / O device reading data.
[0105] g) Mrw interface
[0106] A new interface between the master station driver module's read / write module and the PLC operating environment is used for the read / write module to read or write I / O data from the input / output list in the PLC operating environment.
[0107] h) Mtr interface
[0108] A new interface between the read / write module of the master station driver module and the MAC sublayer of the protocol stack on the base station side is used for the read / write module to send or receive I / O data.
[0109] i) Scf interface
[0110] The interface between the device information management module of the slave driver module and the SDAP layer of the I / O device side protocol stack is used for the device information management module to receive device scan requests and send device information responses.
[0111] j) Srw interface
[0112] A new interface between the service data transceiver module driven by the slave and the microcontroller is used to send I / O data to the microcontroller or receive I / O data from the microcontroller.
[0113] k) Str interface
[0114] A new interface between the service data transceiver module of the slave driver module and the MAC sublayer of the protocol stack on the I / O device side, used to send I / O data to the MAC sublayer or receive I / O data from the MAC sublayer.
[0115] l) Uu interface
[0116] Mobile communication interface between base station and I / O devices.
[0117] The C2D communication system based on direct transmission of the base station MAC sublayer described in the embodiment of the present invention integrates and deploys the PLC operating environment on the basis of the existing mobile communication base station, and adds a master station driver module to establish a mapping relationship between the address information of the I / O device reading and writing data and the network ID of the I / O device, and realizes the I / O data interaction between the PLC and the MAC sublayer of the protocol stack on the base station side based on the mapping relationship; at the same time, on the basis of the microcontroller and the mobile communication I / O device side protocol stack on the I / O device side, a slave station driver module is added, and the I / O data interaction between the microcontroller and the MAC sublayer of the protocol stack on the I / O device side is realized through the slave station driver module, thereby obtaining a new I / O data transmission system based on the direct data transmission of the MAC sublayer of the mobile communication base station protocol stack between the PLC and the I / O device. Such a system can realize the deep integration of the PLC and the mobile communication base station, simplify the data processing process, shorten the communication link between the PLC and the I / O device, thereby reducing the transmission delay and improving the transmission efficiency of industrial control business data.
[0118] Embodiment 2
[0119] The embodiment of the present invention further provides an I / O data communication method based on direct transmission of a base station MAC sublayer, comprising:
[0120] S101, the base station integrates and deploys a PLC operating environment and a master station driver module on the basis of a mobile communication base station side protocol stack, and adds a slave station driver module on the basis of a microcontroller and a mobile communication I / O device side protocol stack on the I / O device side; wherein, a mapping relationship between address information of I / O device read and write data and an I / O device network ID is established through the master station driver module to realize data interaction between the PLC operating environment and the MAC sublayer of the base station side protocol stack; and I / O data interaction between the microcontroller and the MAC sublayer of the I / O device side protocol stack is realized through the slave station driver module;
[0121] In this embodiment, the master station driving module includes: a management and control module and a read-write module; the slave station driving module includes: a device information management module and a business data transceiver module.
[0122] In this embodiment, firstly, based on the existing mobile communication technology, a mobile communication link is established between the base station and each I / O device in the integrated deployment PLC operating environment, so that both the base station and the I / O device have the ability to send and receive mobile communication wireless signals. On this basis, the operations in the configuration phase are performed, such as Figure 3 As shown, it mainly includes the following steps:
[0123] The control module of the master station driver module initiates an I / O device scan request, and sends the scan request to the SDAP layer of the base station side protocol stack through the Mcf interface. After the protocol stack processes it using the existing technology, it broadcasts a wireless signal carrying the scan request to each I / O device.
[0124] After the I / O device side protocol stack demodulates the scan request, it sends it to the device information management module of the slave station driver module through the Scf interface. The device information management module uses the device information as a response to the request. The device information management module sends the device information response to the SDAP layer of the I / O device side protocol stack through the Scf interface. After the protocol stack is processed by the prior art, a wireless signal carrying the device information response is sent to the base station; wherein the device information mainly consists of the I / O device hardware ID and I / O service parameter information, wherein the I / O device hardware ID can be the product code, serial number, and other information of the I / O device that can uniquely identify the device;
[0125] After the protocol stack on the base station side demodulates the device information response, it sends the device information response and the network ID of the I / O device to which the device information response belongs to the control module of the master station driver module through the Mcf interface; wherein the network ID may be RNTI;
[0126] After receiving the device information and corresponding network ID of all I / O devices, the control module of the master station driver module records the correspondence between the hardware ID of the I / O device and the network ID, and then sends the device information of all I / O devices to the PLC integrated development environment through the Mmd interface. The PLC integrated development environment generates a PLC program based on the device information of the I / O devices.
[0127] After the PLC integrated development environment generates the PLC program, it sends the program to the PLC operating environment through the Dr interface. After the PLC operating environment loads the PLC program, it reads the I / O data uploaded by each I / O device from the input and output list, executes the logical function of the PLC program, and then writes the generated I / O data into the input and output list for the I / O device to read to realize the control function.
[0128] Based on the above basic workflow, the PLC operating environment sends the corresponding relationship between the hardware ID of each I / O device and the address information of the read and write data of each I / O device, as well as the reading cycle of each I / O data, to the control module of the master station driver module through the Mmr interface;
[0129] After receiving the information, the control module of the master station driver module establishes a mapping relationship between the address information of the I / O device read and write data and the network ID of the I / O device; the specific implementation method is that based on the correspondence between the I / O device hardware ID and the network ID recorded by the control module, and the correspondence between the received I / O device hardware ID and the address information of the I / O device read and write data, according to the uniquely determined I / O device hardware ID, a mapping relationship is established between the I / O device network ID bound to the hardware ID and the address information of the I / O device read and write data, that is, the address information of the I / O device read and write data can be obtained through the network ID of the I / O device, and the network ID of the I / O device can also be obtained through the address information of the I / O device read and write data;
[0130] After the mapping relationship is established, the management and control module sends the mapping relationship and the reading cycle of each I / O data to the read-write module through the MMC interface, and the configuration phase is completed.
[0131] S102, performing a downlink I / O data sending operation according to the I / O data reading cycle and the established mapping relationship; Figure 3 As shown, the following steps may be specifically included:
[0132] The master station driven read / write module reads I / O data from the input / output list of the PLC operating environment through the Mrw interface according to each I / O data reading cycle and the address information of the read data, and searches for the network ID of the corresponding I / O device according to the mapping relationship, and then sends the I / O data and network ID to the MAC sublayer of the protocol stack on the base station side through the Mtr interface;
[0133] After receiving the data, the MAC sublayer of the protocol stack on the base station side operates according to the existing technologies of the MAC sublayer and the physical layer, that is, generates a MAC layer PDU containing the I / O data, allocates time-frequency resources for the PDU, writes the time-frequency resource location information into the downlink control information, and then scrambles the downlink control information according to the network ID of the I / O device. Finally, the physical layer generates a wireless signal based on the MAC layer PDU and the scrambled downlink control information and sends it to the I / O device.
[0134] The protocol stack on the I / O device side receives the wireless signal and obtains the I / O data after decapsulating the MAC PDU at the MAC sublayer according to the prior art;
[0135] The service data transceiver module of the slave driver module obtains I / O data from the protocol stack MAC sublayer through the Str interface, and then the microcontroller receives I / O data from the service data transceiver module through the Srw interface to complete the logical function of the program, that is, to complete the downlink I / O data transmission.
[0136] In this embodiment, when downlink I / O data is sent, the MAC sublayer of the protocol stack at the base station side directly receives the I / O data and sends the data to the target I / O device according to the mapping relationship.
[0137] S103, when the I / O device needs to upload I / O data, an uplink I / O data sending operation is performed based on the established mapping relationship; Figure 3 As shown, the following steps may be specifically included:
[0138] When the microcontroller has I / O data to upload, it sends the I / O data to the business data transceiver module of the slave driver module through the Srw interface, and then the business data transceiver module sends the I / O data to the MAC sublayer of the protocol stack on the I / O device side through the Str interface;
[0139] The MAC sublayer of the protocol stack on the I / O device side receives the I / O data, operates according to the existing technologies of the MAC sublayer and the physical layer, generates a wireless signal, and sends it to the base station;
[0140] The protocol stack on the base station side receives the wireless signal, and according to the existing technology, the MAC sublayer decapsulates the MAC PDU to obtain the I / O data. The read / write module driven by the master station receives the I / O data and the network ID of the I / O device to which the I / O data belongs from the MAC sublayer of the protocol stack through the Mtr interface, obtains the address information of the I / O device read and write data according to the mapping relationship, and writes the I / O data into the input and output list of the PLC operating environment through the Mrw interface;
[0141] The PLC program reads the I / O data and completes the logic function of the program, that is, completes the sending of upstream I / O data.
[0142] The I / O data communication method based on direct transmission of the base station MAC sublayer described in the embodiment of the present invention integrates and deploys the PLC operating environment on the basis of the existing mobile communication base station, and adds a master station driver module to establish a mapping relationship between the address information of the I / O device reading and writing data and the network ID of the I / O device, and realizes the I / O data interaction between the PLC and the MAC sublayer of the protocol stack on the base station side based on the mapping relationship; at the same time, on the basis of the microcontroller and the mobile communication I / O device side protocol stack on the I / O device side, a slave station driver module is added, and the I / O data interaction between the microcontroller and the MAC sublayer of the protocol stack on the I / O device side is realized through the slave station driver module, thereby obtaining a new I / O data transmission method based on direct data transmission of the MAC sublayer of the mobile communication base station protocol stack between the PLC and the I / O device, which can realize the deep integration of the PLC and the mobile communication base station, simplify the data processing process, shorten the communication link between the PLC and the I / O device, thereby reducing the transmission delay and improving the transmission efficiency of industrial control business data.
[0143] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A C2D communication system based on direct transmission of a base station MAC sublayer, characterized in that: include: Base stations and I / O devices; wherein, The base station is used to integrate and deploy the PLC operating environment and the master station driver module on the basis of the mobile communication base station side protocol stack, establish a mapping relationship between the address information of the I / O device reading and writing data and the I / O device network ID through the master station driver module, and realize data interaction between the PLC operating environment and the MAC sublayer of the base station side protocol stack based on the mapping relationship; The I / O device is used to add a slave driver module on the basis of the microcontroller and the mobile communication I / O device side protocol stack, and realize the I / O data interaction between the microcontroller and the MAC sublayer of the I / O device side protocol stack through the slave driver module; Wherein, the C2D communication system further includes: a PLC integrated development environment; The master station driving module includes: a control module and a read-write module; wherein, The control module is used to send an I / O device scan request to the I / O device in the C2D system through the base station side protocol stack, and receive the device information response sent by the I / O device; gather the device information of all I / O devices in the C2D system, and report the device information of all I / O devices to the PLC integrated development environment; receive the address information and read cycle of each I / O device read and write data from the PLC operating environment; establish a mapping relationship between the address information of the I / O device read and write data and the I / O device network ID; send the mapping relationship between the address information of the I / O device read and write data and the I / O device network ID, as well as the read cycle of the I / O data to the read and write module; The read / write module is used to receive the mapping relationship between the address information of the I / O device read / write data sent by the control module and the network ID of the I / O device, as well as the reading cycle of the I / O data; read the I / O data from the PLC operating environment input and output list according to the address information and the reading cycle of the read data, and send the I / O data and the network ID of the corresponding I / O device to the MAC sublayer of the base station side protocol stack according to the mapping relationship. After receiving the MAC sublayer of the base station side protocol stack, the received I / O data and network ID are generated into a wireless signal and sent to the I / O device. The I / O device side protocol stack receives the wireless signal and obtains the I / O data after the MAC sublayer decapsulates the MAC PDU; receives the I / O data and the network ID from the MAC sublayer of the base station side protocol stack, obtains the address information of the read data according to the mapping relationship, and writes the I / O data into the PLC operating environment input and output list; The slave station driver module includes: a device information management module and a service data transceiver module; The device information management module is used to manage the device information of the I / O device, including the I / O device hardware ID and I / O service parameter information; receive the device scan request sent by the base station; and send the device information to the base station through the I / O device side protocol stack; The service data transceiver module serves as a buffer between the microcontroller and the I / O device side protocol stack, and is used to receive I / O data from the MAC sublayer of the I / O device side protocol stack and send it to the microcontroller; and receive I / O data from the microcontroller and send it to the MAC sublayer of the I / O device side protocol stack. The MAC sublayer of the I / O device side protocol stack receives the I / O data, generates a wireless signal from the received data, and sends it to the base station. The base station side protocol stack receives the wireless signal, and the MAC sublayer decapsulates the MAC PDU to obtain the I / O data.
2. An I / O data communication method based on direct transmission of a base station MAC sublayer, characterized in that: include: The base station integrates and deploys the PLC operating environment and the master station driver module on the basis of the mobile communication base station side protocol stack, and adds a slave station driver module on the basis of the microcontroller and the mobile communication I / O device side protocol stack on the I / O device side; wherein, the mapping relationship between the address information of the I / O device read and write data and the I / O device network ID is established through the master station driver module to realize the data interaction between the PLC operating environment and the MAC sublayer of the base station side protocol stack; the I / O data interaction between the microcontroller and the MAC sublayer of the I / O device side protocol stack is realized through the slave station driver module; Execute a downlink I / O data sending operation according to the I / O data reading cycle and the established mapping relationship; When the I / O device needs to upload I / O data, an uplink I / O data sending operation is performed based on the established mapping relationship; Wherein, the master station driving module includes: a control module and a read-write module; The slave station driving module includes: a device information management module and a service data transceiver module; The mapping relationship between the address information of the I / O device reading and writing data and the I / O device network ID is established by the master station driver module, including: The control module of the master station driver module initiates an I / O device scan request and sends the scan request to the SDAP layer of the base station protocol stack through the Mcf interface. After being processed by the protocol stack, a wireless signal carrying the scan request is broadcast to each I / O device. After the I / O device side protocol stack demodulates the scan request, it sends it to the device information management module of the slave station driver module through the Scf interface. The device information management module takes the device information as a response to the request. The device information management module sends the device information response to the SDAP layer of the I / O device side protocol stack through the Scf interface. After being processed by the protocol stack, a wireless signal carrying the device information response is sent to the base station; wherein the device information includes: I / O device hardware ID and I / O service parameter information; After the protocol stack on the base station side demodulates the device information response, it sends the device information response and the network ID of the I / O device to which the device information response belongs to the control module of the master station driver module through the Mcf interface; After receiving the device information and corresponding network ID of all I / O devices, the control module of the master station driver module records the correspondence between the hardware ID of the I / O device and the network ID, and sends the device information of all I / O devices to the PLC integrated development environment through the Mmd interface. The PLC integrated development environment generates a PLC program based on the device information of the I / O devices. After the PLC integrated development environment generates the PLC program, it sends the PLC program to the PLC operating environment through the Dr interface. After the PLC operating environment loads the PLC program, it reads the I / O data uploaded by each I / O device from the input and output list. After executing the logical function of the PLC program, it writes the generated I / O data into the input and output list for the I / O device to read to realize the control function. The PLC operating environment sends the corresponding relationship between the hardware ID of each I / O device and the address information of the read and write data of each I / O device, as well as the reading cycle of each I / O data, to the control module of the master station driver module through the MMR interface; after receiving the control module of the master station driver module, the mapping relationship between the address information of the read and write data of the I / O device and the network ID of the I / O device is established; After the mapping relationship is established, the control module sends the mapping relationship and the reading cycle of each I / O data to the read-write module through the Mmc interface; The performing of the downlink I / O data sending operation according to the I / O data reading cycle and the established mapping relationship includes: The read / write module of the master station driver module reads the I / O data from the input and output list of the PLC operating environment through the Mrw interface according to each I / O data reading cycle and the address information of the read data, and searches for the network ID of the corresponding I / O device according to the mapping relationship, and sends the I / O data and network ID to the MAC sublayer of the protocol stack on the base station side through the Mtr interface; After receiving the data, the MAC sublayer of the protocol stack on the base station side generates a wireless signal with the received I / O data and network ID and sends it to the I / O device; The protocol stack on the I / O device side receives the wireless signal and obtains the I / O data after decapsulating the MAC PDU at the MAC sublayer; The service data transceiver module of the slave driver module obtains I / O data from the MAC sublayer of the protocol stack through the Str interface, and the microcontroller receives I / O data from the service data transceiver module through the Srw interface to complete the downlink I / O data sending operation; Wherein, when the I / O device needs to upload I / O data, performing an uplink I / O data sending operation based on the established mapping relationship includes: When the microcontroller has I / O data to upload, it sends the I / O data to the business data transceiver module of the slave driver module through the Srw interface, and the business data transceiver module sends the I / O data to the MAC sublayer of the protocol stack on the I / O device side through the Str interface; The MAC sublayer of the protocol stack on the I / O device side receives the I / O data, generates a wireless signal from the received data, and sends it to the base station; The protocol stack on the base station side receives the wireless signal, and the MAC sublayer decapsulates the MAC PDU to obtain the I / O data; The read / write module of the master station driver module receives the I / O data and the network ID of the I / O device to which the I / O data belongs from the MAC sublayer of the protocol stack on the base station side through the Mtr interface, obtains the address information of the I / O device read / write data according to the mapping relationship, and writes the I / O data into the input and output list of the PLC operating environment through the Mrw interface; The PLC program reads the I / O data and completes the upstream I / O data sending process.
3. The I / O data communication method based on direct transmission of the base station MAC sublayer according to claim 2, characterized in that: After receiving the information, the control module of the master station driver module establishes a mapping relationship between the address information of the I / O device reading and writing data and the I / O device network ID, including: Based on the correspondence between the I / O device hardware ID and the network ID recorded by the management and control module, and the correspondence between the received I / O device hardware ID and the address information of the I / O device read and write data, according to the uniquely determined I / O device hardware ID, a mapping relationship is established between the I / O device network ID bound to the hardware ID and the address information of the I / O device read and write data.
