CN214042097U - PLC serial port communication extension module capable of customizing protocol - Google Patents

PLC serial port communication extension module capable of customizing protocol Download PDF

Info

Publication number
CN214042097U
CN214042097U CN202023175694.2U CN202023175694U CN214042097U CN 214042097 U CN214042097 U CN 214042097U CN 202023175694 U CN202023175694 U CN 202023175694U CN 214042097 U CN214042097 U CN 214042097U
Authority
CN
China
Prior art keywords
serial port
microcontroller
communication
plc
interface circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202023175694.2U
Other languages
Chinese (zh)
Inventor
张�杰
杨万应
陈正刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Aotuo Technology Co Ltd
Original Assignee
Aotuo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Aotuo Technology Co Ltd filed Critical Aotuo Technology Co Ltd
Priority to CN202023175694.2U priority Critical patent/CN214042097U/en
Application granted granted Critical
Publication of CN214042097U publication Critical patent/CN214042097U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The utility model discloses a PLC serial ports communication extension module of self-defined agreement relates to the information transfer field. The PLC serial port communication extension module capable of customizing the protocol is provided, and the system can meet more communication requirements while hardware design difficulty and cost are reduced by using a simpler bare computer design framework. The system comprises a microcontroller, an internal bus communication unit, an external equipment communication unit, an Ethernet firmware upgrading and debugging unit and an auxiliary unit; the microcontroller comprises an internal data area, a data exchange area and a serial port data area. The system can be managed in a bare computer mode, coordinates the parallel communication of multiple paths of serial port equipment, is compatible with a user-defined communication protocol and a standard communication protocol, enables the use of a serial port communication module to be more universal and extensive, can adapt to more industrial fields, and meets more communication requirements.

Description

PLC serial port communication extension module capable of customizing protocol
Technical Field
The utility model relates to an information transfer field especially relates to the bus communication technique of serial devices such as microcontroller and PLC and other instruments.
Background
The serial communication module is used as an extended communication module of the PLC, and is widely applied to a PLC system due to the characteristics of maturity, reliability, simplicity and easiness in use. However, due to the complexity of industrial application, PLC systems are increasingly connected with more and more serial devices. And because many serial port equipments are in order to simplify the transmission protocol, guarantee the security of the transmission data, and do not use the standard serial port communication protocol, this makes the serial port communication protocol also different, have limited the commonality of the serial port communication module to a certain extent. Meanwhile, in order to meet the parallel operation of different serial communication protocols, the serial communication module often needs to complete the transmission process of different communication protocols in a form of multiple threads on a software platform carrying an operating system, but the operating system has higher requirements on hardware resources and can occupy certain system hardware resources, so that the cost and difficulty of hardware design are improved to a certain extent.
SUMMERY OF THE UTILITY MODEL
The utility model discloses to above problem, provided one kind with lower cost, simpler bare engine design framework, when reducing the hardware design degree of difficulty and cost, but the assurance system satisfies the PLC serial ports communication extension module of more communication demands's customized agreement.
The technical scheme of the utility model is that: the system comprises a microcontroller, an internal bus communication unit, an external equipment communication unit, an Ethernet firmware upgrading and debugging unit and an auxiliary unit;
the microcontroller comprises an internal data area, a data exchange area and a serial port data area, and data in the serial port data area and the internal data area are converted into each other through the data processing exchange area; and the serial port data area in the microcontroller is connected with the external equipment communication unit, the Ethernet firmware upgrading and debugging unit and the auxiliary unit.
The microcontroller adopts an LPC1758 microcontroller.
The internal bus communication unit comprises a high-speed HIN bus, and the microcontroller is connected with a CPU module of the PLC through the high-speed HIN bus.
The external equipment communication unit comprises an RS232 interface circuit based on MAX202EESE and an RS485 interface circuit based on SN75LBC184D, and the RS232 interface circuit and the RS485 interface circuit are both connected with the microcontroller.
And the RS232 interface circuit, the RS485 interface circuit and the microcontroller are electrically isolated by adopting 6N137 high-speed optocouplers.
The Ethernet firmware upgrade debugging unit comprises a DP83848C PHY chip, and the DP83848C PHY chip supports an RMII interface; the DP83848C PHY chip receiving and transmitting circuit respectively adopts a pair of differential circuits, and the two pairs of differential circuits are connected with the RJ45 interface circuit through a network transformer.
The utility model discloses mainly to the industrial field, realize the data communication problem of serial devices such as PLC controller and external instrument demonstration. The system can be managed in a bare computer mode, coordinates the parallel communication of multiple paths of serial port equipment, is compatible with a user-defined communication protocol and a standard communication protocol, enables the use of a serial port communication module to be more universal and extensive, can adapt to more industrial fields, and meets more communication requirements.
Drawings
FIG. 1 is a schematic structural diagram of the present application,
figure 2 is a circuit block diagram of a microcontroller,
figure 3 is a circuit block diagram of a PHY chip in an ethernet firmware upgrade debug unit,
figure 4 is a circuit block diagram of a network transformer and RJ45 interface circuit in an ethernet firmware upgrade debugging unit,
figure 5 is a circuit block diagram of a high speed optical coupler between the RS232 interface circuit and the microcontroller,
figure 6 is a circuit block diagram of an RS232 interface circuit,
figure 7 is a circuit block diagram of a high speed optocoupler between the RS485 interface circuit and the microcontroller,
fig. 8 is a circuit configuration diagram of the RS485 interface circuit.
Detailed Description
In order to clearly explain the technical features of the present patent, the following detailed description of the present patent is provided in conjunction with the accompanying drawings.
The utility model, as shown in fig. 1-8, comprises a microcontroller, an internal bus communication unit, an external device communication unit, an ethernet firmware upgrading and debugging unit and an auxiliary unit;
the microcontroller comprises an internal data area, a data exchange area and a serial port data area, and data in the serial port data area and the internal data area are converted into each other through the data processing exchange area; and the serial port data area in the microcontroller is connected with the external equipment communication unit, the Ethernet firmware upgrading and debugging unit and the auxiliary unit.
The internal bus communication unit is used for receiving the configuration information and completing data exchange with a CPU module of the PLC; data exchange with external serial port equipment is completed through an external serial port equipment communication unit, and three communication modes of a Modbus master station, a Modbus slave station and custom communication are provided; the upgrading of module firmware and the downloading and debugging of partial configuration information are completed through the Ethernet firmware upgrading unit; and other auxiliary functions such as module state display and the like are realized through the auxiliary unit.
The present case is mainly to industrial field, realizes the data communication problem of serial devices such as PLC controller and external instrument demonstration. The system can be managed in a bare computer mode, coordinates the parallel communication of multiple paths of serial port equipment, is compatible with a user-defined communication protocol and a standard communication protocol, enables the use of a serial port communication module to be more universal and extensive, can adapt to more industrial fields, and meets more communication requirements.
As shown in fig. 2, the microcontroller adopts an NXP LPC1758 microcontroller, maximally supports 4-channel serial ports, supports two level standards of RS232 and RS485 for external serial ports, and meets application requirements of various occasions.
The microcontroller adopts LPC1758 microcontroller based on Cortex-M3, the system clock of microcontroller supports 100MHz to the maximum, the microcontroller supports 4 way UART and satisfies the system demand, has 512K's Flash, 64K's SRAM to satisfy the resource demand that the system adopted bare engine framework.
LPC1758 supports a working temperature of-40 ℃ to +105 ℃, and ensures the application of the system in a harsh industrial environment. The minimum system mainly comprises a basic crystal oscillator circuit, a reset circuit, a download circuit and a power supply circuit, as shown in the following figure. The power supply circuit provides a 3.3V working power supply for the system, the crystal oscillator circuit provides a clock signal required by the normal work of the system, the reset circuit ensures that the system is powered on and reset, meanwhile, a hardware watchdog is additionally arranged on the system from hardware, the system can be ensured to be reset in time when a fault or a dead halt occurs, the download circuit supports JTAG download, and the download and debugging of the program are effectively facilitated.
The internal bus communication unit comprises a high-speed HIN bus, and the microcontroller is connected with a CPU module of the PLC through the high-speed HIN bus. The CPU module sends data in a certain data frame format, the data frame comprises configuration information, data information and the like required by the module, the internal bus communication unit reconfigures each serial port according to the configuration information by analyzing the configuration information and the data information of a certain block of the CPU, and writes the configuration information of each serial port communication message into a corresponding data configuration area of each serial port for the external equipment communication unit to analyze and call. The data information comprises uplink data information and downlink data information, which are organized together in a certain frame format and uploaded to a PLC CPU or issued to a serial port module. The serial port communication module executes corresponding function operation according to the received different command function codes and responds to the CPU module. Firstly, the configuration command can be sent by the PLC CPU module only when the serial port module is powered on for the first time or disconnected and reconnected, the configuration information can not be received when the subsequent serial port module works normally, the configuration information comprises serial port configuration parameters, the size and the type of an input/output area, information such as each serial port and a communication protocol corresponding table, a communication protocol command and the like, the module analyzes the configuration information, all basic configurations are completed, and the system operation is started. Secondly, the data command not only contains a control command, but also contains data information, the data to be issued by the PLC CPU is issued through the data command, meanwhile, the serial port module analyzes the data command and the data therein, and packs each serial port data in a fixed frame format, starts the transmission of uplink data, and completes the interaction of the data. And finally, the query command and other commands are auxiliary commands, and the query command mainly informs the PLC CPU of the working state information of the current serial port module, so that the PLC CPU can conveniently manage the serial port communication module. Other commands are mainly time setting commands and the like, and the consistency of the time reference of the whole system is ensured.
As shown in fig. 5-8, in order to adapt to more applications and support more level standards, the external device communication unit includes an RS232 interface circuit based on MAX202EESE and an RS485 interface circuit based on SN75LBC184D, and meanwhile, to avoid the influence of an external circuit on the internal circuit of the system, the RS232 interface circuit and the RS485 interface circuit are both connected to the microcontroller, and both are electrically isolated from the microcontroller by using a 6N137 high-speed optical coupler, so as to prevent the external circuit from damaging the internal circuit due to factors such as interference.
The RS232 interface circuit and the RS485 interface circuit are both powered by 5V, the microcontroller outputs serial port data through a serial port, TTL level signals output by the microcontroller output 01 signals through the isolation optocoupler, the 01 signals of the TTL levels are input to MAX202EESE and SN75LBC184D data input ends, the MAX202EESE converts the input TTL signals into 232 level standard output through an internal circuit, and simultaneously, the externally received 232 levels are received and converted into TTL levels to be input to the isolation optocoupler. Similarly, the SN75LBC184D converts the TTL level to the 485 level, and converts the 485 level to the TTL level for the internal circuit to recognize and convert, thereby completing the transmission and conversion of data with different levels.
The external equipment communication unit can independently operate different communication protocols and support Modbus master-slave and custom communication protocols. The Modbus master-slave standard protocol is solidified in the software, does not support modification, only needs to be configured through a simple Modbus protocol command, and issues a configuration file to a configuration area corresponding to an internal Flash, and the module is electrified to analyze the configuration file, and receives and transmits serial port data according to the configuration file through the standard Modbus master-slave communication protocol, so that Modbus master-slave communication is realized. The user-defined communication protocol needs to be realized by user-defined programming, and a system self-defined programming function library is provided for the user to use in programming in order to facilitate the user-defined programming.
The Ethernet firmware upgrading and debugging unit comprises a DP83848C PHY chip, and the DP83848C PHY chip supports an RMII interface, so that system IO ports are saved; the DP83848C PHY chip receiving and transmitting circuit respectively adopts a pair of differential circuits, so that the interference of common mode signals is effectively inhibited, the two pairs of differential circuits are connected with the RJ45 interface circuit through a network transformer, and the network transformer can realize impedance matching and network isolation and effectively ensure the stability of network connection.
As shown in fig. 3-4, the DP83848C PHY chip is connected to the LPC1758 MAC controller through the RMII interface, the DP83848C chip provides a 50MHz working clock by the active crystal oscillator, and simultaneously supports 10/100Mbps communication rate, the MAC controller transmits 2bit data at a time, and outputs two pairs of differential signals TD +, TD-, RD +, RD-, which are connected to the RJ45 through the ethernet transformer H1102. When receiving data, the data is input into the PHY through the Ethernet transformer, the MAC controller reads the data from the RXD _1 and the RXD _0, and the data is quickly read and stored through the internal DMA controller, so that the system can conveniently download system configuration files, upgrade system software and the like through the Ethernet interface.
The present invention has many specific implementation ways, and the above description is only the preferred embodiment of the present invention, it should be noted that, for those skilled in the art, a plurality of improvements can be made without departing from the principles of the present invention, and these improvements should also be regarded as the protection scope of the present invention.

Claims (6)

1. A PLC serial port communication extension module capable of self-defining a protocol is characterized by comprising a microcontroller, an internal bus communication unit, an external device communication unit, an Ethernet firmware upgrading and debugging unit and an auxiliary unit;
the microcontroller comprises an internal data area, a data exchange area and a serial port data area, and data in the serial port data area and the internal data area are converted into each other through the data processing exchange area; and the serial port data area in the microcontroller is connected with the external equipment communication unit, the Ethernet firmware upgrading and debugging unit and the auxiliary unit.
2. The PLC serial port communication extension module of claim 1, wherein the microcontroller is an LPC1758 microcontroller.
3. The PLC serial port communication extension module capable of customizing the protocol according to claim 1, wherein the internal bus communication unit comprises a high-speed HIN bus, and the microcontroller is connected with a CPU module of the PLC through the high-speed HIN bus.
4. The PLC serial port communication extension module of claim 1, wherein the external device communication unit comprises an RS232 interface circuit based on MAX202EESE and an RS485 interface circuit based on SN75LBC184D, and the RS232 interface circuit and the RS485 interface circuit are both connected with the microcontroller.
5. The PLC serial port communication expansion module capable of customizing the protocol according to claim 4, wherein 6N137 high-speed optocouplers are adopted for electrical isolation between the RS232 interface circuit and the microcontroller and between the RS485 interface circuit and the microcontroller.
6. The PLC serial port communication extension module of claim 1, wherein the ethernet firmware upgrade debugging unit comprises a DP83848C PHY chip, the DP83848C PHY chip supports RMII interface; the DP83848C PHY chip receiving and transmitting circuit respectively adopts a pair of differential circuits, and the two pairs of differential circuits are connected with the RJ45 interface circuit through a network transformer.
CN202023175694.2U 2020-12-25 2020-12-25 PLC serial port communication extension module capable of customizing protocol Active CN214042097U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202023175694.2U CN214042097U (en) 2020-12-25 2020-12-25 PLC serial port communication extension module capable of customizing protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202023175694.2U CN214042097U (en) 2020-12-25 2020-12-25 PLC serial port communication extension module capable of customizing protocol

Publications (1)

Publication Number Publication Date
CN214042097U true CN214042097U (en) 2021-08-24

Family

ID=77342239

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202023175694.2U Active CN214042097U (en) 2020-12-25 2020-12-25 PLC serial port communication extension module capable of customizing protocol

Country Status (1)

Country Link
CN (1) CN214042097U (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115047819A (en) * 2022-05-17 2022-09-13 北京万昇智能科技有限公司 PLC system, PLC data transmission method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115047819A (en) * 2022-05-17 2022-09-13 北京万昇智能科技有限公司 PLC system, PLC data transmission method and device

Similar Documents

Publication Publication Date Title
CN108111382B (en) Communication device based on I3C bus and communication method thereof
CN113609045B (en) Intelligent network card BMC communication structure and method
CN214042097U (en) PLC serial port communication extension module capable of customizing protocol
CN109525472B (en) Bus communication conversion circuit, device and system
CN206907017U (en) Usb signal extender, usb signal transmission system
CN110855581B (en) Domestic exchange blade device suitable for VPX framework 40G and SRIO multiplexing
CN210183618U (en) Communication gateway and lighting system based on power line carrier technology
CN111948971A (en) Intelligent card management device and data switching method thereof
CN103546297A (en) CAN (controller area network) bus repeater for mining
CN107980223B (en) Ethernet interconnection circuit and device
CN210666762U (en) Universal board card
CN210518377U (en) EtherCAT, ProfiNET bus compatible system
CN212183548U (en) IEC61850 protocol and Modbus protocol keysets
CN202331173U (en) Industrial controller and industrial network control system
CN114866112A (en) Power line carrier system and method of node equipment of Internet of things
CN210986125U (en) Embedded industrial control all-in-one machine
CN213958045U (en) SoC reconstruction primary and secondary verification board with extensible functional interface
CN209765328U (en) industrial-grade remote IO module based on EtherCAT
CN210119679U (en) Networking controller for double-network-port material testing machine
CN109328449A (en) RTEX-EtherCAT protocol conversion apparatus and industrial control system
CN204836207U (en) Register is synthesized to 1394B bus interface protection type
CN213094226U (en) CAN communication device based on CPCI bus
CN216566871U (en) Novel ethercat slave station changes modbus master and slave station equipment
CN220603888U (en) Digital quantity signal remote control circuit and card type bus IO module
CN217821596U (en) SDR heterogeneous prototype system based on FPGA

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Assignee: Nanjing Aotuo Automation Technology Co.,Ltd.

Assignor: Aotuo Technology Co.,Ltd.

Contract record no.: X2022980003096

Denomination of utility model: A PLC serial communication expansion module with customizable protocol

Granted publication date: 20210824

License type: Common License

Record date: 20220324

EE01 Entry into force of recordation of patent licensing contract