CN112487749B - Profibus-DP and Modbus integrated slave station device based on singlechip - Google Patents

Profibus-DP and Modbus integrated slave station device based on singlechip Download PDF

Info

Publication number
CN112487749B
CN112487749B CN202011322299.4A CN202011322299A CN112487749B CN 112487749 B CN112487749 B CN 112487749B CN 202011322299 A CN202011322299 A CN 202011322299A CN 112487749 B CN112487749 B CN 112487749B
Authority
CN
China
Prior art keywords
singlechip
pin
communication
stm32f107
profibus
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
CN202011322299.4A
Other languages
Chinese (zh)
Other versions
CN112487749A (en
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.)
Hebei Kingston Technology Co ltd
Original Assignee
Hebei Kingston 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 Hebei Kingston Technology Co ltd filed Critical Hebei Kingston Technology Co ltd
Priority to CN202011322299.4A priority Critical patent/CN112487749B/en
Publication of CN112487749A publication Critical patent/CN112487749A/en
Application granted granted Critical
Publication of CN112487749B publication Critical patent/CN112487749B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/39Circuit design at the physical level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs
    • G06F15/163Interprocessor communication
    • G06F15/17Interprocessor communication using an input/output type connection, e.g. channel, I/O port
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • Communication Control (AREA)

Abstract

The invention discloses a Profibus-DP and Modbus integrated slave station device based on a singlechip, wherein two subroutines respectively used for processing Profibus-DP protocol messages and Modbus protocol messages are pre-burned in the singlechip, communication of different protocols is completed by selecting and calling different message processing subroutines, and an external data interface circuit is bidirectionally connected with the singlechip to realize bidirectional connection of the singlechip and external equipment; the communication parameter memory is used for storing communication configuration parameter data; the RS-485 driving isolation circuit is internally and bidirectionally connected with the singlechip, and externally and bidirectionally connected with the RS-485 field bus so as to realize data bidirectional communication from the singlechip to the RS-485 field bus, and is used for supplying power to the RS-485 field bus side circuit and realizing electric isolation. The invention can switch two communication protocols more conveniently, and simultaneously, reduces the cost of the communication device and enhances the practicability and reliability.

Description

Profibus-DP and Modbus integrated slave station device based on singlechip
Technical Field
The invention relates to the technical field of industrial network communication, in particular to a Profibus-DP and Modbus integrated slave station device based on a singlechip.
Background
In the existing industrial data communication, two communication protocols of Profibus-DP and Modbus are often used, and the two communication protocols use an RS485 bus to transmit data, so that in order to realize the communication of the two protocols at the same time, two communication devices are generally designed to respectively correspond to the two communication protocols, and the complexity of engineering is increased.
In order to solve the problem of equipment universality, some communication devices use special chips such as SPC3 to realize Profibus-DP protocol, such as Chinese patent with the publication number of CN102710478B, use a singlechip program to realize Modbus protocol, and connect to an RS-485 interface chip through a hardware switch to realize the purpose that two communication protocols are integrated in one RS-485 port. However, this method uses a large number of peripheral circuits and expensive special chips, which have complex structures, high costs and large volumes of communication circuits, and in the fundamental sense, the communication device simply merges the two communication devices together, which does not solve the fundamental problem.
Disclosure of Invention
In order to solve the problems, the invention provides a Profibus-DP and Modbus integrated slave station device based on a singlechip, wherein Profibus-DP and Modbus communication slave station protocols are completely realized by the singlechip, and the circuit structure is simplified.
In order to achieve the above purpose, the technical scheme adopted by the invention is as follows:
Profibus-DP and Modbus integrated slave station device based on singlechip, include: protocol processing and communication interface unit and RS-485 interface unit based on STM32F107 singlechip;
the protocol processing and communication interface unit based on the STM32F107 singlechip is used for processing Profibus-DP and Modbus communication protocols, and comprises the following steps:
the STM32F107 singlechip is pre-burned with two subprograms respectively used for processing Profibus-DP protocol messages and Modbus protocol messages, the STM32F107 singlechip completes communication of Profibus-DP protocol or Modbus protocol by selecting and calling different message processing subprograms, completes communication with external equipment through an external data interface circuit, and reads configuration parameter data of a communication parameter memory;
the external data interface circuit realizes the bidirectional connection between the STM32F107 singlechip and external equipment through the bidirectional connection with the singlechip;
the communication parameter memory is used for storing communication configuration parameter data;
wherein, RS-485 interface unit includes:
the RS-485 driving isolation circuit comprises an RS-485 interface circuit and an RS-485 communication isolation power supply circuit, wherein the inside of the RS-485 driving isolation circuit is in bidirectional connection with the STM32F107 singlechip, and the outside of the RS-485 driving isolation circuit is in bidirectional connection with an RS-485 field bus using Profibus-DP or Modbus protocol, so that data bidirectional communication from the STM32F107 singlechip to the RS-485 field bus is realized, and meanwhile, the RS-485 driving isolation circuit is used for supplying power to the RS-485 field bus side circuit, and electric isolation between the RS-485 field bus and a main circuit is realized.
Optionally, the protocol processing and communication interface unit based on the STM32F107 singlechip further includes a communication and working state indicating circuit, where the communication and working state indicating circuit is connected with the STM32F107 singlechip, and displays working states of the Profibus-DP and Modbus integrated slave station device, and when the device works abnormally, the indicating circuit displays an abnormal signal, and after the abnormality is removed, the indicating signal displays normally.
Optionally, the communication and working state indication circuit includes indication lamps E1, E2, E3 and E4, where E1 is connected to a PB14 pin of the STM32F107 singlechip, and is a working state indication lamp, E2 is connected to a PB15 pin of the STM32F107 singlechip, and is a Profibus-DP communication indication lamp, E3 is connected to a PA11 pin of the STM32F107 singlechip, and is a Modbus communication indication lamp, and E4 is connected to a PA12 pin of the STM32F107 singlechip, and is a fault indication lamp.
Optionally, the RS-485 interface circuit includes a digital isolation interface chip ADM2486, where an RE pin and a DE pin of the ADM2486 chip are connected with a communication direction control IO port PC12 pin of the STM32F107 single-chip microcomputer, an RXD pin and a TXD pin of the ADM2486 chip are connected with a PC11 pin and a PC10 pin of the STM32F107 single-chip microcomputer respectively, so as to implement bidirectional connection between the ADM2486 chip and the STM32F107 single-chip microcomputer, and an input/output in-phase end a pin and an input/output opposite-phase end B pin of the ADM2486 chip are connected to an RS-485 field bus, so as to implement bidirectional data communication from the STM32F107 single-chip microcomputer to the RS-485 field bus.
Optionally, the RS-485 communication isolation power supply circuit uses a B0305XT power supply module, to which a 3.3V voltage is input, and outputs a 5V voltage that is electrically isolated from the main circuit to the VDD2 pin and the GND2 pin of the ADM2486 chip.
Optionally, the integrated slave station device further comprises a Profibus-DP bus standard configuration circuit, and the integrated slave station device is configured as an intermediate station or a terminal station by using a standard Profibus-DP bus connector to match the Profibus-DP bus standard configuration circuit.
Optionally, the integrated slave station device further comprises a Modbus terminal resistor configuration circuit, wherein the Modbus terminal resistor configuration circuit is used for configuring the integrated slave station device as an intermediate station or a terminal station, a terminal resistor is configured for weakening signal reflection when the integrated slave station device is the terminal station, and the terminal resistor R26 is connected in parallel to a Modbus joint port in a short-circuit mode through a1 st pin jumper and a 2 nd pin jumper of the J5.
Optionally, the external data interface circuit includes a differential transceiver SN65HVD11DR, where an RE pin and a DE pin of the SN65HVD11DR chip are connected to a communication direction control IO port PD4 pin of the STM32F107 single chip microcomputer, and an RO pin and a DI pin of the SN65HVD11DR chip are respectively connected to a PD6 pin and a PD5 pin of the STM32F107 single chip microcomputer, so as to implement bidirectional communication with the STM32F107 single chip microcomputer, and the external device exchanges data with the whole device through a bus input/output terminal a pin and a bus input/output terminal B pin of the SN65HVD11DR chip, where the data includes data that the external device needs to exchange with a Profibus-DP or a Modbus field bus, and communication configuration parameter data.
Optionally, the communication parameter memory circuit includes a memory chip AT24C02, an SCL pin and an SDA pin of the AT24C02 chip are respectively connected with a PB6 pin and a PB7 pin of the STM32F107 singlechip, so as to implement communication configuration parameter data exchange with the STM32F107 singlechip, where the configuration parameter data includes communication protocol information, a station number, a baud rate, a parity check, and a stop bit.
Compared with the prior art, the invention has the following technical progress:
the invention relates to a Profibus-DP and Modbus integrated slave station device based on single chip microcomputer software, wherein Profibus-DP and Modbus communication slave station protocols are completely realized by the single chip microcomputer, the selection of the protocols is also completed in the single chip microcomputer, and one of Profibus-DP and Modbus communication protocols can be selected to communicate with a master station according to the requirement by adding an RS-485 interface circuit to the single chip microcomputer.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention.
In the drawings:
fig. 1 is a schematic diagram of the structure of the present invention.
Fig. 2 is a circuit diagram of the STM32F107 single-chip microcomputer of the present invention.
FIG. 3 is a circuit diagram of the communication and operation status indication circuit of the present invention.
Fig. 4, 5 and 6 are circuit diagrams of the RS-485 interface circuit of the invention.
FIG. 7 is a circuit diagram of an RS-485 communication isolated power supply circuit of the invention.
Fig. 8 is a circuit diagram of an external data interface circuit according to the present invention.
Fig. 9 is a circuit diagram of the communication parameter memory of the present invention.
In the figure:
100-a protocol processing and communication interface unit based on an STM32F107 singlechip,
101-STM32F107 singlechip, 102-external data interface circuit, 103-communication parameter memory, 104-communication and working state indicating circuit,
a 200-RS-485 interface unit,
201-RS-485 drive isolation circuit,
300-external device 300.
Detailed Description
The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
As shown in fig. 1, the invention discloses a Profibus-DP and Modbus integrated slave station device based on a single chip microcomputer, which comprises a protocol processing and communication interface unit 100 and an RS-485 interface unit 200 based on an STM32F107 single chip microcomputer, wherein the protocol processing and communication interface unit 100 based on the STM32F107 single chip microcomputer is used for processing Profibus-DP and Modbus communication protocols, and comprises:
the circuit diagram of the STM32F107 single-chip microcomputer 101 is shown in fig. 2, two subroutines for processing a Profibus-DP protocol message and a Modbus protocol message are pre-burned in the STM32F107 single-chip microcomputer 101, and the STM32F107 single-chip microcomputer 101 completes communication of the Profibus-DP protocol or the Modbus protocol by selectively calling different message processing subroutines, wherein simple descriptions of the Profibus-DP protocol and the Modbus protocol message are shown in table 1 and table 2:
table 1:
Figure BDA0002793268460000051
Figure BDA0002793268460000061
table 2:
start position Device address Function code Data CRC check End symbol
T1-T2-T3-T4 8Bit 8Bit n 8 bits 16Bit T1-T2-T3-T4
The STM32F107 single chip microcomputer 101 also completes communication with the external device 300 through the external data interface circuit 102, and reads the configuration parameter data of the communication parameter memory 103.
The external data interface circuit 102 is connected with the STM32F107 singlechip 101 in a bidirectional manner, so that the STM32F107 singlechip 101 is connected with the external device 300 in a bidirectional manner, and the communication parameter memory 103 is used for storing communication configuration parameter data. Specifically, the STM32F107 single-chip microcomputer 101 receives collected field data through the external data interface circuit 102, then the STM32F107 single-chip microcomputer 101 converts the data into messages conforming to the field bus standard, and sends the messages to the RS-485 field bus through the RS-485 interface unit 200, and in addition, a master station command sent from the RS-485 interface unit 200 is obtained.
Wherein, the RS-485 interface unit 200 comprises:
the RS-485 driving isolation circuit 201 comprises an RS-485 interface circuit and an RS-485 communication isolation power supply circuit, wherein the inside of the RS-485 driving isolation circuit 201 is in bidirectional connection with the STM32F107 singlechip 101, and the outside of the RS-485 driving isolation circuit is in bidirectional connection with an RS-485 field bus using Profibus-DP and Modbus protocols so as to realize data bidirectional communication from the STM32F107 singlechip 101 to the RS-485 field bus, and the RS-485 driving isolation circuit is simultaneously used for supplying power to the RS-485 field bus side circuit and realizing electric isolation between the RS-485 field bus and a main circuit.
The protocol processing and communication interface unit based on the STM32F107 singlechip further comprises a communication and working state indicating circuit 104, wherein the communication and working state indicating circuit 104 is connected with the STM32F107 singlechip 101 to display the working state of the Profibus-DP and Modbus integrated slave station device, and when the device works abnormally, the indicating circuit displays an abnormal signal, and after the abnormality is eliminated, the indicating signal displays normally. As shown in fig. 3, the communication and working status indication circuit 104 includes indication lamps E1, E2, E3 and E4, wherein E1 is connected to a PB14 pin of the STM32F107 singlechip 101, which is a working status indication lamp, E2 is connected to a PB15 pin of the STM32F107 singlechip 101, which is a Profibus-DP communication indication lamp, E3 is connected to a PA11 pin of the STM32F107 singlechip 101, which is a Modbus communication indication lamp, and E4 is connected to a PA12 pin of the STM32F107 singlechip 101, which is a fault indication lamp.
Specific:
as shown in FIG. 4, the RS-485 interface circuit comprises a digital isolation interface chip ADM2486, wherein an RE pin and a DE pin of the ADM2486 chip are connected with a PC12 pin of a communication direction control IO port of the STM32F107 singlechip 101, an RXD pin and a TXD pin of the ADM2486 chip are respectively connected with a PC11 pin and a PC10 pin of the STM32F107 singlechip 101 to realize bidirectional connection of the ADM2486 chip and the STM32F107 singlechip 101, and an input/output in-phase end A pin and an input/output opposite-phase end B pin of the ADM2486 chip are connected to an RS-485 field bus to realize bidirectional data communication from the STM32F107 singlechip 101 to the RS-485 field bus. When the device is configured to be an intermediate site or a terminal site by using a Profibus-DP protocol, a Profibus-DP bus joint arrangement shown in fig. 5 is used, which comprises a Profibus-DP bus standard configuration circuit, a standard Profibus-DP bus joint is used to be matched with the Profibus-DP bus standard configuration circuit to configure the integrated slave station device to be the intermediate site or the terminal site, when the device is configured to be the intermediate site or the terminal site by using a Modbus protocol, a Modbus bus joint arrangement shown in fig. 6 is used, which comprises a Modbus terminal resistor configuration circuit to configure the integrated slave station device to be the intermediate site or the terminal site, wherein a terminal resistor R26 needs to be configured for weakening signal reflection when the integrated slave station device is the terminal site, and is connected in parallel to a Modbus joint port in a short-circuit manner through J5 1 st and 2 nd pins.
As shown in fig. 7, the RS-485 communication isolation power supply circuit uses a B0305XT power supply module, inputs a 3.3V voltage to the module, and outputs a 5V voltage which is electrically isolated from the main circuit to the VDD2 pin and the GND2 pin of the ADM2486 chip, so as to supply power to the RS-485 fieldbus side circuit, thereby electrically isolating the RS-485 fieldbus from the main circuit.
As shown in fig. 8, the external data interface circuit 102 includes a differential transceiver SN65HVD11DR, where an RE pin and a DE pin of the SN65HVD11DR chip are connected to a communication direction control IO port PD4 pin of the STM32F107 singlechip 101, and an RO pin and a DI pin of the SN65HVD11DR chip are connected to a PD6 pin and a PD5 pin of the STM32F107 singlechip 101, respectively, so as to implement bidirectional communication with the STM32F107 singlechip 101, and the external device 300 exchanges data with the whole device through a bus input/output terminal a pin and a bus input/output terminal B pin of the SN65HVD11DR chip, where the data includes data that the external device 300 needs to exchange with a Profibus-DP or a Modbus field bus, and communication configuration parameter data.
As shown in fig. 9, the communication parameter memory 103 comprises a memory chip AT24C02, an SCL pin and an SDA pin of the AT24C02 chip are respectively connected with a PB6 pin and a PB7 pin of the STM32F107 singlechip 101 for use with the STM32F107 singlechip 101 by using I 2 And C, realizing communication configuration parameter data exchange by protocol communication, wherein the configuration parameter data comprise communication protocol information, station numbers, baud rates, parity check and stop bits, and the AT24C02 chip has a storage space of 256 Bytes, and the storage content is the configuration parameter data. After the device is electrified, the program of the STM32F107 singlechip 101 automatically reads the communication configuration parameter data in the memory chip AT24C02 and starts to configure an application protocol and communication parameters. When the external communication receives new communication configuration parameter data, the application protocol and the communication configuration parameters of the device are updated immediately by the STM32F107 singlechip 101 program, and the application protocol and the communication configuration parameters are automatically stored in the communication parameter memory 103 so as to be used for the next power-on of the device to directly use the latest configuration parameters for communication.
After the device is electrified and started, the program of the STM32F107 singlechip 101 is automatically finished as follows: initializing, detecting the state of a peripheral circuit, reading data stored in a communication parameter memory 103, configuring communication parameters, checking whether the communication parameter configuration is correct or not and the like, and then controlling a yellow luminous tube E1 to enter a flashing state with the frequency of 1HZ by an STM32F107 singlechip 101 to indicate that the device has completed preparation work and enters a normal working state, wherein the time required from power-on starting to entering the normal working state is less than 500mS.
If Profibus-DP protocol communication is currently used, when a correct Profibus-DP protocol message is received by a serial port of the STM32F107 singlechip 101, analyzing message data correctly by a Profibus-DP protocol message processing subprogram, and enabling a communication target station number to be consistent with a station number configured by the device, generating Profibus-DP response messages according to corresponding data by the Profibus-DP protocol message processing subprogram, sending according to Profibus-DP protocol standard time sequence, and controlling a green luminous tube E2 to light 100mS by the STM32F107 singlechip 101 when the response messages are sent each time, and enabling E2 to be in a normally-bright state when the receiving and sending frequency is more than 10 Hz;
if Modbus protocol communication is currently used, when a correct Modbus protocol message is received by a serial port of the STM32F107 singlechip 101, the Modbus protocol message processing subprogram analyzes that message data are correct, and a communication target station number is consistent with a station number configured by the device, at this time, the Modbus protocol message processing subprogram generates a Modbus response message according to the corresponding data and sends the Modbus response message according to a Modbus protocol standard time sequence, and when the response message sending is completed, the STM32F107 singlechip controls a green luminous tube E3 to light up for 100mS, and when the receiving and sending frequency is more than 10Hz, the luminous tube E3 is in a normally-bright state;
when the STM32F107 singlechip finds that the configured communication parameters exceed the normal range or detects the line connection error, the red luminous tube E4 is controlled to be in a normally-on state until the error is recovered, and the E4 is extinguished.
Finally, it should be noted that: the foregoing description is only a preferred embodiment of the present invention, and the present invention is not limited thereto, but it is to be understood that modifications and equivalents of some of the technical features described in the foregoing embodiments may be made by those skilled in the art, although the present invention has been described in detail with reference to the foregoing embodiments. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims (9)

1. Profibus-DP and Modbus integrated slave station device based on singlechip, characterized by comprising: protocol processing and communication interface unit and RS-485 interface unit based on STM32F107 singlechip;
the protocol processing and communication interface unit based on the STM32F107 singlechip is used for processing Profibus-DP and Modbus communication protocols, and comprises the following steps:
and the STM32F107 singlechip is pre-burned with two subprograms for processing Profibus-DP protocol messages and Modbus protocol messages respectively, and the STM32F107 singlechip completes communication of the Profibus-DP protocol or the Modbus protocol by selectively calling different message processing subprograms, wherein the Profibus-DP protocol and the Modbus protocol messages are simply described as follows:
SD (StarDlimiter) header;
SDr: repeating SD;
LE (NetDatelength) data length;
LEr: repeating LE;
DA (DestinationAddress) destination address;
SA (SourceAddress) source address;
FC (FunctionCode), function code;
FCS (FrameCheckSequence) check code;
ED (EndDlimiter, ed=0×16) tail, fixed at 0×16;
start position: T1-T2-T3-T4;
device address: 8Bit;
functional code: 8Bit;
data: n 8 bits;
CRC check: 16Bit;
end symbol: T1-T2-T3-T4;
the STM32F107 singlechip is communicated with external equipment through an external data interface circuit, and reads configuration parameter data of a communication parameter memory;
the external data interface circuit is connected with the STM32F107 singlechip in a bidirectional manner to realize the bidirectional connection between the STM32F107 singlechip and external equipment;
the communication parameter memory is used for storing communication configuration parameter data;
wherein, RS-485 interface unit includes:
the RS-485 driving isolation circuit comprises an RS-485 interface circuit and an RS-485 communication isolation power supply circuit, wherein the inside of the RS-485 driving isolation circuit is in bidirectional connection with the STM32F107 singlechip, and the outside of the RS-485 driving isolation circuit is in bidirectional connection with an RS-485 field bus using Profibus-DP or Modbus protocol, so that data bidirectional communication from the STM32F107 singlechip to the RS-485 field bus is realized, and meanwhile, the RS-485 driving isolation circuit is used for supplying power to the RS-485 field bus side circuit, and electric isolation between the RS-485 field bus and a main circuit is realized.
2. The Profibus-DP and Modbus integrated slave station device based on the single chip microcomputer according to claim 1, wherein: the protocol processing and communication interface unit based on the STM32F107 singlechip further comprises a communication and working state indicating circuit, wherein the communication and working state indicating circuit is connected with the STM32F107 singlechip and used for displaying the working state of the Profibus-DP and Modbus integrated slave station device, and when the device works abnormally, the indicating circuit displays an abnormal signal, and after abnormality is eliminated, the indicating signal displays normally.
3. The Profibus-DP and Modbus integrated slave station device based on the single chip microcomputer according to claim 2, wherein: the communication and working state indicating circuit comprises indicating lamps E1, E2, E3 and E4, wherein E1 is connected with a PB14 pin of the STM32F107 singlechip and is a working state indicating lamp; e2 is connected with PB15 pin of the STM32F107 singlechip and is a Profibus-DP communication indicator lamp; e3 is connected with a PA11 pin of the STM32F107 singlechip and is a Modbus communication indicator lamp; and E4 is connected with a PA12 pin of the STM32F107 singlechip, and is a fault indicator lamp.
4. The Profibus-DP and Modbus integrated slave station device based on the single chip microcomputer according to claim 1 or 2, wherein: the RS-485 interface circuit comprises a digital isolation interface chip ADM2486, wherein an RE pin and a DE pin of the ADM2486 chip are connected with a PC12 pin of a communication direction control IO port of the STM32F107 singlechip, an RXD pin and a TXD pin of the ADM2486 chip are respectively connected with a PC11 pin and a PC10 pin of the STM32F107 singlechip to realize bidirectional connection of the ADM2486 chip and the STM32F107 singlechip, and an input/output in-phase end A pin and an input/output opposite-phase end B pin of the ADM2486 chip are connected to an RS-485 field bus to realize bidirectional data communication from the STM32F107 singlechip to the RS-485 field bus.
5. The Profibus-DP and Modbus integrated slave station device based on the singlechip as set forth in claim 4, wherein: the RS-485 communication isolation power supply circuit uses a B0305XT power supply module, inputs a 3.3V voltage to the power supply module, and outputs a 5V voltage which is electrically isolated from a main circuit to a VDD2 pin and a GND2 pin of an ADM2486 chip.
6. The Profibus-DP and Modbus integrated slave station device based on the singlechip as set forth in claim 4, wherein: the system also comprises a Profibus-DP bus standard configuration circuit, wherein the Profibus-DP bus standard configuration circuit is matched with a standard Profibus-DP bus connector to configure the integrated slave station device as an intermediate station or a terminal station.
7. The Profibus-DP and Modbus integrated slave station device based on the singlechip as set forth in claim 4, wherein: the integrated slave station device is configured to be an intermediate station or a terminal station, wherein a terminal resistor is configured for weakening signal reflection when the integrated slave station device is a terminal station, and the terminal resistor R26 is connected in parallel to a Modbus joint port in a short-circuit mode through a1 st pin jumper and a 2 nd pin jumper of J5.
8. The Profibus-DP and Modbus integrated slave station device based on the single chip microcomputer according to claim 1 or 2, wherein: the external data interface circuit comprises a differential transceiver SN65HVD11DR, wherein an RE pin and a DE pin of the SN65HVD11DR chip are connected with a communication direction control IO port PD4 pin of the STM32F107 singlechip, an RO pin and a DI pin of the SN65HVD11DR chip are respectively connected with a PD6 pin and a PD5 pin of the STM32F107 singlechip so as to realize bidirectional communication with the STM32F107 singlechip, and external equipment exchanges data with the whole device through a bus input/output end A pin and a bus input/output end B pin of the SN65HVD11DR chip, wherein the data comprises data which are required to be exchanged with a Profibus-DP or Modbus field bus by the external equipment and communication configuration parameter data.
9. The Profibus-DP and Modbus integrated slave station device based on the singlechip according to claim 8, wherein: the communication parameter memory circuit comprises a memory chip AT24C02, wherein an SCL pin and an SDA pin of the AT24C02 chip are respectively connected with a PB6 pin and a PB7 pin of the STM32F107 singlechip and used for realizing communication configuration parameter data exchange with the STM32F107 singlechip, and the configuration parameter data comprises communication protocol information, station numbers, baud rates, parity check and stop bits.
CN202011322299.4A 2020-11-23 2020-11-23 Profibus-DP and Modbus integrated slave station device based on singlechip Active CN112487749B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011322299.4A CN112487749B (en) 2020-11-23 2020-11-23 Profibus-DP and Modbus integrated slave station device based on singlechip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011322299.4A CN112487749B (en) 2020-11-23 2020-11-23 Profibus-DP and Modbus integrated slave station device based on singlechip

Publications (2)

Publication Number Publication Date
CN112487749A CN112487749A (en) 2021-03-12
CN112487749B true CN112487749B (en) 2023-04-25

Family

ID=74933658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011322299.4A Active CN112487749B (en) 2020-11-23 2020-11-23 Profibus-DP and Modbus integrated slave station device based on singlechip

Country Status (1)

Country Link
CN (1) CN112487749B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2811962Y (en) * 2005-07-18 2006-08-30 北京金自天正智能控制股份有限公司 Synchronous motor state detector based on Profibus-DP field bus
CN101719922A (en) * 2009-12-04 2010-06-02 上海交通大学 Device and method of protocol conversion between PROFIBUS-DP industrial fieldbus and wireless ZIGBEE
CN102724090A (en) * 2012-05-22 2012-10-10 天津理工大学 Process field bus (PROFIBUS) DP/PA integrated embedded slave node communication device based on DP controller with integrated 8031 core (DPC31)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102710478B (en) * 2012-05-22 2015-06-03 天津理工大学 Integration slave node device of Profibus-DP (profibus-data processing) and Modbus
CN102833142A (en) * 2012-09-10 2012-12-19 天津理工大学 Profibus-DP slave station device on basis of FDGA (Field Programmable Gate Array)
CN210270581U (en) * 2019-09-23 2020-04-07 深圳市讯鹏科技有限公司 DP industrial intelligent gateway

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2811962Y (en) * 2005-07-18 2006-08-30 北京金自天正智能控制股份有限公司 Synchronous motor state detector based on Profibus-DP field bus
CN101719922A (en) * 2009-12-04 2010-06-02 上海交通大学 Device and method of protocol conversion between PROFIBUS-DP industrial fieldbus and wireless ZIGBEE
CN102724090A (en) * 2012-05-22 2012-10-10 天津理工大学 Process field bus (PROFIBUS) DP/PA integrated embedded slave node communication device based on DP controller with integrated 8031 core (DPC31)

Also Published As

Publication number Publication date
CN112487749A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
EP0176342A2 (en) Power control network using reliable communications protocol
CN1132381C (en) Interface interlace
WO2021073221A1 (en) Train control dmi data redundancy control method and system
CN102324952B (en) Non-polar two-line system communication circuit
CN104731007A (en) Backboard communication assembly and communication method for function security PLC
CN107612800B (en) Implementation method and control device of Y-type conversion equipment for connecting PROFIBUS redundant double-bus network and PROFIBUS single-bus network
CN108333527A (en) Battery management system loop interlock and from control address setting method
CN103941625B (en) Can bus data transmission monitoring system
CN112487749B (en) Profibus-DP and Modbus integrated slave station device based on singlechip
CN106713094B (en) 1394 data acquisition module
WO2007002918A1 (en) Apparatus and method for network error prevention
CN102495613A (en) Controller area network (CAN)-control-based auxiliary control unit for locomotive
CN110809002A (en) Method for protocol conversion between robot and welding equipment and protocol conversion module
CN111711552B (en) Terminal resistor access circuit, servo driver and control system
CN104699055A (en) Field bus controller and method
CN102253686B (en) Server system and switching method thereof
CN204256738U (en) The data line of S7-200PLC and I/A Series
CN101888335A (en) CAN bus-bluetooth intelligent network bridge
CN209118135U (en) A kind of automobile-used CAN bus telecommunication circuit of electrical salf-walking
EP3726813B1 (en) Control of ethernet link-partner gpio using oam
CN116055347A (en) Computing system and network device management method
WO2001029657A1 (en) Method of updating program and communication terminal
CN110704353B (en) CPCI-ARINC429 hot plug system
CN208766506U (en) A kind of and machine CAN build-out resistor automatic identification circuit and CAN and machine equipment
CN201699700U (en) CAN bus-Bluetooth intelligent network bridge

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
CB02 Change of applicant information

Address after: 052360 south of Weiyi Road, Xinji economic and Technological Development Zone, Shijiazhuang City, Hebei Province

Applicant after: Hebei Kingston Technology Co.,Ltd.

Address before: 052360 south of Weiyi Road, Xinji economic and Technological Development Zone, Shijiazhuang City, Hebei Province

Applicant before: SHIJIAZHUANG KINGSTON BEARING TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant