ASCII over TCP/IP

See also: Ethernet Configuration Overview

 

Topic Menu

 

ASCII over TCP/IP Overview

This protocol is designed to send and receive ASCIIClosed ASCII - American Standard Code for Information Interchange - ASCII-coded characters are single-byte values in the range of 0 (zero) to 127. Codes in the range 128 to 255 are not defined by the ASCII standard, but rather by the equipment manufacturer. data over Ethernet port of the controllers. Controller acts as a server while using this protocol.

Minimum version requirements for ASCII over TCP/IP:

  • Firmware 12.6 or later

  • Cscape 9 or later

ASCII Configuration

Step 1: Open CSCAPE and click on Home > Controller > Hardware Configuration (select a series and device type) > LAN1/Config button. In LAN1 configuration window set up IP address, Net mask, Gateway, and select ASCII over TCP/IP checkbox and the click on Configure Selected Protocol as shown below:

Step 2: In ASCII over TCP/IPClosed TCP/IP – Transmission Control Protocol / Internet Protocol - A transport layer protocol and a network layer protocol developed by the Department of Defense. This is a commonly used combination for communication within networks and across internetwork. Configuration window configure Port Number, register for start address of Transmit data, register for start address for Receive data, Transmission Trigger Register and Status Address. Port Number can be provided directly or by using register address. For port number entry using register user has to select Get from Dynamic Configuration option.

LAN1 > ASCII over TCP/IP > Configure Selected Protocol

Return to the TopASCII over TCP/IP

Sending ASCII Character to the Client

In above configuration dialog %R800 and %R100 registers are configured for sending data. %R800 is start of transmit data and should contain data in following format.

%R800 Register and Data
SI No. Register Address Data Content
1 %R800 First Register should contain ‘Transmit Count’ i.e. number of bytes (characters) to be transmitted.
2 %R801 Reserved.
3 %R802 Data to be transmitted. Each Register can hold 2 bytes of data.
4 %R803 Data to be transmitted.
  .. Data to be transmitted.
  .. Data to be transmitted.
n %R(800+n-1) Data to be transmitted.

Note: Maximum 2K ASCII characters can be sent in a single request.

%R100 is Transmit Trigger register used to start the transmission process. Setting R100 data to ‘1’ will initiate transmission process and on successful transmission firmware will reset the R100 data to ‘0’.

Return to the TopASCII over TCP/IP

Receiving ASCII Characters from the Client

In above configuration dialog %R500 register is used for receiving data. The receive data register format will be as below.

%R500 Register and Data
SI No. Register Address Data Content
1 %R500 First Register contains number of byes (characters) received.
2 %R501 User can provide valid termination character here (if any). If there is no termination character set this register value to zero.
3 %R502 Received data. Each Register can hold 2 bytes of data.
4 %R503 Received data.
  .. Received data.
  .. Received data.
n %R(500+n-1) Received data.

Note: Maximum 2K ASCII characters can be received in a single request.

Status Information

%R700 register is used for to display status information. Details of Status Register as below.

%R700 Register and Data
Bit No. Description
1 Receive Data Overflow: Set when number received characters are more than 255.
2 Transmit Data Overflow: Set when transmit character count is more than 255.
3 Socket Creation Error: Set if there is any error in Socket creation.
4 Socket Allocate Error: Set if there is any internal memory allocation error for transmitting data.
5 Socket Send Error: If error in transmitting TCP packet.
6 Reserved
7 Reserved
8 Reserved
9 Reserved
10 Reserved
11 Reserved
12 Reserved
13 Reserved
14 Reserved
15 Reserved
16 Receive Data indication Bit: Set when new packet is received. User can reset this bit to ‘0’.

Return to the TopASCII over TCP/IP