Basic Principles of Serial Data Transmission
2.1 Serial Transmission of a Character
For the exchange of data between two or more communication partners, various networking possibilities are available. The simplest form of data interchange is via a point-to-point connection between two communication partners.
In a point-to-point connection the CP 340 communications processor forms the interface between a programmable controller and a communication partner. In a point-to-point connection with the CP 340, the data is transmitted serially.
In serial transmission, the individual bits of each byte of information are transmitted one after the other in a fixed order.
The CP 340 itself handles data transmission with communication partners via the serial interface. The CP 340 is equipped with three different drivers for this purpose.
• Unidirectional data traffic:
– Printer driver
• Bidirectional data traffic:
– ASCII driver – 3964(R) procedure
The CP 340 handles data transmission via the serial interface in accordance with the interface type and the selected driver.
In the case of printer output (printer driver), n bytes of user data are output to a printer. No characters are received. The only exception to this are data flow control characters (e.g. XON/XOFF).
Introduction
Point-to-Point Connection
Serial
Transmission
Uni/Bidirectional Data Traffic
Unidirectional Data Traffic - Printer Output
Basic Principles of Serial Data Transmission 如果想去掉该提示,请访问并下载:
http://www.jisupdfeditor.com/
长沙工控帮教育科技有限公司整理
2-3
CP 340 Point-to-Point Communication ASE00053578-05
The CP 340 has two operating modes for bidirectional data traffic:
• Half-duplex operation (3964(R) procedure, ASCII driver)
Data is exchanged between the communication partners but only in one direction at a time. In half-duplex operation, therefore, at any one time data is being either sent or received. The exception to this may be individual control characters for data flow control (e.g. XON/XOFF), which can also be sent during a receive operation or received during a send operation.
• Full-duplex operation (ASCII driver)
Data is exchanged between two or more communication partners in both directions simultaneously. In full-duplex operation, therefore, data can be sent and received at the same time. Every communication partner must be able to operate a send and a receive facility simultaneously.
You can choose between half-duplex operation (RS 485) and full-duplex operation (RS 422) when using the CP 340-RS 422/485 module variant.
With the CP 441, serial transmission occurs asynchronously. The so-called timebase synchronism (a fixed timing code used in the transmission of a fixed character string) is only upheld during transmission of a character. Each character to be sent is preceded by a synchronization impulse, or start bit.
The length of the start-bit transmission determines the clock pulse. The end of the character transmission is signaled by the stop bit.
As well as the start and stop bits, further declarations must be made between the sending and receiving partners before serial transmission can take place.
These include:
• Transmission speed (baud rate)
• Character and acknowledgment delay times
• Parity
• Number of data bits
• Number of stop bits
• Number of setup and transmission attempts permitted
Sections 2.2 and 2.3 describe the importance of the declarations in the various transmission procedures, and how they are parameterized.
Bidirectional Data
Basic Principles of Serial Data Transmission 如果想去掉该提示,请访问并下载:
http://www.jisupdfeditor.com/
长沙工控帮教育科技有限公司整理
2-4 CP 340 Point-to-Point Communication ASE00053578-05
Data is transmitted between the CP 340 and a communication partner via the serial interface in a 10-bit or 11-bit character frame. Three data formats are available for each character frame. You can parameterize the format you require using the parameterization interface CP 340: Point-to-Point Communication, Parameter Assignment.
The figure below shows the three possible data formats for a 10-bit character frame.
1
1 party bit
2 8 9 10
1 2 9 10
1 start bit
1
7 data bits
2 8
2 stop bits
10 9 7 data bits: 1 start bit, 7 data bits, 2 stop bits
Signal state ”1”
Signal state ”0”
7 data bits: 1 start bit, 7 data bits, 1 parity bit, 1 stop bit
8 data bits: 1 start bit, 8 data bits, 1 stop bit
1 stop bit
1 start bit 7 data bits 1 stop bit
1 start bit 8 data bits
Signal state ”1”
Signal state ”0”
Signal state ”1”
Signal state ”0”
Figure 2-1 10-Bit Character Frame Character Frames
10-Bit Character Frame
Basic Principles of Serial Data Transmission 如果想去掉该提示,请访问并下载:
http://www.jisupdfeditor.com/
长沙工控帮教育科技有限公司整理
2-5
CP 340 Point-to-Point Communication ASE00053578-05
The figure below shows the three possible data formats for an 11-bit character frame.
1
7 data bits
2 8 9 10 11
1
8 data bits
2 9 10 11
1 2 9
2 stop bits
11 10 8 data bits: 1 start bit, 8 data bits, 1 parity bit, 1 stop bit
8 data bits: 1 start bit, 8 data bits, 1 stop bit Signal state ”1”
Signal state ”0”
Signal state ”1”
Signal state ”0”
Signal state ”1”
Signal state ”0”
1 parity bit 1 stop bit
1 start bit 8 data bits
1 start bit 2 stop bits1 party bit
1 start bit
7 data bits: 1 start bit, 7 data bits, 1 parity bit, 2 stop bits
Figure 2-2 11-Bit Character Frame 11-Bit Character
Frame
Basic Principles of Serial Data Transmission 如果想去掉该提示,请访问并下载:
http://www.jisupdfeditor.com/
长沙工控帮教育科技有限公司整理
2-6 CP 340 Point-to-Point Communication ASE00053578-05
The figure below shows the maximum time permitted between two characters received within a message frame. This is known as the character delay time.
1 Signal
nth character (n + 1)th character
Time t Character delay time
Figure 2-3 Character Delay Time Character Delay
Time
Basic Principles of Serial Data Transmission 如果想去掉该提示,请访问并下载:
http://www.jisupdfeditor.com/
长沙工控帮教育科技有限公司整理
2-7
CP 340 Point-to-Point Communication ASE00053578-05