• 沒有找到結果。

Parameterization Data of the ASCII Driver

在文檔中 The AS-i Master 2 (頁 129-136)

Basic Principles of Serial Data Transmission

2.3 Parameterization Data

2.3.3 Parameterization Data of the ASCII Driver

Using the parameterization data of the ASCII driver, you can adjust the CP 340 to suit the properties of the communication partner.

Using the CP 340: Point-to-Point Communication, Parameter Assignment parameterization interface, specify the parameters for the physical layer (layer 1) of the ASCII driver. The parameters are described in detail below.

Section 5.2 describes how to enter parameterization data via the CP 340:

Point-to-Point Communication, Parameter Assignment parameterization interface.

Please note the following in relation to the X27 (RS 422/485) interface:

Note

In the case of the CP 340-RS 422/485 module variant, the ASCII driver can be used in four-wire mode (RS 422) and two-wire mode (RS 485).

At parameterization, you must specify the type of interface (RS 422 or RS 485).

Introduction

Parameterization Data of the ASCII Driver

X27 (RS 422/485) Interface

Basic Principles of Serial Data Transmission 如果想去掉该提示,请访问并下载:

http://www.jisupdfeditor.com/

长沙工控帮教育科技有限公司整理

2-44 CP 340 Point-to-Point Communication ASE00053578-05

The table below describes the protocol parameters.

Table 2-6 Protocol Parameters (ASCII Driver)

Parameter Description Value Range Default Value

Indicator for end of receive mes-sage frame

Defines which criterion signals the end of each message frame.

• On expiry of char-acter delay time

• On receipt of end-of-text character

• On receipt of fixed number of

The character delay time defines the maximum permitted time between 2 consecutively received characters.1

4 to 65535 ms • 4 ms

Second end code, if specified. • With 7 data bits3: 0 to 7FH (Hex)

When the end criterion is ”fixed mes-sage frame length”, the number of by-tes making up a message frame is de-fined.

1 to 1024 (bytes) • 240

1 The shortest possible character delay time is the time needed to transmit 4 characters.

2 Can only be set if the end criterion is an end-of-text character.

3 Depending on the parameterization of the character frame (7 or 8 data bits) (see Table 2-7).

4 Can only be set if the end criterion is a fixed message frame length.

Protocol Parameters

Basic Principles of Serial Data Transmission 如果想去掉该提示,请访问并下载:

http://www.jisupdfeditor.com/

长沙工控帮教育科技有限公司整理

2-45

CP 340 Point-to-Point Communication ASE00053578-05

The table below describes the parameters for the baud rate and character frame.

Table 2-7 Baud Rate / Character Frame (ASCII Driver)

Parameter Description Value

Range

Default Value

Baud rate Speed of data transmission in bits/s

Note that the ASCII driver can be operated in full-duplex mode.

• 2400

• 4800

• 9600

• 9600

Start bit During transmission, a start bit is prefixed to each character to be sent.

• 1 (fixed value)

• 1

Data bits Number of bits onto which a character is mapped.

• 7

• 8

• 8

Stop bits During transmission, stop bits are appended to every character to be sent, indicating the end of the character.

• 1

• 2

• 1

Parity A sequence of information bits can be extended to include another bit, the parity bit. The addition of its value (0 or 1) brings the value of all the bits up to a defined status, thus enhanc-ing data integrity.

A parity of ”none” means that no parity bit is sent.

A parity of ”any” means that when data is sent the CP 340 sets the parity to 0. When data is re-ceived, the parity is not checked.

• none

Basic Principles of Serial Data Transmission 如果想去掉该提示,请访问并下载:

http://www.jisupdfeditor.com/

长沙工控帮教育科技有限公司整理

2-46 CP 340 Point-to-Point Communication ASE00053578-05 Table 2-7 Baud Rate / Character Frame (ASCII Driver)

Parameter Value Default Value

Range Description

Activate BREAK monitoring

You can choose whether the monitoring on an interrupted receive line should be activated or deactivated.

If a BREAK monitoring is deactivated during a Break, a) an entry is not made into the

diagnostic buffer and the FB-RECV is not triggered with the set ERROR–Bit and the corresponding STATUS entry)

b) triggered send requests are output to the user without an error message.

• yes

• no

depending on the HW variant used and the selected operating mode:

RS232: • yes TTY: • yes

RS422 for R(A)5V/R(B)0V:

• yes

(cannot be deactivated) RS422/RS485 for

R(A)0V/R(B)5V:

• no

(cannot be activated)

For this HW variant RS422, this parameter is directly influenced via the selected initial state of the receive line in the

“Interface” folder.

Basic Principles of Serial Data Transmission 如果想去掉该提示,请访问并下载:

http://www.jisupdfeditor.com/

长沙工控帮教育科技有限公司整理

2-47

CP 340 Point-to-Point Communication ASE00053578-05

In the following table the parameters for data flow control are described.

Data flow control is not possible with the RS 485 interface. Data flow control with ”RTS/CTS” and ”automatic use of V24 signals” is only possible with the RS 232C interface (see also Table 1-2).

Table 2-8 Data Flow Control (ASCII Driver)

Parameter Description Value Range Default Value

Data flow control Defines which type of data flow control is used.

• None

• XON/XOFF

• RTS/CTS

• Automatic use of the V24 signals

• None

XON character1 Code for XON character • With 7 data bits2: 0 to 7FH (Hex)

• With 8 data bits2: 0 to FFH (Hex)

• 11 (DC1)

XOFF character1 Code for XOFF character • With 7 data bits2: 0 to 7FH (Hex)

Period of time for which the CP 340 shall wait for the XON code or for CTS=“ON” of the com-munication partner when sending.

20 to 655350 ms in 10-ms increments

• 2000 ms

Time to RTS OFF4

Time to elapse after the transmis-sion before the CP 340 sets the RTS line to OFF.

0 to 655350 ms in 10 ms steps

• 10 ms

Data output wai-ting time4

Time that the CP 340 is to wait for the communication partner to set CTS to ON after setting the RTS line to ON and before starting the transmission.

0 to 655350 ms in 10 ms steps

• 10 ms

1 Only in the case of XON/XOFF data flow control

2 Depending on whether you parameterize 7 or 8 data bits for the character frame (see Table 2-7)

3 Only in the case of XON/XOFF or RTS/CTS flow control

4 Only in the case of automatic use of the RS 232C secondary signals

You will find more information on data flow control with XON/XOFF and RTS/CTS and on automatic use of the RS 232C secondary signals in Section 2.2.3 as of the subsection entitled ”RS 232C Secondary Signals”.

Data Flow Control

More Information

Basic Principles of Serial Data Transmission 如果想去掉该提示,请访问并下载:

http://www.jisupdfeditor.com/

长沙工控帮教育科技有限公司整理

2-48 CP 340 Point-to-Point Communication ASE00053578-05

The table below describes the parameters for the CP receive buffer.

Table 2-9 Receive Buffer on CP (ASCII Driver)

Parameter Description Value Range Default Value

Delete CP receive buffer at start-up1

Here you can specify whether the CP receive buffer is to be deleted during start-up, or whether an existing (old) message frame is to be passed on to the CPU.

• yes

• no

• yes

Buffered receive message frames1

Here you can specify the number of re-ceive message frames to be buffered in the CP receive buffer.

If you specify ”1” here and deactivate the following parameter ”prevent over-write” and cyclically read the received data from the user program, a current message frame will always be sent to the CPU.

1 to 250 250

Prevent overwrite You can deactivate this parameter if the parameter ”buffered receive message frames” is set to ”1”. This authorizes the buffered receive message frame to be overwritten.

1 If several message frames are buffered, the CP 340 always sends only the oldest to the CPU (ring buffer)

In Section 2.2.3 you can find further information on handling the receive buffer under “Receive Buffer on CP 340”.

Receive Buffer on CP 340

Further Information

Basic Principles of Serial Data Transmission 如果想去掉该提示,请访问并下载:

http://www.jisupdfeditor.com/

长沙工控帮教育科技有限公司整理

2-49

CP 340 Point-to-Point Communication ASE00053578-05

The table below contains descriptions of the parameters for the X27 (RS 422/485) interface.

Table 2-10 X27 (RS 422/485) Interface (ASCII Driver)

Parameter Description Value Range Default Value

Operating mode Specifies whether the

X27 (RS 422/485) interface is to be run in full-duplex mode (RS 422) or half-duplex mode (RS 485).

(See also Section 2.1).

• Full-duplex

Initial state of the receive line

See Figure 2-16.

R(A)0V/R(B)5V: This initial state corresponds to the idle state (no sender active) in half-duplex (RS485) two-wire mode”.

• R(A)5V / R(B)0V

• R(A)0V / R(B)5V

• R(A)5V / R(B)0V

Figure 2-16 illustrates the wiring of the recipient at the X27 (RS 422/ 485) interface:

Figure 2-16 Wiring of the Recipient at the X27 (RS 422/485) Interface X27 (RS 422/485)

Interface

Initial State of the Receive Line

Basic Principles of Serial Data Transmission 如果想去掉该提示,请访问并下载:

http://www.jisupdfeditor.com/

长沙工控帮教育科技有限公司整理

2-50 CP 340 Point-to-Point Communication ASE00053578-05

在文檔中 The AS-i Master 2 (頁 129-136)