Disclosure of Invention
The embodiment of the invention provides an IO-LINK master station device and method supporting multiple buses, which aim to solve the problem that the mode of integrating IO-LINK into various field buses is complex, and an original control system is required to be changed when old equipment is upgraded, so that the upgrading and reconstruction of the old equipment are not facilitated. In addition, the existing IO-LINK equipment configuration tool (PDCT) is usually connected with the IO-LINK master station in a wired mode such as USB, configuration work is needed in an industrial field, and operation is inconvenient.
In a first aspect, an IO-LINK master station device supporting multiple buses includes an industrial ethernet module, a CAN bus interface module, an RS485 communication module, an IO-LINK master station physical layer communication module, a central processing module, and a wireless communication module; the industrial Ethernet module is connected to the central processing module through an MII interface mode; the CAN communication module is connected to the central processing module through a UART interface; the RS485 communication module is connected to the central processing module through a UART interface; the wireless communication module is connected with the central processor by adopting a UART interface.
Further, the industrial Ethernet module comprises a data link interface unit, an Ethernet physical layer chip, a network transformer and RJ45 interface or a photoelectric conversion optical Ethernet; the Ethernet physical layer chip, the network transformer and the RJ45 interface are responsible for receiving and transmitting Ethernet physical layer messages of the physical layer; the data link interface unit operates a data link layer of the industrial ethernet.
Further, the central processing module comprises a microprocessor, a RAM memory, ROM, flash, MMCD and peripheral circuits.
Further, the wireless communication module communicates in a wireless Ethernet mode and exchanges data with the server by adopting an MQTT protocol.
In a second aspect, an embodiment of the present invention provides a method for supporting an IO-LINK master station with multiple buses, where the method is executed by the IO-LINK master station, and specifically includes:
reading device parameters of the IO-LINK device, and checking the parameters of the IO-LINK device;
determining the type of the field bus according to the state of the DIP switch by the equipment parameter;
according to the determined field bus type, establishing a periodic data agent facing the field bus; the controller on the field bus addresses corresponding process data through the equipment address and the SLOT and the subSLOT in the equipment parameters, so that the periodic data is read;
establishing an aperiodic data proxy with a server in a wireless connection mode;
transmitting the device parameters acquired from the IO-LINK device to the server; the device parameters sent to the server are used for enabling the server to automatically generate a field bus device description file of the IO-LINK master station; the field bus device description file is used for enabling the controller PLC or PAC to read periodic data on the IO-LINK master station through the field bus; the device parameters sent to the server also enable the terminal device to set and debug the device parameters of the IO-LINK device through wireless connection with the server.
Further, before the step of reading the device parameters of the IO-LINK device and performing parameter checking of the IO-LINK device, the method further includes: initializing an IO-LINK communication module, loading an IO-LINK protocol stack and an IO-LINK port.
Further, the IO-LINK master station is connected to the proxy server according to the mode that the terminal equipment adopts the first MQTT to communicate with the proxy server through registering event reply theme, direct parameter access theme and ISDU parameter access theme.
Further, the step of establishing an aperiodic data proxy with the server by means of a wireless connection further comprises: initializing a wireless communication module, connecting to a proxy server in a second MQTT mode, and registering a subscription theme; wherein the subscription topic comprises: device parameter theme, event theme, direct parameter reply theme, ISDU parameter reply theme.
Further, the DIP switch is composed of 3 2-bit systems, 3 groups representing 0-7 total 8 digits, each representing a fieldbus protocol stack type.
The embodiment of the invention has the following beneficial effects:
1. an apparatus for supporting an IO-LINK master station of a multi-bus includes: a data link layer module and a physical layer module supporting a plurality of industrial Ethernet; a Can data link layer and physical layer module supporting DeviceNet and Canopen; and a data link layer and physical layer communication module supporting Profibus DP and Modbus. And a wireless communication module supporting wifi or bluetooth.
2. IO-LINK device information is transmitted separately: the process data information is transmitted to a control device such as a PLC or PAC through an industrial Ethernet and a field bus, the device debugging and event information is transmitted to a remote server through a wireless module, and the server is responsible for processing and forwarding to mobile terminal devices. The parameters are configured by the field personnel at the PDCT tool of the mobile terminal. This way, it is not necessary to add events or configuration codes on the control device PLC or IPC, but rather to process events and configuration information through additional wireless network channels.
3. The remote server is responsible for forwarding event, diagnostic and control information of the IO-LINK device. The system can be integrated into an MES system in an OPC server mode, and can be forwarded to a mobile equipment end for field personnel to perform equipment configuration and control on site.
4. The PDCT tool of the wireless mobile terminal can be connected with a server running on a local area network or a cloud end in a wireless communication mode through the mobile PDCT tool. The IO-LINK master station is communicated in the mode, so that the parameter configuration and the debugging of the IO-LINK equipment are performed. The operation of field personnel is convenient, and the field personnel can debug the IO-LINK equipment, configure parameters and the like without entering the field.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
First embodiment of the present invention:
referring to fig. 1, fig. 1 is a schematic structural diagram of an apparatus for supporting a multi-bus IO-LINK master station according to the present invention. The invention aims to solve the problem of multi-bus coexistence faced by the existing IO-LINK master station, provides an IO-LINK master station device supporting multi-buses, and provides a scheme for smoothly transitioning the existing IO equipment to the IO-LINK equipment, and the scheme can keep the technical advantages of most IO-LINKs in the aspects of diagnosis, configuration and installation. And wireless communication is utilized on the IO-LINK master station, so that diagnosis and configuration of equipment can be flexibly completed by mobile handheld equipment.
The embodiment of the invention provides a device for supporting a multi-bus IO-LINK master station, which specifically comprises: the system comprises an industrial Ethernet module, a CAN bus interface module, an RS485 communication module, an IO-LINK master station physical layer communication module, a central processing module and a wireless communication module. Wherein, the central processing module is provided with a plurality of UART interfaces; the industrial Ethernet module is connected to the central processing module through an MII interface mode; the CAN communication module is connected to the central processing module through a UART interface; the RS485 communication module is connected to the central processing module through a UART interface; the wireless communication module is connected with the central processor by adopting a UART interface.
The IO-LINK master station communicates with the master control device through a field bus and exchanges periodic data. In this embodiment, the process data is also called periodic data, and the event, diagnosis, and control data is also called aperiodic data.
The industrial Ethernet module comprises a data link interface unit, an Ethernet physical layer chip, a network transformer and RJ45 interface or an optical Ethernet through photoelectric conversion. The Ethernet physical layer chip, the network transformer and the RJ45 interface are responsible for the Ethernet physical layer message transceiving of the physical layer. The data link interface unit runs the data link layer of the industrial Ethernet and can support industrial Ethernet bus communication such as Profinet, powerLink, etherCAT, ethernet/IP, modbus/TCP and the like under the control of software. The above protocol stack of the industrial ethernet is run in the central processing module, thereby supporting industrial ethernet communication. The data link layer unit of the industrial ethernet may be implemented using a PRU-ICSS unit in the sitara processor of Ti, which may support various industrial ethernet by programming, and the data link layer unit of the ethernet and the central processing unit may be integrated together, thereby reducing PCB overhead.
The CAN bus interface module comprises a CAN physical layer transceiver and related circuits. The CAN bus interface module is used for realizing the support of a CANOpen, deviceNet physical layer and a data link layer and running a protocol stack supporting CANOpen, deviceNet in the central processing unit module. The CAN interface may be implemented with a CAN controller integrated into a microprocessor or a separate CAN physical layer transceiver such as ISO 1050T.
The RS485 communication module consists of a 485 communication isolation transceiver and an accessory circuit, and the isolation transceiver adopts ISO1176T. The RS485 communication module is used for supporting physical layer and data link layer communication of Profibus and Modbus, and a communication protocol stack supporting Profibus and Modbus is operated in the central processing module.
The wireless communication module communicates in a WIFI mode, a Bluetooth mode, a GPRS mode and the like, and the wireless communication module can communicate with a server in the local area network in a transmission mode. For example: ESP8266 is used for communication.
The central processing module comprises a microprocessor, a RAM memory, a ROM, a Flash, an MMCD and the like and peripheral circuits. The central processing module runs a real-time operating system such as vxWorks, freeRTOS, TI-RTOS, ucOS, QNX and a real-time patched Linux system. The main controller operates the following tasks: the protocol stack of a certain field bus, the protocol stack of the IO-LINK master station, the protocol conversion task, the wireless communication task, the parameter synchronization and storage task and the master control state management.
The IO-LINK master station is connected to the local area network through the wireless communication module and the wireless router on site, and is responsible for processing and forwarding by a server or a cloud server of the local area network. The information communicated over the wireless channel is event, diagnostic and control information. The monitoring or alarming function is operated on the server, when the IO equipment is damaged, the monitoring or alarming function can alarm in real time and remind field personnel to process, and meanwhile, the server can be accessed to the MES system of the factory through an OPC or OPC UA interface. In addition, field personnel communicate with the server through the mobile equipment, the mobile equipment can receive alarm information of the server, and the mobile APP can have a PDCT function and can configure IO-LINK equipment.
The hardware of the IO-LINK master station consists of a central processing module and a communication module. The central processing module comprises a microprocessor and a memory. The communication module comprises an industrial Ethernet module, a CAN bus interface module, an RS485 communication module, a wireless communication module and an IO-LINK master station physical layer communication module.
The IO-LINK module consists of a digital isolation module, an IO-LINK master station physical layer transceiver module and an accessory circuit, wherein the digital isolation module adopts Max14931, the IO-LINK master station physical layer transceiver module adopts Max14819, a central processor is connected with the digital isolation module through an SPI interface, 4 Max14819 SPI is connected, and each Max14819 can support two paths of IO-LINK communication.
The communication modules are divided into three major parts: the first part is an IO-LINK master station physical layer communication module, and the IO-LINK master station is connected with the field executor and the sensor and is used for transmitting periodic data and non-periodic data of field IO-LINK equipment; the second part is field bus communication, which comprises an industrial Ethernet communication module, a CAN bus interface module and an RS485 communication module. Only one field bus can be used for communication at the same time, and the communication is adopted to collect the 1-3 bit state of the DIP switch when the power-on is started. The field bus part transmits periodic data generated by IO-LINK communication to the field bus for the controller to use; the third part is a wireless communication part, and the wireless communication part transmits the aperiodic data such as debugging, events, alarms and configuration information transmitted by the IO-LINK master station physical layer communication module to the network server.
Second embodiment of the present invention:
on the basis of the first embodiment, referring to fig. 2 to fig. 4, fig. 2 is a schematic flow diagram of a method for supporting a multi-bus IO-LINK master station provided by the present invention, fig. 3 is a schematic flow diagram for starting a multi-bus IO-LINK master station provided by the present invention, and fig. 4 is a schematic flow diagram for supporting an integrated structure of a multi-bus IO-LINK master station provided by the present invention. A method of an IO-LINK master station supporting multiple buses, the method being performed by the IO-LINK master station and comprising:
s10, reading device parameters of the IO-LINK device, and checking the parameters of the IO-LINK device.
Referring to fig. 3, when a power-on start program is started, hardware is initialized, an IO-LINK communication module is initialized, an IO-LINK protocol stack is loaded, an IO-LINK port is scanned, parameters of an IO-LINK device are read, and parameter inspection of the IO-LINK device is performed.
In the IO-LINK master station, a process image area with the size of 66 bytes is defined for each IO-LINK device, wherein 32 bytes are used as a read process image area, 32 bytes are used as a write process image area, 1 byte stores the read process image area property, and 1 byte stores the write process image area property. The data property occupies one byte, the data property is divided into validity and data type of the data, the validity of the data is marked by the highest bit of the byte, 0 marks the validity of the data, and 1 indicates that the data is invalid. The data type may be BIT, UINT8, UINT16, UINT32, float, double, etc. Each data type is encoded with the lower 7 bits of the data property. And configuring parameters of the IO-LINK equipment according to the PDCT tool, and determining the data type.
S20, determining the field bus type according to the device parameters through the state of the DIP switch.
DIP1-3 constitutes 3 2-ary bits, which may represent 0-7 for a total of 8 digits, each representing a fieldbus protocol stack type. The type of field bus used is determined by the state of the DIP switch, e.g. the Profinet protocol stack is selected when DIP1-3 is 0. Different field bus types will load different drivers and protocol stacks for different communication modules. For industrial ethernet modules, the MAC layer of industrial ethernet is implemented using a PRU coprocessor integrated inside the Sitara processor. The fieldbus types include: profinet protocol stack, ethernet/IP protocol stack, powerlink protocol stack, ethercat protocol stack, modbus/TCP protocol stack, CANOPEN protocol stack, deviceNet protocol stack, profibus protocol stack, modbus protocol stack.
S30, according to the determined field bus type, establishing a periodic data agent facing the field bus. The controllers on the field bus address the corresponding process data via the device address and SLOT and subsslot in the device parameters, thereby reading the periodic data.
After checking the IO-LINK device parameters, a process data agent facing the field bus is established according to the connected IO-LINK device. If Profinet is adopted, a SLOT is set to represent an IO-LINK master station, a subSlot is set for each IO-LINK device, and process data of each IO-LINK device are mapped in the subSlot. The controller on the Profinet bus can be addressed to the corresponding process data via the IO-LINK device address and the SLOT and subsslot, thereby reading the periodicity.
S40, establishing an aperiodic data proxy with the server in a wireless connection mode.
The wireless module ESP8266 is initialized and connected to the proxy server in a WIFI mode, the ESP8266 module integrates a TCP/IP protocol and an MQTT protocol, and the theme is registered and subscribed in the MQTT mode.
The subject of registration is: device parameter theme, event theme, direct parameter reply theme, ISDU parameter reply theme.
The topics of subscription are: the device parameters confirm the theme, the event reply theme, the direct parameter access theme, and the ISDU parameter access theme.
S50, sending the device parameters acquired from the IO-LINK device to the server; the device parameters sent to the server are used for enabling the server to automatically generate the field bus device description file of the IO-LINK master station.
The field bus device description file is used for enabling the controller PLC or PAC to read periodic data on the IO-LINK master station through the field bus; the device parameters sent to the server also enable the terminal device to set and debug the device parameters of the IO-LINK device through wireless connection with the server.
According to the parameters scanned by the IO-LINK equipment, the equipment parameters are sent to the proxy server through the equipment parameter theme of the MQTT channel, and the server can automatically generate a field bus equipment description file of the IO-LINK master station according to the sent parameters. According to the device description file generated above, configuration can be performed on the field bus, so that the process data on the IO-LINK master station can be read through the field bus by the controller PLC or PAC. Any PDCT configuration tool at the mobile terminal or the PC terminal can be connected to the proxy server in an MQTT mode, and can communicate with the IO-LINK master station through a registration event reply theme, a direct parameter access theme and an ISDU parameter access theme. Through the communication mechanism, the PDCT can be used for setting and debugging the device parameters of the IO-LINK.
It should be noted that the above-described apparatus embodiments are merely illustrative, and the units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the drawings of the embodiment of the device provided by the invention, the connection relation between the modules represents that the modules have communication connection, and can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that changes and modifications may be made without departing from the principles of the invention, such changes and modifications are also intended to be within the scope of the invention.