DF1 protocol outlined

DF1 protocol

1. Outline

Programmable logic controller (PLC) programming convenience due to, anti-interference ability, has been widely used in various fields. AB, DF1 protocol is widely supported by the programmable controller system data link layer communication protocol, the series of programmable controller and a computer with communications software RSLinx DF1 protocol support. It is based on a physical layer, such as electrical RS232 and RS485 standard, the establishment of various application layer commands for different devices. Comprehensive physical layer, the data link layer and application layer to complete DF1 communication protocol.

2. Network Model 

Compared to the OSI network model, DF1 protocol application relates to the physical layer, data link layer and application layer.

The greatest feature of the joint DF1 protocol specification ANSI x3.28 D1 (data transparency) and F1 (internal bidirectional simultaneous transmission and response). Transparency is a simple data packet format and data readability, and internal bidirectional simultaneous transmission in response to the physical layer refers RXD and TXD data are transmitted simultaneously in. DF supports full or half duplex communication, corresponding to different physical network topology, requires full-duplex communication based on the RS232 / RS422 and other network deployment, based on half-duplex communication requires RS485 network deployment.

3. DF1 protocol

3.1 DF1 protocol application classification

DF1 protocol two main categories: DF1 half-duplex protocol (master-slave communications), and full-duplex protocol DF1 (point to point communication).

Half-duplex DF1 master is a multidrop master-slave protocol multiple single, master slave communication start timing of polling from the network through. Half-duplex protocol is a protocol to support a master from multiple communication method, allowing 2-255 nodes simultaneously connected by modems to a single link. If only one slave, a slave can be connected directly to the master station. DF1 full-duplex protocol is a point to point communication protocol, the specific main are: 1) allows simultaneous transmit and receive data in the point to point link; 2) interaction modules in the link data having the arbitration function multidrop; 3) the protocol performance implement the program should get a large flow of data from the transmission medium as much as possible. When the interactive module is connected via AB communication module, a communication module automatically arbitration function. If the system is used for less demanding real-mode half-duplex communication, full-duplex mode and vice versa.

Control characters in the full and half duplex communication, data frame format, the data processing flow are different, the processing must be distinguished.

3.2 DF1 control characters

DF1 protocol using asynchronous communication, data is transmitted frame by frame basis. DF1 protocol control characters are ASCII control characters, usually it consists of 7 bits, it is necessary to add an 8-bit data constituting the front. DF1 protocol is through a combination of some control characters, the special configuration of control signals and data signals. Control and data signals composed of control characters to be transmitted continuously, the middle do not have other characters. Control signal is a fixed combination and the content of the data signal is variable.

Full-duplex and half-duplex transmission signal to transmit signals compared to identify DLE NAK here no reset action, DLE ENQ is not a polling message identifies the beginning, but requires them to resend the same as other identification means. Stage a full half-duplex transmission signal than a transmission signal multiple DLE SOH (10 01), DLE EOT (10 04), STN and other identification. Full-duplex two main DF1 mainly by: transmitting and receiving a main program main achieve both transmit and receive simultaneously, which reflects the characteristics of the bidirectional simultaneous transmission of DF1. DF1 full-duplex implementation process on relatively simple, basic pitch-catch is, after transmitting the feedback message to determine whether the information received correctly, if not the retransmission of an error, or the like operation.

3.3 DF1 message frame format

Using the following three kinds of half-duplex protocol message frame format:

 

Full-duplex protocols usually only half-duplex protocol frame format of the third message: from the message frame format is as follows:

 

In general, the application message frame format is as follows:

 

DF1 providing two check methods: BCC and CRC check, the BCC is an accumulation check algorithm, simple but limited functionality, typically use a CRC check. Although the use of CF1 CRC check CRC-16 standard, but the CRC-16 used is slightly different, which CRC register initial value 0x0000h, instead 0XFFFFH.

 

reference:

1. C language program design is based on the linux platform of serial communication protocol df1

2. DF1 communication protocol based on the application in practice of aluminum flue gas cleaning monitoring system

3. https://github.com/leicht/Df1

4. Application of wireless control scheme based on AB DF1 serial protocol in Nanjing subway system BAS Remote Monitoring

5. DF1 Protocol and Command Set Reference Manual

6. Allen-Bradley on DF1

7. How to Connect to an Allen-Bradley SLC 500 PLC

8. 罗克韦尔官网

9. http://www.iatips.com/pccc_tips.html

Guess you like

Origin www.cnblogs.com/embedded-linux/p/12078128.html