09.09.2023 Views

CC220_Serial Communications

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Serial Communications

RS-232C / V.24 Standards

The EIA RS-232C (common in U.S.) and the ITU V.24 standards (common in Europe) define

standards for serial data communications. The standards include mechanical, electrical, and

functional specifications. The RS-232C and V.24 standards are essentially equivalent.

EIA = Electronic Industries Association

ITU = International Telegraphic Union (formerly CCITT)

Mechanical Specifications

9-Pin D-Sub Connector

1 5

_______________

\ . . . . . /

\ . . . . /

-----------

6 9

View shown is the cable side of the port

Pin Number Description Abbrev. Direction*

1 Data carrier detect DCD In

2 Receive data RX In

3 Transmit data TX Out

4 Data terminal ready DTR Out

5 Signal ground GND

6 Data set ready DSR In

7 Request to send RTS Out

8 Clear to send CTS In

9 Ring Indicator RI In

* Signal direction assumes the PC or device is a DTE (Data Terminal Equipment) device.

25-Pin D-Sub Connector

1 13

_______________________________

\ . . . . . . . . . . . . . /

\ . . . . . . . . . . . . /

---------------------------

14 25

View shown is the cable side of the port

1


Pin Number Description Abbrev. Direction*

1 Protective ground

2 Transmit data TX Out

3 Receive data RX In

4 Request to send RTS Out

5 Clear to send CTS In

6 Data set ready DSR In

7 Signal ground GND

20 Data terminal ready DTR Out

22 Ring indicator RI In

* Signal direction assumes the PC or device is a DTE (Data Terminal Equipment) device.

Electrical Specifications:

Voltage State

-15V to -3V (typically -12V) Logic 1, “low”, or “mark”

+3V to +15V (typically +12V) Logic 0, “high”, or “space”

-3V to +3V Undefined

Communication Terms:

Baud rate

Start Bit

Data Bits

Stop Bits

Baud rate is a term that refers to the speed of data transmission. It is generally

expressed in bits per second (bps).

A start bit is a high signal on the transmit data line that informs the receiving end

to prepare to receive a character of data.

Bits used to encode data. Generally 7 or 8 data bits are common.

A stop bit is a low signal on the transmit data line that informs the receiving end

that transmission of data bits is complete.

Framing Bits The start bit and stop bit(s), together, are commonly referred to as framing bits.

Parity Bit

A parity bit is an optional bit added to the data bits to allow error detection.

Parity checking is a scheme used to make data transfer more secure (i.e. to reduce

the potential for errors during data transfer). Three settings for parity are

common. They are even, odd, and none. Even parity means that the number of

“low” bits in the data (including the parity bit, but not the framing bits) is always

even. Odd parity means that the number of “low” bits in the data (including the

parity bit, but not the framing bits) is always odd. No parity implies that no parity

bit will follow the data bits. Parity bits are automatically stripped from the data

stream.

2


Serial Data Transfer

Example: The plus sign character, ‘+’ (bit sequence 0101011), is transmitted with 7 data bits,

even parity, and 1 stop bit, as follows

space +---+ +---+ +---+ +------+ high '0' +12V

| S | 1 1 | 0 | 1 | 0 | 1 | 0 P | Stop

mark ----------+ +-------+ +---+ +---+ +------- low '1' -12V

S = start bit P = parity bit Stop = stop bit(s)

Note: The order of transmission is LSB (least significant bit) to MSB (most significant bit).

ASCII Character Set

ASCII (American Standard Code for Information Interchange) is a code that sets a standard for

transmission of character data. The standard ASCII character set utilizes 7 data bits, to uniquely

encode each character. The Bosch control system uses the standard ASCII character set.

3


Handshaking

Handshaking refers to the process by which devices coordinate the transfer of data. This

coordination is accomplished with the help of control signals (hardware) or control characters

(software). The control signals or control characters are used to stop and start the data transfer.

Why is it necessary to stop and start the data transfer?

Problems can arise, for example, if the transmitting device sends data faster than the receiving

device is able to process (normally store) this data. Without the ability to stop the transmitting

device, a temporary storage area, called a buffer, would overflow. Data might be lost.

Communication errors would occur. With handshaking, the receiving device has a chance to

stop the transmitting device, until it can safely process the data.

Two methods of handshaking are commonly used.

Hardware Handshaking

Control signals are used to start and stop the data transfer. Signals commonly used include,

CTS

RTS

DTR

DSR

Clear To Send

Request To Send

Data Terminal Ready

Data Set Ready

Note:

The Bosch control system uses DTR (pin 20) and DSR (pin 6) for hardware handshaking.

Most peripherals use CTS and RTS for hardware handshaking.

Software Handshaking

Control characters are used to start and stop the data transfer. Characters commonly used

include,

ASCII

Char (dec.) Name Description

17 DC1 Data Control 1 (commonly called XON)

19 DC3 Data Control 3 (commonly called XOFF)

4


Serial Communications, Bosch Control System

Serial Interface Ports

CC220 Control System

Two serial communication ports, labeled X11 (V24.1/20mA) and X12 (V24.2), are located on

the CP/MEM board in the CC220 card rack.

Pin Configuration

Pin Configuration (Software Handshaking)

The following pin configurations are required in a serial communications cable when software

handshaking is used.

Bosch CC220

Port X11, X12*

Peripheral

TX

RX

GND

2 --------------- Data ------------------> RX

3 <-------------- Data -------------------- TX

7 ------------------------------------------ GND

*Ports X11 and X12 on the CP/MEM board are 25-pin D-Sub female connectors.

Note: Software handshaking is selected in the Bosch control when soft key SW CONTROL is

highlighted.

Pin Configuration (Hardware Handshaking)

The following pin configurations are required in a serial communications cable when hardware

handshaking is used.

Bosch CC220

Port X11, X12*

25-pin D-Sub

Peripheral

TX 2 --------------- Data ------------------> RX

RX 3 <-------------- Data -------------------- TX

DTR 20 ------------- Status ----------------> CTS**

DSR 6 <-------------- Status ----------------- RTS**

GND 7 ------------------------------------------ GND

* Ports X11 and X12 on the Bosch control are 25-pin female connectors.

** Some peripherals may use other pins for hardware handshaking.

5


Note:

The status signals are not used at baud rates of 600 or less.

Hardware handshaking is selected in the Bosch control when soft key SW CONTROL is

not highlighted.

Communication Settings

Serial communication settings are contained in various locations in the Bosch control system.

The following table contains a list of settings and corresponding locations.

Serial Data Communication Setting

Setting Location

Baud rate Machine Parameter 5502

Data bits

Fixed, 7 data bits

Handshaking

Soft key SW CONTROL

Parity

Fixed, even

Port Selection

Soft key DEVICE SELECT

Start bits

Fixed, 1 start bit

Stop bits Machine Parameter 5503

Machine Parameters

Machine parameters for serial communications are in the range MP 5501 to MP 5507.

P 5501 Soft key text (for peripheral devices 1 to 4)

[1.] 2400 [2.] 2419 [3.] 2416 [4.] 2418

Parameter P 5501 specifies the text for peripheral devices. This text is displayed when

soft key DEVICE SELECT is pressed.

Text number

Text

173 Cassette 4800 Baud

174 Teletype 1200 Baud

178 Teletype 300 Baud

179 Teletype 110 Baud

2400 DCR 4800 Baud

2401 FER 204 1200 Baud

2402 GNT 4604 600 Baud

2403 MINI CASS 2400 Baud

2405 FCT 4030 1200 Baud

2406 FCT 4070 600 Baud

2407 LPR 300 300 Baud

2408 ZIP 30 300 Baud

2409 ZIP 585 300 Baud

2410 Device 1

6


2411 Device 2

2412 Device 3

2413 Device 4

2414 Device 5

2415 CCDISK 4800 Baud

2416 CCDISK 9600 Baud

2417 XTRANS 4800 Baud

2418 XTRANS 9600 Baud

2419 DCR 9600 Baud

P 5502 Baud rate (periph. 1 – 4)

[1.] 4800 [2.] 9600 [3.] 9600 [4.] 9600

A transmission speed (baud rate) is assigned to each device.

Possible inputs:

110 baud

300 baud

600 baud

1200 baud

2400 baud

4800 baud

9600 baud

When selecting a speed, make sure it agrees with the text selected in P 5501.

P5503 Stop bits 1/1.5/2 (periph. 1 – 4) (1 / 1.5 / 2)

[1.] 1 [2.] 1.5 [3.] 2 [4.] 1

Specify the number of stop bits to be used with peripheral devices 1 to 4.

P 5504 Device Timeout (periph. 1 – 4) (Range of values: 0 – 127)

[1.] 15 [2.] 15 [3.] 15 [4.] 15

Specify the time (in seconds) for the peripheral device to respond after soft key START

is pressed during DATA IN and DATA OUT operations. If no response is received, or a

long interrupt is detected, run time error 149, “I/O UNIT TIMEOUT” is displayed.

P 5505

Space between files (periph. 1 – 4) (YES / NO)

[1.] YES [2.] YES [3.] YES [4.] YES

Specifying “YES” causes 110 NUL characters (ASCII character “zero”) to be output

during DATA OUT operations between successive files.

P 5506 Peripheral active on power up (range: 1 – 4)

[NC] 1 [NC2] 1

Specify a peripheral device number (range 1 – 4). The device is identified in P 5501.

7


[NC] Serial data interface 1 (V.24 / 20mA)

[NC2]Serial data interface 2 (V.24)

P 5507 Serial data interface active at power up (NC / NC2)

[IN] NC [OUT] NC

Specify the serial data interface active at power up for DATA IN and DATA OUT

operations.

NC Serial data interface 1 (V.24/20 mA)

NC2 Serial data interface 2 (V.24)

8


DATA IN / DATA OUT Functions

This section describes the DATA IN and DATA OUT functions of the Bosch CC220 control.

These functions are presented at several places in the Bosch user interface. The dialog for these

functions may vary depending on the context in which it appears. This section describes the

dialog presented in operating mode “Data I/O”

The DATA IN and DATA OUT functions are presented in operating mode “Data I/O”.

EDIT DATA IN GRAPHIC

MODE

DATA IN

The following soft keys are displayed:

DATA OUT

MANAGE

DEVICE

SELECT

*STATUS

PROGRAM

NUMBER

DFS PROGR

SEARCH

START

Press “DEVICE SELECT”. The following soft keys are displayed:

*PORT *GNT 4604

600 BAUD

*TTY

300 BAUD

*DCR

9600 BAUD

*DCR

4800 BAUD

Press “*PORT”. The following soft keys are displayed:

*V24.1

20 MA

*V24.2

*DNC-

CHANNEL

Press the soft key corresponding to the desired serial communications port.

Press the backup key. The following soft keys are displayed:

*PORT *GNT 4604

600 BAUD

*TTY

300 BAUD

*DCR

9600 BAUD

*DCR

4800 BAUD

Press the soft key corresponding to the desired peripheral device. The baud rate is also selected

with this soft key.

Press the backup key. The following soft keys are displayed:

DEVICE

SELECT

*STATUS

PROGRAM

NUMBER

DFS PROGR

SEARCH

START

Press the soft key “*STATUS”. The following soft keys are displayed:

9


*SW

CONTROL

Select the type of handshaking with soft key “*SW CONTROL”.

SW CONTROL highlighted indicates software handshaking active.

SW CONTROL not highlighted indicates hardware handshaking active.

Press the backup key. The following soft keys are displayed:

DEVICE

SELECT

*STATUS

PROGRAM

NUMBER

DFS PROGR

SEARCH

START

If the data to be loaded consists of a complete program, including a program identification block

(DFS block), press soft key “START”.

If the data to be loaded consists of a single program with no part program identification block

(DFS block), press soft key “PROGRAM NUMBER”. Enter a program number at the prompt.

Then press soft key “START”.

If the data to be loaded consists of multiple programs, of which, only one is to be stored, press

soft key “DFS PROGR SEARCH”. Enter a program number at the prompt. Then press soft key

“START”.

The program is read in. The data transfer may be stopped at any time by pressing soft key

“ABORT”.

When the data transfer is complete, the following soft keys appear.

DEVICE

SELECT

*STATUS PROGRAM

NUMBER

DFS PROGR

SEARCH

START

DATA OUT

The following soft keys are displayed:

DEVICE

SELECT

*STATUS

PART

PROGRAM

SEVERAL

FILES

Press “DEVICE SELECT”. The following soft keys are displayed:

*PORT *GNT 4604

600 BAUD

*TTY

300 BAUD

*DCR

9600 BAUD

*DCR

4800 BAUD

Press “*PORT”. The following soft keys are displayed:

*V24.1

20 MA

*V24.2

*DNC-

CHANNEL

10


Press the soft key corresponding to the desired serial communications port.

Press the backup key. The following soft keys are displayed:

*PORT *GNT 4604

600 BAUD

*TTY

300 BAUD

*DCR

9600 BAUD

*DCR

4800 BAUD

Press the soft key corresponding to the desired peripheral device. The baud rate is also selected

with this soft key.

Press the backup key. The following soft keys are displayed:

DEVICE

SELECT

*STATUS

PROGRAM

NUMBER

DFS PROGR

SEARCH

START

Press the soft key “*STATUS”. The following soft keys are displayed:

*SW

CONTROL

*DFS

RECOGNIZE

*WITH

LEADER

*WITH

TRAILER

Select the type of handshaking with soft key “*SW CONTROL”.

SW CONTROL indicates software handshaking active.

SW CONTROL not highlighted indicates hardware handshaking active.

If a program identification block (DFS block) is to be output with the data (highly

recommended), highlight the soft key “DFS RECOGNIZE”.

It is not normally necessary to highlight the soft keys, “*WITH LEADER” and “*WITH

TRAILER”. These keys cause leading and trailing NUL characters to the beginning and end of

program data.

Press the backup key. The following soft keys are displayed:

DEVICE

SELECT

*STATUS

PART

PROGRAM

SEVERAL

FILES

To output a single program, press soft key “PART PROGRAM”. Enter the program number

when prompted.

To output several programs, press soft key “SEVERAL FILES”. The following soft keys are

displayed:

11


PART

PROGRAM

MAIN AND

SUBPROGRAM

ALL

PROGRAMS

OTHER

FILES

Use these soft keys to build a list of programs to be output.

After the program number has been entered (soft key “PART PROGRAM”) or the list of

programs has been built (soft key “SEVERAL FILES”), press soft key “START”.

The selected data is output to the selected serial communications port. If hardware handshaking

is active, data is sent only after input signal, Data Set Ready (pin #6), goes high. If software

handshaking is active, data is sent immediately.

12


DNC Program

DNC.DOC-DOCUMENT FILE FOR DNC.EXE

TRUMPF DNC PROGRAM DNC.EXE REVISION 6-7-94

The TRUMPF DNC program is a program that may be used to send and

receive programs from an IBM compatible PC and a Bosch control.

The program supports 9600,4800 and 600 baud and software or

hardware handshaking through COM1 or COM2.

Pin Connections

Typical configuration:

Bosch

PC

25 PIN MALE 9 PIN FEMALE

2 ----------------- 2

3 ----------------- 3

6 ----------------- 4

20 ----------------- 6

7 ----------------- 5

Loading the program

Copy the file DNC.EXE from the floppy disk onto your hard drive.

The file should go into a directory specified in your PATH. If

in doubt, copy the file into the root directory. (Example COPY

A:DNC.EXE \ )

Setting up the Bosch control

DEVICE SELECT - 9600,4800, OR 600 BAUD

PORT - V24.1 or ON PANEL (depending upon software level)

STATUS - SW CONROL not highlighted (hardware handshake is

desired)

Using the program to transfer programs

Place yourself in the proper directory.

Call up the program by typing DNC.

The current PC port and baud rate are displayed above the

command line.

13


The commands are

C - Change communication settings

This brings up choices for Comm port 1 or 2, and baud rate

600,4800,9600.

The next selection is software or hardware handshake. The

desired selection is hardware, if sw control was not

highlighted.

These changes can then be saved to disk so the next time that

DNC is called up, the settings are recalled when DNC is run from

this directory.

D- Change directory

This will allow the user to change the current directory for

file transfer

S - Send file

This will display a choice to press K to key in the name, or L

to select the files from a list. If L is pressed, move the

cursor to the desired file to send, and press enter, or press K

to key in the name. After file has been selected, press --DATA

IN--START-- on the Bosch control to start transmission. When

hardware handshaking is active, this must be done within 20

seconds.

R - Receive file

This will ask for filename to receive, then opens that file on

the PC. To send the file to the PC, press --DATA OUT-- enter

program(s) to send --START-- . When all programs are finished

being sent, press any key to return to the main menu.

Q – Quit

This will quit the program, and go back to DOS.

14


Diagnostics

Several tools are available to aid in solving data communication problems.

The Bosch control system includes a diagnosic program, D6 – SERIAL INTERFACE DATA.

This program can be used to display data input to the Bosch control system. Refer to a manual

from Bosch titled “Typ1 osa / CC220 Diagnosis, Operation, Applikation” (Bosch Part Nr.

4228/E1 – 10/91), for more information on this diagnostic program.

A breakout box is a useful tool for diagnosing serial interface problems. A breakout box can be

used to examine individual signal status and switch signal lines.

15


Bosch Data Format

Input Data

For data input to the Bosch control system, the following format is generally recommended,

<LF>

(DFS, … )<LF> Program identification

… <LF>

Program block

… <LF>

Program block

… <LF>

Program block

… <LF>

Program block

M02<LF>

End of program

Notes:

All characters prior to the first line feed character, <LF>, are stripped from the data

stream.

The end of program code, “M30”, may be used in place of “M02”.

A line feed character, <LF>, must follow the end of program code, “M02” or “M30”.

An optional carriage return character, can preceed a line feed character in the input data.

The program identification block is optional, but must be used if the soft key

“PROGRAM” is not pressed during the “DATA IN” dialogue.

Certain control characters, if present in the data stream, are filtered (i.e. stripped) by the

Bosch control on input. These characters include the following,

ASCII

Char(dec.) Name Description

2 STX Start of text

3 ETX End of text

18 DC2 Data control 2, Device ON

20 DC4 Data control 4, Device OFF

Output Data

The output data format varies depending on the type of handshaking used.

Output Data Format with Hardware Handshaking

Hardware handshaking is specified when soft key “SW CONTROL” is not highlighted.

Data is output with the following format when hardware handshaking is used.

<STX><LF>

(DFS, …)<LF>

Program identification

16


… <LF>

… <LF>

… <LF>

… <LF>

M02<LF>

<ETX>

Program block

Program block

Program block

Program block

End of program

Note:

The program identification block is only output if soft key “DFS RECOGNIZE” is

highlighted.

Output Data Format with Software Handshaking

Software handshaking is specified when soft key “SW CONTROL” is highlighted.

Data is output with the following format when software handshaking is used.

<DC2><STX><LF>

(DFS, …)<LF>

… <LF>

… <LF>

… <DC4><DC2>… <LF>

… <LF>

M02<LF>

<ETX><DC4>

Program identification

Program block

Program block

Program block

Program block

End of program

Note:

The control characters, <DC2> and <DC4>, are device control characters that appear in

the data stream on output. They are NOT part of the data, and can be filtered (i.e.

stripped) from the data stream. Some serial communication programs provide a setting to

perform this function. The “Replace” function on many text editors can also be used to

remove these characters. It is not necessary to filter these control characters, however,

since the Bosch control system automatically filters these characters from the data stream

on input.

The program identification block is only output if soft key “DFS RECOGNIZE” is

highlighted.

17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!