CN106713325A - Communication protocol conversion card - Google Patents
Communication protocol conversion card Download PDFInfo
- Publication number
- CN106713325A CN106713325A CN201611238924.0A CN201611238924A CN106713325A CN 106713325 A CN106713325 A CN 106713325A CN 201611238924 A CN201611238924 A CN 201611238924A CN 106713325 A CN106713325 A CN 106713325A
- Authority
- CN
- China
- Prior art keywords
- data frame
- data
- protocol
- protocol data
- cpld
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/08—Protocols for interworking; Protocol conversion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Communication Control (AREA)
Abstract
The invention discloses a communication protocol conversion card comprising a driving circuit used for converting a first protocol data frame sent by a first communication device into a first protocol data frame that can be identified by an MCU, wherein the driving circuit is further used for converting a second protocol data frame sent by the MCU into a second protocol data frame that can be identified by the first communication device; the MCU used for analyzing the first protocol data frame to obtain analysis data and sending the analysis data to an Mail OUT address of a CPLD, wherein the MCU is further used for reading data from Mail in of the CPLD, packaging the data into the second protocol data frame and sending the second protocol data frame to the driving circuit; and the CPLD used for notifying a second communication device to analyze the data when receiving the analysis data in the Mail OUT address, wherein the CPLD is further used for storing the data sent by the second communication device in the Mail in address, and notifying the MCU to read the data. The communication protocol conversion card disclosed by the invention has the advantages of small number of chips, simple circuit, small volume, low cost, good versatility and high flexibility.
Description
Technical field
The present invention relates to communication technique field, more particularly to a kind of communications protocol transition card.
Background technology
In the prior art, equipment generally needs to follow some specific agreements with equipment when carrying out data transmission, industry
The communication interface that many equipment at scene are used is different, because the agreement of various communication structures is incompatible so that heterogeneous network
Operation and information between network are exchanged and are difficult to.Based on this, communications protocol transition card arises at the historic moment, but of the prior art
The usual complex structure of communications protocol transition card, volume be big and high cost.
Therefore, how to provide a kind of communications protocol transition card for solving above-mentioned technical problem is current those skilled in the art
The problem for needing to solve.
The content of the invention
It is an object of the invention to provide a kind of communications protocol transition card, on the one hand, number of chips is few, circuit is simple, volume
Small and low cost, in addition, using CPLD as data channel, can on this basis develop many money communications protocol, versatility it is good and
Flexibility ratio is high.
In order to solve the above technical problems, the invention provides a kind of communications protocol transition card, including drive circuit, microcontroller
Unit MCU, complex programmable logic controller CPLD and hardware interface, wherein:
The drive circuit, can know for the first protocol data frame that the first communication apparatus sends to be converted into the MCU
Other first protocol data frame;It is additionally operable to for the second protocol data frame that the MCU sends to be converted to first communication apparatus
The second protocol data frame that can be recognized;
The MCU, for parsing first protocol data frame, obtains parsing data, and by the parsing number
According in transmission to the Mail OUT addresses of the CPLD;It is additionally operable to read data from the Mail in of the CPLD, and will be described
Data assembling is into the second protocol data frame and sends to the drive circuit;
The CPLD, for when its Mail OUT address receives the parsing data, notifying that second communication sets
It is standby to read the parsing data;It is additionally operable to deposit the data that second communication apparatus sends in its Mail in address, and leads to
Know that the MCU reads the data;
The hardware interface, for realizing the data interaction between the CPLD and second communication apparatus.
Preferably, the MCU includes:
Serial port module, for obtaining first protocol data frame and the second protocol data frame using interrupt mode;
User equipment, for receiving first protocol data frame from the serial port module, and calls parsing module;
The parsing module, for parsing first protocol data frame, obtains parsing data, and by the solution
In analysis data is activation to the Mail OUT addresses of the CPLD;
The data for reading data from the Mail in of the CPLD, and are assembled by assembling module, are obtained
The second protocol data frame;
State machine is sent, for the second protocol data frame to be sent to the serial port module.
Preferably, the serial port module is additionally operable to judge whether receive first protocol data in Preset Time
Frame, when first protocol data frame is not received by Preset Time, sends fault warning.
Preferably, the user equipment is additionally operable to judge whether first protocol data frame meets pre-conditioned, such as
Fruit is then to carry out subsequent step;Otherwise, first protocol data frame is abandoned.
Preferably, it is described pre-conditioned including first pre-conditioned, second pre-conditioned, the 3rd pre-conditioned and the 4th pre-
If condition, wherein, described first is pre-conditioned for the first character section of first protocol data frame is correct, and described second presets
Condition is that first protocol data frame for receiving has not timed out and lead code is correct, the described 3rd it is pre-conditioned be described first
The frame head data of protocol data frame meet frame head verification condition, the described 4th it is pre-conditioned be the number of first protocol data frame
Meet data segment verification condition according to segment data.
Preferably, the transmission state machine is specifically for when the second protocol data frame is received, enabling sending tube
Pin, the second protocol data frame is sent in units of byte for beginning until the second protocol data frame is sent completely and receives
Pin is enabled.
Preferably, the agreement is BACnet/MSTP agreements.
Preferably, the drive circuit is 485 drive circuits.
Preferably, the MCU is Cortex-M4 processors.
Preferably, the hardware interface is that 34 pin arrange pin.
The invention provides a kind of communications protocol transition card, including drive circuit, micro-control unit MCU, complex programmable
Logic controller CPLD and hardware interface, drive circuit, for the first protocol data frame conversion for sending the first communication apparatus
For the first protocol data frame that MCU can be recognized;It is additionally operable to for the second protocol data frame that MCU sends to be converted to the first communication apparatus
The second protocol data frame that can be recognized;MCU, for parsing the first protocol data frame, obtains parsing data, and will parsing
In data is activation to the Mail OUT addresses of CPLD;Be additionally operable to read data from the Mail in of CPLD, and by data assembling into
Second protocol data frame is simultaneously sent to drive circuit;CPLD, for when its Mail OUT address receives parsing data, notifying
Second communication apparatus reads parsing data;It is additionally operable to deposit the data that the second communication apparatus sends in its Mail in address, and leads to
Know that MCU reads data;Hardware interface, for realizing the data interaction between CPLD and the second communication apparatus.It can be seen that, the present invention is carried
The communications protocol transition card of confession only includes drive circuit, MCU, CPLD and hardware interface, on the one hand, number of chips is few, circuit letter
Single, small volume and low cost, in addition, using CPLD as data channel, many money communications protocol can be on this basis developed, it is general
Property it is good and flexibility ratio is high.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, below will be to institute in prior art and embodiment
The accompanying drawing for needing to use is briefly described, it should be apparent that, drawings in the following description are only some implementations of the invention
Example, for those of ordinary skill in the art, on the premise of not paying creative work, can also obtain according to these accompanying drawings
Obtain other accompanying drawings.
A kind of structural representation of communications protocol transition card that Fig. 1 is provided for the present invention.
Specific embodiment
Core of the invention is to provide a kind of communications protocol transition card, on the one hand, number of chips is few, and circuit is simple, volume
Small and low cost, in addition, using CPLD as data channel, can on this basis develop many money communications protocol, versatility it is good and
Flexibility ratio is high.
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
A part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
Refer to Fig. 1, a kind of structural representation of communications protocol transition card that Fig. 1 is provided for the present invention, the communications protocol
Transition card includes drive circuit 1, micro-control unit MCU 2 (Microcontrol ler Unit, micro-control unit), complexity can
Programmed logic controller CPLD 3 (Complex Programmable Logic Device, CPLD) and
Hardware interface 4, wherein:
Drive circuit 1, for the first protocol data frame that the first communication apparatus sends to be converted into MCU 2 can be recognized
One protocol data frame;The second protocol data frame for being additionally operable to send MCU 2 is converted to the first communication apparatus can be recognized second
Protocol data frame;
Firstly the need of explanation, the first protocol data frame and second protocol data frame here are under the jurisdiction of an agreement
Data frame, for example, be Bacnet MS/TP protocol data frames, here first and second be intended merely to distinguish from first lead to
The data frame of news equipment and second communication apparatus the two distinct devices.
In actual applications, by twisted pair line connection between the first communication apparatus and communications protocol transition card, by setting
Agreement communicated.Because what is transmitted on twisted-pair feeder is differential signal, and the only one of which of MCU 2 receives pin and a transmission
Pin, therefore, the first protocol data frame that the first communication apparatus sends is converted to MCU 2 can be recognized first by drive circuit
Protocol data frame;The second protocol data frame that also MCU 2 is sent is converted to the second protocol that the first communication apparatus can be recognized
Data frame, drive circuit 1 plays a part of data conversion between the first communication apparatus and MCU 2.
Preferably, drive circuit 1 is 485 drive circuits.
Specifically, the specific small volume of 485 drive circuits, the advantage of low cost.Certainly, drive circuit 1 here can be with
It is other kinds of drive circuit, the present invention is not particularly limited herein.
MCU 2, for parsing the first protocol data frame, obtains parsing data, and will parse data is activation extremely
In the Mail OUT addresses of CPLD 3;It is additionally operable to read data from the Mail in of CPLD 3, and data assembling is assisted into second
View data frame is simultaneously sent to drive circuit;
Firstly the need of explanation, in the application, the first communication apparatus is deposited in the Mail OUT addresses defined in CPLD 3
Send to the data of the second communication apparatus, define the second communication apparatus of storage of the Mail IN addresses in CPLD 3 and send to first
The data of communication apparatus.It is, of course, also possible to be defined using other modes, the present invention is not particularly limited herein.
MCU 2 is used for reception, parsing to protocol data frame, encapsulation and transmission.Sent the first communication apparatus is received
The first protocol data frame when, the first protocol data frame is parsed, by the first protocol data frame data division parsing
Out, and by parsing data put into the Mail OUT addresses of CPLD 3;When needing to send data to the first communication apparatus,
MCU 2 reads data from the Mail in of CPLD 3, and by data assembling is into second protocol data frame and sends.
CPLD 3, for when its Mail OUT address receives parsing data, notifying that the second communication apparatus reads parsing
Data;It is additionally operable to be deposited in its Mail in address the data of the second communication apparatus transmission, and notifies that MCU 2 reads data;
Data exchange between processor and the second communication apparatus needs to be realized by dual port RAM, in the application, uses
CPLD 3 realizes the function of dual port RAM, and two CPU can be written and read operation to dual port RAM simultaneously.Specifically, by programming
It is several address blocks by CPLD points, different address blocks deposits the data of different agreements, and synchronization various protocols are to corresponding
Data field be written and read, be independent of each other, be capable of achieving multiple kinds simultaneous communications.Compared to special dual port RAM, the party
Case flexibility is high, highly versatile.
In addition, in actual applications, the first communication apparatus here can be main website, the second communication apparatus can be from
Stand, for example frequency converter.In addition, slave station here can be multiple, the communications protocol transition card that the present invention is provided is applied to a master
One from or one master and multiple slaves communication modes.
Specifically, table 1 is refer to, table 1 works as the second communication apparatus for frequency converter, agreement are for one kind that the present invention is provided
The allocation tables of CPLD during Bacnet MS/TP agreements.
The allocation tables of table 1CPLD
Address card flag register:Second communication apparatus (frequency converter) inquires about the mark and can determine whether data transmit-receive state, when
When MCU 2 writes data to CPLD 3, correspondingly the state of flag register updates, while CPLD3 outputs are interrupted to the second communication
Equipment (frequency converter), the data that the treatment of the second communication apparatus (frequency converter) side is received.
Specifically, the second communication apparatus (frequency converter) inquires about phase in CPLD 3 when the interruption of the transmissions of CPLD 3 is received
The state of the flag register answered, when the state of marker register have updated, reads parsing data from Mail OUT addresses.
Address card interrupt output register:Draw for the lowest order of data to be interrupted as the second communication apparatus (frequency converter)
The state of pin, effectively, 0x01 is write in initialization to MCU write operations, to produce interruption first to write 0x00, crosses t>=2us, then 0x01 is write, with
This produce interruption, and by the interrupt output to MCU interrupt pin.
Second communication apparatus flag register:Address card inquires about the mark and can determine whether data transmit-receive state, when the second communication
When equipment writes data to CPLD 3, the state of the flag register updates, while the outputs of CPLD 3 are interrupted to MCU 2, MCU 2 exists
When the state for receiving the CPLD3 terminals for sending and inquiring respective identification register updates, data are read from Mail in,
Process the data that second the second communication apparatus of communication apparatus side is sent.
Second communication apparatus interrupt output register:For using the lowest order of data as address card end interrupt pin shape
State, effectively, 0x01 is write in initialization to the second communication apparatus (frequency converter) write operation, to produce interruption first to write 0x00, crosses t>=2us,
0x01 is write again, interruption is produced with this, and the interrupt output is given the interrupt pin of the second communication apparatus (frequency converter).
Communication card counters:MCU adds 1 every 10ms to the counter, and address card is configured with the house dog of 1ms, in communication
Under the situation of stuck machine, the house dog in MCU can trigger reset signal.
Bus type and module type:Second communication apparatus (frequency converter) can support multiple address cards, different address card factories
Family is different with agreement, and corresponding type and module are also different, and treatment function is also different accordingly for the second communication apparatus (frequency converter),
By judging that the address can determine that this calls which function interface carries out data processing.
To sum up, using the scheme of the programming realization dual port RAMs of CPLD 3, can realize that various protocols are filled in an address card
Change, different agreement data field is defined in the different addresses of CPLD 3, various protocols can be allowed while carrying out data exchange.If needing
Other communications protocol are developed, the programs of CPLD 3 can not be changed or modification is capable of achieving on a small quantity, and versatility and flexibility are high.
Hardware interface 4, for realizing the data interaction between the communication apparatus of CPLD 3 and second.
Preferably, hardware interface 4 is that 34 pin arrange pin.
Certainly, hardware interface 4 here can also be other kinds of hardware interface, and the present invention does not do special limit herein
It is fixed, determined according to actual conditions.
Preferably, MCU 2 includes:
Serial port module, for obtaining the first protocol data frame and second protocol data frame using interrupt mode;
User equipment, for receiving the first protocol data frame from serial port module, and calls parsing module;
Parsing module, for parsing the first protocol data frame, obtains parsing data, and will parse data is activation extremely
In the Mail OUT addresses of CPLD 3;
Data for reading data from the Mail in of CPLD 3, and are assembled by assembling module, obtain the second association
View data frame;
State machine is sent, for second protocol data frame to be sent to serial port module.
Specifically, when data are sent to the second communication apparatus from the first communication apparatus:
The first protocol data frame that first communication apparatus sends is sent to the reception pin of MCU 2 by drive circuit 1.
Serial port module in MCU 2 receives the first protocol data frame by interrupting (receiving data can produce interruption).Receive
First protocol data frame calls parsing mould into user equipment treatment, user equipment after the first protocol data frame is received
Block (network layer interface function) is parsed to data frame, extracts the data division in data frame, and send this data to
In the corresponding Mail OUT addresses of the agreement of CPLD 3.
Mail OUT receive data in address, corresponding mark meeting set, and export interruption to the second communication apparatus
In processor (such as DSP), processor when receiving interrupt requests and inquiring corresponding flag bit set, from Mail OUT
Data are read in address, and is processed accordingly, in the data is activation that will be returned to Mail IN addresses.
For example, the data division in the first protocol data frame here is the relevant parameter for inquiring about the second communication apparatus referring to
, then be sent to itself corresponding parameter in Mail IN addresses when the second communication apparatus gets the instruction by order, so as to first logical
News equipment is obtained.
When data are sent to the second communication apparatus from the first communication apparatus:
The data is activation that second communication apparatus will be returned in the Mail IN addresses of the respective protocol of CPLD 3, accordingly
Flag bit set, and send interrupts to assemble module.Assembling module is receiving interrupt requests and is judging to obtain corresponding flag bit
During set, data are read from Mail IN addresses, and data are packaged, be assembled into second protocol data frame, then sent
Second protocol data frame is sent to the second communication apparatus by state machine by serial port module.
Preferably, serial port module is additionally operable to judge whether receive the first protocol data frame in Preset Time, when
When being not received by the first protocol data frame in Preset Time, fault warning is sent.
In order to improve the security performance of communications protocol transition card, serial port module is not received by the first association in Preset Time
During view data frame, fault warning is sent.
Preferably, user equipment is additionally operable to judge whether the first protocol data frame meets pre-conditioned, if it is,
Then carry out subsequent step;Otherwise, the first protocol data frame is abandoned.
Complete valid data are received in order to correct, it is to avoid CPU treats many invalid datas and influences other things
The execution of business, user equipment can also judge whether the first protocol data frame is valid data according to pre-conditioned, only be
When just carry out subsequent step, otherwise, abandon the first protocol data frame.
Preferably, it is pre-conditioned including first pre-conditioned, second pre-conditioned, the 3rd pre-conditioned and the 4th pre-
If condition, wherein, first it is pre-conditioned be the first protocol data frame first character section it is correct, second is pre-conditioned to receive
The first protocol data frame have not timed out and lead code is correct, the 3rd it is pre-conditioned be that the frame head data of the first protocol data frame meets
Frame head verify condition, the 4th it is pre-conditioned be the first protocol data frame data bin data meet data segment verification condition.
Specifically, first it is pre-conditioned it is corresponding be user equipment reception state it is idle when, now receive shape
The first character section of first protocol data frame to be received such as state machine, when only first character section is correct, just into next state.
Second it is pre-conditioned it is corresponding be when receiving lead code, it is necessary to explanation, the first protocol data frame is by multiple
Byte is constituted, and lead code is made up of first character section and second byte, one biography of byte of a byte when being transmitted
It is defeated, there is time restriction between byte and byte, when the first protocol data frame for receiving has not timed out and lead code is correct
Next state is entered back into, otherwise, first protocol data frame is abandoned, resumes waiting for receiving.
3rd it is pre-conditioned it is corresponding be that frame head data includes lead code and length information, right when receiving frame head data
In the data frame that some are intended merely to confirm website, data bin data length is zero, for the data including valid data, data
Segment length is not zero.Therefore, the frame head data for receiving is verified, when verification passes through and data segment, length is 0, it is believed that connect
Receive valid data.Verification passes through and data segment, length is not 0, and the data frame for receiving is, comprising valid data, to enter next
Individual state, otherwise abandons data, waits to be received.
4th it is pre-conditioned it is corresponding be when receiving data, data bin data to be verified, verification passes through, then it is assumed that
Valid data are received, is otherwise invalid data, entered receive idle condition afterwards, wait to be received.
To sum up, only when the first protocol data frame be satisfied by it is first pre-conditioned, second pre-conditioned, the 3rd pre-conditioned
Just think that first protocol data frame is valid data when pre-conditioned with the 4th.
Preferably, state machine is sent specifically for when second protocol data frame is received, enabling and sending pin, is opened
Begin to send second protocol data frame in units of byte until second protocol data frame is sent completely and receives pin enable.
Specifically, three states of state machine point are sent to perform, the disposable transmission of complete data frame is realized.Prevent reception from setting
When standby sequential is stricter, it is believed that the packet is invalid and discarding is not processed.
In actual applications, when the transmission of second protocol data frame is carried out, can be successively by the byte of second protocol data frame
In transmitter register, when the byte in register have sent, corresponding flag bit state can update, in addition, the hair of each byte
The time is sent to be required within a preset range.
Transmission process is specifically included:
1) send and wait
When second protocol data frame is received, enable and send pin, start to send data;
2) data are sent
A byte is sent, has started to send next byte, until full number is sent according to frame, into next shape
State;
3) send and terminate
When last byte is sent completely, whole data frame is sent completely and receives pin enable, and transmission terminates.
Preferably, agreement is BACnet/MSTP agreements.
When agreement is BACnet/MSTP agreements, then the first above-mentioned protocol data frame and second protocol data frame are
BACnet/MSTP protocol data frames, the address in corresponding CPLD 3 is BACnet/MSTP agreement Mail OUT and BACnet/
MSTP agreement Mail IN.
Certainly, agreement here can also be other agreements, and the present invention is not particularly limited herein, according to actual conditions
To determine.
Preferably, MCU 2 is Cortex-M4 processors.
Certainly, MCU 2 here can also be other kinds of processor in addition to can be for Cortex-M4 processors,
The present invention is not particularly limited herein, can realize the purpose of the present invention.
Below with agreement as BACnet/MSTP agreements, the first communication apparatus be Bacnet main websites, the second communication apparatus for become
As a example by frequency device, MCU 2 are Cortex-M4 processors, Cortex-M4 is referred to as M4 below, in synchronization, two agreements
Implementation procedure be described:
Bacnet main websites send data frame to M4, and the program of the bacnet protocol sections of M4 is parsed to data frame, will
Data is activation gives Bacnet MS/TP agreement Mail OUT address areas, and frequency converter reads the address date and carries out respective handling.Will
Returned data is sent to Bacnet MS/TP agreement Mail IN address areas, and M4 reads the address date, is packaged into data frame, hair
Give Bacnet main websites.
At the same time, agreement 2 is also in communication.The main website (or communication object) of agreement 2 sends data frame and gives M4 (processor),
The program of the part of agreement 2 of M4 is parsed to data frame, sends the data to the MailOUT address areas of agreement 2, and frequency converter is read
Taking the address date carries out respective handling.Returned data is sent to the MailIN address areas of agreement 2, M4 reads the number of addresses
According to, data frame is packaged into, it is sent to main website (or the communication object of agreement 2).
The invention provides a kind of communications protocol transition card, including drive circuit, micro-control unit MCU, complex programmable
Logic controller CPLD and hardware interface, drive circuit, for the first protocol data frame conversion for sending the first communication apparatus
For the first protocol data frame that MCU can be recognized;It is additionally operable to for the second protocol data frame that MCU sends to be converted to the first communication apparatus
The second protocol data frame that can be recognized;MCU, for parsing the first protocol data frame, obtains parsing data, and will parsing
In data is activation to the MailOUT addresses of CPLD;Be additionally operable to read data from the Mail in of CPLD, and by data assembling into
Second protocol data frame simultaneously sends;CPLD, for when its Mail OUT address receives parsing data, notifying that the second communication sets
It is standby to read parsing data;It is additionally operable to deposit the data that the second communication apparatus sends in its Mail in address, and notifies that MCU reads
Data;Hardware interface, for realizing the data interaction between CPLD and the second communication apparatus.It can be seen that, the communication that the present invention is provided
Protocol conversion card only includes drive circuit, MCU, CPLD and hardware interface, on the one hand, number of chips is few, and circuit is simple, small volume
And low cost, in addition, using CPLD as data channel, can on this basis develop many money communications protocol, versatility is good and clever
Activity is high.
It should be noted that in this manual, such as first and second or the like relational terms are used merely to one
Individual entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operate it
Between there is any this actual relation or order.And, term " including ", "comprising" or its any other variant be intended to
Cover including for nonexcludability, so that process, method, article or equipment including a series of key elements not only include those
Key element, but also other key elements including being not expressly set out, or also include for this process, method, article or set
Standby intrinsic key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that
Also there is other identical element in the process including the key element, method, article or equipment.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or uses the present invention.
Various modifications to these embodiments will be apparent for those skilled in the art, as defined herein
General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, the present invention
The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one
The scope most wide for causing.
Claims (10)
1. a kind of communications protocol transition card, it is characterised in that including the drive circuit, micro-control unit MCU, the complexity that are sequentially connected
Programmable logic controller (PLC) CPLD and hardware interface, wherein:
The drive circuit, for the first protocol data frame that the first communication apparatus sends to be converted into what the MCU can be recognized
First protocol data frame;It is additionally operable to that the second protocol data frame that the MCU sends is converted to first communication apparatus and can be known
Other second protocol data frame;
The MCU, for parsing first protocol data frame, obtains parsing data, and the parsing data are sent out
In delivering to the Mail OUT addresses of the CPLD;It is additionally operable to read data from the Mail in of the CPLD, and by the data
It is assembled into the second protocol data frame and sends to the drive circuit;
The CPLD, for when its Mail OUT address receives the parsing data, notifying that second communication apparatus is read
Take the parsing data;It is additionally operable to deposit the data that second communication apparatus sends in its Mail in address, and notifies institute
State MCU and read the data;
The hardware interface, for realizing the data interaction between the CPLD and second communication apparatus.
2. communications protocol transition card as claimed in claim 1, it is characterised in that the MCU includes:
Serial port module, for obtaining first protocol data frame and the second protocol data frame using interrupt mode;
User equipment, for receiving first protocol data frame from the serial port module, and calls parsing module;
The parsing module, for parsing first protocol data frame, obtains parsing data, and by the parsing number
According in transmission to the Mail OUT addresses of the CPLD;
The data for reading data from the Mail in of the CPLD, and are assembled by assembling module, obtain described
Second protocol data frame;
State machine is sent, for the second protocol data frame to be sent to the serial port module.
3. communications protocol transition card as claimed in claim 2, it is characterised in that the serial port module is additionally operable to judge whether
First protocol data frame is received in Preset Time, when being not received by first protocol data frame in Preset Time
When, send fault warning.
4. communications protocol transition card as claimed in claim 2, it is characterised in that the user equipment is additionally operable to judge described
It is pre-conditioned whether the first protocol data frame meets, if it is, carrying out subsequent step;Otherwise, the first agreement number is abandoned
According to frame.
5. communications protocol transition card as claimed in claim 4, it is characterised in that described pre-conditioned including the first default bar
It is part, second pre-conditioned, the 3rd pre-conditioned and the 4th pre-conditioned, wherein, described first it is pre-conditioned be the described first association
The first character section for discussing data frame is correct, described second it is pre-conditioned for first protocol data frame for receiving has not timed out and
Lead code is correct, and the described 3rd pre-conditioned frame head data for first protocol data frame meets frame head verification condition, institute
State the 4th pre-conditioned data bin data for first protocol data frame and meet data segment verification condition.
6. communications protocol transition card as claimed in claim 3, it is characterised in that the transmission state machine is specifically for when receiving
During to the second protocol data frame, enable and send pin, it is straight that beginning sends the second protocol data frame in units of byte
Pin enable is sent completely and received to the second protocol data frame.
7. the communications protocol transition card as described in claim any one of 1-6, it is characterised in that the agreement is BACnet/
MSTP agreements.
8. communications protocol transition card as claimed in claim 7, it is characterised in that the drive circuit is 485 drive circuits.
9. communications protocol transition card as claimed in claim 7, it is characterised in that the MCU is Cortex-M4 processors.
10. communications protocol transition card as claimed in claim 7, it is characterised in that the hardware interface is that 34 pin arrange pin.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611238924.0A CN106713325B (en) | 2016-12-28 | 2016-12-28 | Communication protocol conversion card |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611238924.0A CN106713325B (en) | 2016-12-28 | 2016-12-28 | Communication protocol conversion card |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106713325A true CN106713325A (en) | 2017-05-24 |
CN106713325B CN106713325B (en) | 2020-06-30 |
Family
ID=58903683
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611238924.0A Active CN106713325B (en) | 2016-12-28 | 2016-12-28 | Communication protocol conversion card |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106713325B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108829629A (en) * | 2018-06-19 | 2018-11-16 | 夏华涛 | The means of communication and device |
CN110247936A (en) * | 2019-08-01 | 2019-09-17 | 深圳市英威腾电气股份有限公司 | A kind of communications protocol transition card and Conversion System of Communication Protocol |
CN110430016A (en) * | 2019-08-01 | 2019-11-08 | 青岛海信宽带多媒体技术有限公司 | A kind of data receiver method, device and optical module |
CN110780650A (en) * | 2019-10-18 | 2020-02-11 | 浙江中控技术股份有限公司 | Communication bus protocol conversion method and system |
CN112104664A (en) * | 2020-11-02 | 2020-12-18 | 长沙树根互联技术有限公司 | Protocol conversion method, device and equipment for data of Internet of things |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103529804A (en) * | 2013-10-25 | 2014-01-22 | 深圳市汇川控制技术有限公司 | Distributed control system based on EtherCAT bus |
US20140099129A1 (en) * | 2012-10-05 | 2014-04-10 | Alstom Technology Ltd | Networks and methods for reliable transfer of information between industrial systems |
CN104506208A (en) * | 2014-12-23 | 2015-04-08 | 天津光电通信技术有限公司 | One-to-multipoint duplex communication device based on RS-232C protocols |
CN104753958A (en) * | 2015-04-17 | 2015-07-01 | 深圳市英威腾电气股份有限公司 | Card and method for converting communication protocols |
-
2016
- 2016-12-28 CN CN201611238924.0A patent/CN106713325B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140099129A1 (en) * | 2012-10-05 | 2014-04-10 | Alstom Technology Ltd | Networks and methods for reliable transfer of information between industrial systems |
CN103529804A (en) * | 2013-10-25 | 2014-01-22 | 深圳市汇川控制技术有限公司 | Distributed control system based on EtherCAT bus |
CN104506208A (en) * | 2014-12-23 | 2015-04-08 | 天津光电通信技术有限公司 | One-to-multipoint duplex communication device based on RS-232C protocols |
CN104753958A (en) * | 2015-04-17 | 2015-07-01 | 深圳市英威腾电气股份有限公司 | Card and method for converting communication protocols |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108829629A (en) * | 2018-06-19 | 2018-11-16 | 夏华涛 | The means of communication and device |
CN110247936A (en) * | 2019-08-01 | 2019-09-17 | 深圳市英威腾电气股份有限公司 | A kind of communications protocol transition card and Conversion System of Communication Protocol |
CN110430016A (en) * | 2019-08-01 | 2019-11-08 | 青岛海信宽带多媒体技术有限公司 | A kind of data receiver method, device and optical module |
CN110780650A (en) * | 2019-10-18 | 2020-02-11 | 浙江中控技术股份有限公司 | Communication bus protocol conversion method and system |
CN110780650B (en) * | 2019-10-18 | 2020-11-20 | 浙江中控技术股份有限公司 | Communication bus protocol conversion method and system |
CN112104664A (en) * | 2020-11-02 | 2020-12-18 | 长沙树根互联技术有限公司 | Protocol conversion method, device and equipment for data of Internet of things |
Also Published As
Publication number | Publication date |
---|---|
CN106713325B (en) | 2020-06-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106713325A (en) | Communication protocol conversion card | |
CN100496048C (en) | Multi-host communication system | |
CN103440219B (en) | A kind of versabus Bridge IP kernel | |
CN102780705B (en) | Ethernet-(controller area network) CAN protocol converter | |
CN107948059A (en) | EtherCAT and Modbus protocol conversion gateways based on SPARC architecture microprocessors | |
CN105975424A (en) | Master-slave serial communication protocol | |
CN108255754B (en) | A kind of I3C main equipment of compatible I2C, I3C master-slave equipment communication system and method | |
CN203745974U (en) | Multi-serial port server | |
CN104104412A (en) | Direct memory access (DMA) based power line network system and communication method thereof | |
CN105356991A (en) | Driver real-time synchronization communication device | |
CN205563555U (en) | Implementation system of self -defined variable bit wide SPI bus agreement based on FPGA | |
CN109309595A (en) | Data transmission method, device and electronic equipment based on Ethernet | |
CN106657115A (en) | Frequency converter control system and protocol conversion card thereof | |
CN108512907A (en) | The equipment communication means of half transparent transmission | |
CN202696655U (en) | Multi-interface to E1 protocol converter | |
CN207968522U (en) | A kind of RS485 bus driving circuits for realizing multi-host communication mode | |
CN116521609A (en) | Multi-host and multi-slave system, ZYNQ arbiter and data processing method thereof | |
CN110300042A (en) | A kind of bus communication system and communication control method | |
CN102420734A (en) | System for realizing topological structure of controller area network (CAN) bus | |
CN201601690U (en) | Input-output module based on EtherCAT technique | |
CN205195730U (en) | Real -time ethernet etherCAT slave station system | |
CN108259275A (en) | A kind of Ethernet data transmitting device | |
CN106603430A (en) | SOPC-based general data communication interface integration method | |
CN207543138U (en) | A kind of data transmission system of more industrial bus | |
CN105955103A (en) | HMI and PLC data communication method and device based on S7 protocol |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |