Toshiba Network Card AS311 User Manual

UM-TS03***-E020  
PROGRAMMABLE CONTROLLER  
PROSEC T3  
ASCII INTERFACE MODULE  
AS311  
USER’S MANUAL  
TOSHIBA CORPORATION  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Safety Precautions  
Safety Precautions  
This module (AS311) has been designed for Toshiba’s Programmable Controller  
PROSEC-T3 (hereafter called T3). Use this module only on the T3’s rack.  
Read the Safety Precautions described on the T3 User’s Manual before using the T3 and  
this module.  
Follow the instructions described on this manual and on the T3 User’s Manual when  
installing and wiring the T3 and this module.  
Do not touch the connector pins or components on the printed circuit board of this module.  
The maximum number of AS311s that can be controlled by one T3 is not limited by  
software. However, this module consumes maximum 1 A of internal 5 Vdc power. Confirm  
that the total 5 Vdc consumed current per one power supply module is within the limit (7A).  
Symbols Used In This Manual  
Pay attention to information preceded by the following symbols.  
HINT  
Refers to helpful suggestions on how to operate effectively.  
NOTE  
Refers to information considered essential for full understanding of operation.  
And refers to conditions that could damage the equipment or render it  
temporarily inoperative.  
User’s Manual 1  
Download from Www.Somanuals.com. All Manuals Search And Download.  
About This Manual  
About This Manual  
This manual explains the specifications and operations of the ASCII Interface Module  
(AS311) for Programmable Controller T3. Read this manual carefully before using the  
AS311 module.  
Inside This Manual  
This manual consists of six sections and an appendix as follows.  
Section 1 Overview  
Introduces The AS311. Outline of the function, applications and the external features are  
provided in this section. Read this section at first to understand the general operation of  
the AS311. The switch settings of this module are also explained in this section.  
Section 2 Specifications  
Provides the functional and the transmission specifications of the AS311. Refer to this  
section to confirm the application limitations.  
Section 3 Cable Connections  
Provides the information for hardware preparations. The transmission cable connection  
is explained in this section.  
Section 4 Register Configuration  
Explains the memory contents of the AS311. This information is important to interchange  
data between T3 and AS311.  
Section 5 Operation Procedure  
Provides the information to design the T3 program for using the AS311. Some sample  
programs are provided in this section. Read this section carefully for programming.  
Section 6 RAS Information  
Provides the helpful information for RAS (Reliability, Availability and Serviceability). Also,  
lists the check points in case of unexpected operations.  
Appendix  
The specifications of READ and WRITE instructions are described. These instructions are  
used for interchanging data between T3 and AS311.  
2
ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
About This Manual  
Related Manuals  
The following related manuals are available for T3. Besides this manual, read the following  
manuals for your better understanding.  
T3 User’s Manual - Hardware  
This manual covers the T3’s main body and basic I/O - their specifications, handling,  
maintenance and services.  
T3 User’s Manual - Functions  
This manual explains the functions of the T3 and how to use them. The necessary  
information to create user program is covered in this manual.  
T-series Instruction Set  
This manual provides the detailed specifications of instructions for Toshiba’s T-series  
Programmable Controllers.  
T-PDS (Ver. 1.4) Basic Operation Manual  
This manual explains how to install the T-series program development system (T-PDS)  
into your computer and provides basic programming operations.  
T-PDS (Ver. 1.4) Command Reference Manual  
This manual explains the T-series program development system (T-PDS) in detail.  
T-PDS (Ver. 1.6) Expanded Functions  
This manual explains the expanded functions on the T-PDS version 1.6. This manual  
supplements the T-PDS (Ver.1.4) Command Reference Manual.  
T-series Computer Link Function  
This manual provides the information for a computer to communicate with T3 through the  
T-series Programmable Controller’s Computer Link function.  
Terminology  
The following terms and abbreviations are used in this manual.  
ASCII:  
EIA:  
American Standard Code for Information Interchange  
Electronic Industries Association  
Input/Output  
I/O:  
LED:  
Light Emitting Diode  
RS-232C:  
RS-422:  
An EIA standard for data transmission  
An EIA standard for data transmission  
User’s Manual 3  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Contents  
Contents  
Safety Precautions  
..................................................................................  
..................................................................................  
AS311 Overview ..........................................................................  
1
2
7
About This Manual  
1.  
1.1  
1.2  
1.3  
Introduction ......................................................................................  
AS311 functions ...............................................................................  
External features .............................................................................. 10  
8
9
2.  
Specifications ............................................................................ 15  
2.1  
2.2  
2.3  
General specifications ...................................................................... 16  
Functional specifications ................................................................ 16  
Transmission specifications ............................................................. 17  
3.  
Cable Connections  
..................................................................... 19  
3.1  
3.2  
RS-232C connection ......................................................................... 20  
RS-422 connection ............................................................................ 21  
4.  
Register Configuration  
.............................................................. 23  
4.1  
4.2  
I/O allocation and I/O registers ........................................................ 24  
AS311 buffer memory ........................................................................ 26  
4.2.1  
4.2.2  
4.2.3  
4.2.4  
Memory map  
Buffer memory access  
Parameter area ............................................................................ 29  
Receiving and transmitting data area .......................................... 36  
............................................................................... 26  
................................................................ 27  
5.  
Operation Procedure  
................................................................. 37  
5.1  
5.2  
Transmission message format .......................................................... 38  
Received message read sequence .................................................. 39  
5.2.1  
5.2.2  
5.3  
5.3.1  
5.3.2  
5.4  
5.5  
5.6  
5.7  
Flag control timing  
T3 sample program for message receiving ................................... 40  
Write sequence for message transmitting ....................................... 43  
Flag control timing ....................................................................... 43  
T3 sample program for message transmitting ................................ 44  
Checking the AS311 operation status .............................................. 47  
Resetting the AS311 by software ...................................................... 48  
Setting the trailing code .................................................................... 49  
Setting the time-out check time ........................................................ 50  
....................................................................... 39  
4
ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Contents  
6.  
RAS Information  
......................................................................... 51  
6.1  
6.2  
LED indication .................................................................................. 52  
Buffer memory information ................................................................ 53  
6.2.1  
6.2.2  
6.2.3  
6.2.4  
6.3  
Module status  
Switch setting status  
Error information for data receiving  
Error information for data transmitting .......................................... 56  
Trouble shooting ............................................................................... 57  
.............................................................................. 53  
................................................................... 54  
.............................................. 55  
Appendix  
.................................................................................................... 59  
A.1  
A.2  
Specification of the READ instruction ............................................... 60  
Specification of the WRITE instruction ............................................ 62  
User’s Manual 5  
Download from Www.Somanuals.com. All Manuals Search And Download.  
6
ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Section 1  
AS311 Overview  
1.1 Introduction  
1.2 AS311 functions  
1.3 External features  
User’s Manual 7  
Download from Www.Somanuals.com. All Manuals Search And Download.  
1. AS311 Overview  
1.1 Introduction  
The ASCII interface module AS311 (hereafter called AS311) is a general purpose data  
communication module for Toshiba’s Programmable Controller PROSEC-T3 (hereafter  
called T3). By using the AS311, T3 can communicate with external devices, such as a  
micro computer, bar code reader, printer, display device, sensor, etc., through the  
serial interface RS-232C or RS-422.  
The AS311 has two ports of the serial interface. One port (channel 1) can be selected  
either RS-232C or RS-422 by switch setting. The other port (channel 2) is RS-232C  
interface. These two ports can be used independently for data receiving and  
transmitting.  
The transmission is asynchronous (start-stop system).  
ASCII is used as the transmission data code.  
The figure below shows the typical system configuration.  
AS311  
T3  
Channel 1  
RS-232C or RS-422  
Channel 2  
RS-232C  
CPU module  
The maximum number of AS311 that can be controlled by one T3 is not limited by  
software. However, this module consumes maximum 1 A of internal 5 Vdc power.  
Confirm that the total 5 Vdc consumed current per one power supply module is  
within the limit (7 A).  
NOTE  
8
ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
1. AS311 Overview  
1.2 AS311 functions  
From the point of view of T3, the AS311 works as communications driver. The  
followings are the simplified explanations for T3 and AS311 functions.  
When a message (one set of transmission characters) is received by AS311, the flag  
which indicates the receiving complete will come ON. T3 can check the flag status then  
read the message from the AS311 by using the READ instruction.  
In case of transmitting a message (one set of transmission characters) from T3 through  
AS311, T3 writes the message into the AS311 by using the WRITE instruction, then  
sets the flag which instruct the AS311 to start transmitting the message.  
T3  
AS311  
Register  
Buffer memory  
READ  
Receiving  
area  
Receiving  
buffer  
Channel 1  
Channel 2  
WRITE Transmitting  
area  
READ  
Receiving  
area  
Transmitting  
buffer  
WRITE Transmitting  
area  
Receiving  
buffer  
Transmitting  
buffer  
Here, a message (one set of transmission characters) means a string of ASCII  
characters which is ended by specified trailing code. The default setting of the trailing  
code is CR (carriage return code = H0D).  
Applicable message format (default trailing code):  
1
2
3
4
N-1  
N
CR  
N: message length = 896 bytes max.  
In other words, the AS311 cannot be used for the data communication in which the  
transmission message is ended by two or more types of trailing code.  
User’s Manual 9  
Download from Www.Somanuals.com. All Manuals Search And Download.  
1. AS311 Overview  
1.3 External features  
Status LEDs  
AS311  
RUN  
TX1  
RX1  
TX2  
RX2  
SW1  
8
7
6
5
4
3
2
1
Channel 1 transmission parameter  
setting switches  
SW2  
8
7
6
5
4
3
2
1
Channel 2 transmission parameter  
setting switches  
ON→  
RS-232C/RS-422 selection switches  
Optional rotary switches  
SW3  
RSW  
1
1
2
3
RSW  
2
ON→  
RESET  
Hardware reset switch  
Channel 1 serial port (RS-232C/RS-422)  
D-Sub 25-pin female connector  
CH1  
Channel 2 serial port (RS-232C)  
D-Sub 25-pin female connector  
CH2  
10 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
1. AS311 Overview  
Status LEDs  
RUN: Lit when AS311 is operating normally  
TX1:  
RX1:  
TX2:  
RX2:  
Lit while transmitting data from channel 1  
Lit while receiving data to channel 1  
Lit while transmitting data from channel 2  
Lit while receiving data to channel 2  
SW1  
channel 1 transmission parameter setting switches  
No.8 No use (set always ON)  
8
7
OFF  
2 bit  
ON  
1 bit  
No.7  
Stop bit  
6
5
4
3
2
1
OFF  
7 bit  
ON  
8 bit  
No.6  
Data bit length  
OFF  
OFF/ON  
None  
ON  
OFF  
Even  
ON  
ON  
Odd  
No.5  
No.4  
Parity  
ON→  
SW1  
OFF OFF OFF OFF  
ON  
ON  
ON  
No.3  
OFF OFF  
ON  
OFF  
ON  
ON  
OFF OFF  
OFF ON  
ON  
OFF  
No.2  
No.1  
Baud rate  
OFF  
300  
ON  
600  
1200 2400 4800 9600 19200  
SW2  
channel 2 transmission parameter setting switches  
Used to set the transmission parameters for channel 2. The functions of each switch  
are the same as the SW1. Set the transmission parameters independently for  
channel 1 and channel 2.  
NOTE  
The factory settings of the SW1 and SW2 are as shown above figure.  
That is, 1 stop bit, 8 data bits, odd parity and 9600 bps.  
User’s Manual 11  
Download from Www.Somanuals.com. All Manuals Search And Download.  
1. AS311 Overview  
SW3  
RS-232C/RS-422 selection switches (for channel 1)  
Used to select the interface of the channel 1 either  
RS-232C or RS-422.  
1
OFF  
ON  
No.1  
Interface  
RS-232C  
RS-422  
2
3
Used to connect the terminating resistor (120 )  
between RXDA and RXDB. (Effective for RS-422)  
No.2  
ON→  
OFF  
ON  
Terminating  
Not connect  
Connect  
SW3  
Used to connect the terminating resistor (120 )  
between CTSA and CTSB. (Effective for RS-422)  
OFF  
ON  
No.3  
Terminating  
Not connect  
Connect  
The switches No.2 and No.3 should be set to ON when the AS311  
is configured as terminal station on the RS-422 transmission line.  
The factory settings of the SW3 are all OFF.  
NOTE  
RSW1/RSW2  
Optional rotary switches  
C
Always set the RSW1 to 4 and the RSW2 to 0.  
RSW1  
(Other settings are for future use)  
8
0
4
Do not set other than above, otherwise the AS311  
will not work correctly.  
C
RSW2  
8
0
4
12 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
1. AS311 Overview  
Hardware reset switch  
When this switch is pressed, the AS311 will be reset. Use this switch when you  
have changed the switch settings.  
Channel 1 and channel 2 serial ports  
Used to connect the serial transmission line (RS-232C or RS-422). D-Sub 25-pin  
female connectors are provided on the AS311.  
The pin assignment is as follows.  
Channel 1  
(RS-232C/RS-422)  
Channel 2  
(RS-232C)  
1
2
3
4
5
6
7
8
9
FG  
1
2
3
4
5
6
7
8
9
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
FG  
TXD  
RXD  
RTS  
CTS  
TXD  
RXD  
RTS  
CTS  
DSR  
SG  
for RS-232C  
SG  
5 Vdc  
5 Vdc  
10 TXDA  
11 RXDA  
12 RTSA  
13 CTSA  
14  
15  
16  
17  
18  
for RS-422  
19  
20 DTR  
21 TXDB  
22 RXDB  
23 RTSB  
24 CTSB  
25  
20 DTR  
for RS232C  
for RS-422  
21  
22  
23  
24  
25  
The arrow on the above figure shows the signal direction.  
FG is connected with the T3’s frame ground internally. (both channels)  
DTR and RTS are ON while power is on.  
Data transmitting is available when CTS is ON. DSR has no effect for transmission.  
Pin 9 (5 Vdc) can be used to supply 5 Vdc power. (total max. 50 mA)  
User’s Manual 13  
Download from Www.Somanuals.com. All Manuals Search And Download.  
14 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Section 2  
Specifications  
2.1 General specifications  
2.2 Functional specifications  
2.3 Transmission specifications  
User’s Manual 15  
Download from Www.Somanuals.com. All Manuals Search And Download.  
2. Specifications  
2.1 General specifications  
Item  
Power voltage  
Specifications  
5 Vdc (supplied from back plane bus)  
1.0 A (5 Vdc) maximum  
Conforms to T3 specifications  
10 M(500 Vdc)  
Remarks  
Note (1)  
Current consumption  
Environmental conditions  
Insulation resistance  
Withstand voltage  
Size  
Note (2)  
Note (2)  
500 Vac - 1 minute  
T3 I/O module size (1 slot)  
500 g  
Weight  
Note (1) The T3’s power supply module can supply maximum 7 A of internal 5 Vdc.  
Check that the internal 5 Vdc current consumption per one power supply  
module does not exceed the limit.  
Note (2) Between interface connector pins and internal circuit.  
2.2 Functional specifications  
Item  
Module type  
I/O allocation type  
Specifications  
Serial communication interface  
iX+Y 4W  
Buffer memory capacity  
448 words x 4  
(accessed from T3 by READ/WRITE instruction)  
Transmission interface  
Display  
2 channels;  
Channel 1 RS-232C or RS-422 (selectable)  
Channel 2 RS-232C  
Status LEDs;  
RUN lit when operating normally  
TX1 lit while transmitting data from channel 1  
RX1 lit while receiving data to channel 1  
TX2 lit while transmitting data from channel 2  
RX2 lit while receiving data to channel 2  
Computer, bar code reader, display device, sensor,  
printer, or other serial ASCII device  
Self diagnosis, watch dog timer (200 ms),  
transmission error check, etc.  
Connectable devices  
RAS function  
16 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
2. Specifications  
2.3 Transmission specifications  
Item  
Interface  
Transmission mode  
Synchronizing  
Transmission speed  
Frame format  
Channel 1  
RS-232C or RS-422  
Full-duplex  
Start-stop method (asynchronous)  
300, 600, 1200, 2400, 4800, 9600, 19200 bps  
Channel 2  
RS-232C  
Start bit  
Data  
Parity  
1 bit  
7 or 8 bits  
even / odd / none  
1 or 2 bits  
Stop bit  
Transmission code  
Message length  
ASCII  
Max. 896 bytes  
Configuration  
Transmission distance  
One to one (Note)  
Max. 15 m (RS-232C)  
Max. 1 km (RS-422)  
D-sub 25-pin female  
Max. 15 m  
Connector  
D-sub 25-pin female  
Note) In case of RS-422 interface, multiple devices can be connected to one AS311  
if the connected RS-422 devices work as slave stations and support multi-point  
connection. That is, the connected RS-422 devices must have the transmission  
generators which support the passive state. Also, the RS-422 devices must  
support the message format which contains the selecting address. In this case,  
the number of the connected RS-422 devices is limited up to 10.  
On the other hand, the AS311’s transmission generator does not support the  
passive state. Therefore the AS311 must be the master station in the one-to-N  
configuration.  
User’s Manual 17  
Download from Www.Somanuals.com. All Manuals Search And Download.  
18 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Section 3  
Cable Connections  
3.1 RS-232C connection  
3.2 RS-422 connection  
User’s Manual 19  
Download from Www.Somanuals.com. All Manuals Search And Download.  
3. Cable Connections  
3.1 RS-232C connection  
The following figure shows the RS-232C connection.  
AS311  
Shielded cable  
RS-232C device  
1 FG  
2 TXD  
3 RXD  
4 RTS  
5 CTS  
6 (DSR)  
7 SG  
RXD  
TXD  
DTR  
SG  
DSR  
RTS  
CTS  
20 DTR  
(1) DSR is supported only on the channel 2.  
(2) Connect SG each other.  
(3) Use shielded cable. The cable shield should be connected to FG at one end.  
(4) It is recommended to use twisted cable for noise immunity.  
NOTE  
Do not connect or remove the connector while the AS311 is powered. Otherwise, it  
will cause damage to the AS311.  
20 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
3. Cable Connections  
3.2 RS-422 connection  
The channel 1 can be selected either RS-232C or RS-422. The following figure shows  
the RS-422 connection.  
AS311  
Shielded cable  
RS-422 device  
1 FG  
FG  
10 TXDA  
21 TXDB  
11 RXDA  
22 RXDB  
7 SG  
12 RTSA  
23 RTSB  
13 CTSA  
24 CTSB  
RXDA  
RXDB  
TXDA  
TXDB  
SG  
CTSA  
CTSB  
RTSA  
RTSB  
R
R
(1) On the AS311, connect the built-in terminating resistors (120 ) between RXDA  
and RXDB and between CTSA and CTSB by setting switches.  
(Set the SW3-2 and SW3-3 to ON)  
(2) On the RS-422 device, connect the terminating resistors R (120 - 1/2 W)  
between RXDA and RXDB and between CTSA and CTSB.  
(3) Connect SG each other.  
(4) Use shielded twisted-pair cable. The A (+) and B (-) of the same signal should be  
paired.  
(5) The cable shield should be connected to FG at one end.  
NOTE  
Do not connect or remove the connector while the AS311 is powered. Otherwise, it  
will cause damage to the AS311.  
User’s Manual 21  
Download from Www.Somanuals.com. All Manuals Search And Download.  
22 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Section 4  
Register Configuration  
4.1 I/O allocation and I/O registers  
4.2 AS311 buffer memory  
User’s Manual 23  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4. Register Configuration  
4.1 I/O allocation and I/O registers  
The AS311 has the I/O type ‘i X+Y 4W’ for I/O allocation. When the automatic I/O  
allocation is performed with mounting the AS311, the following I/O allocation table will  
be created in the T3.  
(T-PDS screen example - in the case that AS311 is mounted on Slot 0 of Unit 0)  
Then, 4 I/O registers, XW(n), XW(n+1), YW(n+2) and YW(n+3), are assigned to the  
AS311.  
In the above example, XW000, XW001, YW002 and YW003 are assigned.  
Note that the I/O type has ‘i’ designation. It means that the T3 will not update the  
assigned I/O registers in the batch I/O processing. To read or write data through  
the I/O registers, the Direct I/O instruction (FUN235) or the direct I/O designation  
(I/IW and O/OW instead of X/XW and Y/YW) is necessary.  
The reason of that is because the reading and writing timings are important for  
handshaking between T3 and AS311. Refer to section 5.  
24 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4. Register Configuration  
The following table shows the functions of I/O registers assigned to the AS311.  
F
E
D
C
B
A
9
8
7
6
5
4
3
2
1
0
No use  
No use  
No use  
No use  
No use  
No use  
No use  
No use  
XW(n)  
CH1 status  
CH2 status  
CH1 command  
CH2 command  
XW(n+1)  
YW(n+2)  
YW(n+3)  
Register Bit  
Name  
Write ready  
Transmit complete 1: transmitting has been completed normally  
Description  
1: ready to write data (transmit) for channel 1  
F
E
D Transmit error  
1: transmitting has been canceled by error  
No use (always 0)  
XW(n)  
(CH1)  
C - 8  
7
6
Read ready  
1: ready to read the received data  
Receive complete 1: receiving for channel 1 has been completed  
5
4 - 0  
F
Receive error  
Write ready  
1: receiving error has occurred  
No use (always 0)  
1: ready to write data (transmit) for channel 2  
E
Transmit complete 1: transmitting has been completed normally  
D Transmit error  
1: transmitting has been canceled by error  
No use (always 0)  
XW(n+1) C - 8  
(CH2)  
7
6
Read ready  
1: ready to read the received data  
Receive complete 1: receiving for channel 2 has been completed  
5
4 - 0  
F
Receive error  
1: receiving error has occurred  
No use (always 0)  
Set to 1 to start transmitting data from channel 1  
No use (set to 0)  
Transmit start  
YW(n+2) E - 8  
(CH1)  
7
6 - 0  
F
Read start  
Set to 1 to start reading data for channel 1  
No use (set to 0)  
Set to 1 to start transmitting data from channel 2  
No use (set to 0)  
Set to 1 to start reading data for channel 2  
No use (set to 0)  
Transmit start  
YW(n+3) E - 8  
(CH2)  
Read start  
7
6 - 0  
NOTE  
These bits are used for handshaking between T3 and AS311. The detailed  
function and timing are explained in section 5.  
User’s Manual 25  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4. Register Configuration  
4.2 AS311 buffer memory  
As explained in the previous section, the I/O registers that are assigned to AS311  
are used to control the reading and writing timings (handshake) between T3 and  
AS311.  
On the other hand, for exchanging the transmission data between T3 and AS311, the  
AS311’s buffer memory is used.  
This section explains the buffer memory contents and how to access the buffer  
memory.  
4.2.1 Memory map  
The AS311 has the buffer memory that is used to exchange data with T3. The overall  
map of the buffer memory is as follows.  
Address  
0
Word data  
Status and command  
4 words - same data as I/O registers  
124 words - transmission parameters, etc.  
448 words  
4
Parameter  
128  
Channel 1  
reading (receiving)  
data area  
576  
1024  
1472  
1920  
Channel 1  
writing (transmitting)  
data area  
448 words  
448 words  
448 words  
128 words  
Channel 2  
reading (receiving)  
data area  
Channel 2  
writing (transmitting)  
data area  
Access inhibited  
26 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4. Register Configuration  
4.2.2 Buffer memory access  
T3 can read the AS311’s buffer memory contents by using READ instruction (FUN237).  
Also, T3 can write data into the buffer memory by using WRITE instruction (FUN238).  
READ instruction (FUN237)  
Expression:  
[ (A) READ (B) (C) ]  
Operands:  
(A):  
(B):  
I/O register (XW/YW) assigned to the AS311  
Starting address of the buffer memory to be read  
(B)+1: Number of words to be read (max. 256)  
(C):  
Starting register of the destination  
Example:  
R0100  
[ 00128 MOV D5000 ] [ 00064 MOV D5001 ]  
[ XW000 READ D5000 D1000 ]  
When R0100 is ON, 64 words of buffer memory data starting with address 128  
are read from the AS311 which is allocated to XW000. And the data are stored  
in D1000 and after.  
User’s Manual 27  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4. Register Configuration  
WRITE instruction (FUN238)  
Expression:  
[ (A) WRITE (B) (C) ]  
Operands:  
(A):  
(B):  
Starting register of the source  
Starting address of the buffer memory to be written  
(B)+1: Number of words to be written (max. 256)  
(C):  
I/O register (XW/YW) assigned to the AS311  
Example:  
R0101  
[ 00576 MOV D5000 ] [ 00100 MOV D5001 ]  
[ D2000 WRITE D5000 YW002 ]  
When R0101 is ON, 100 words of data starting with D2000 (D2000 to D2099)  
are written into the buffer memory address 576 and after of the AS311 which is  
allocated to YW002.  
28 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4. Register Configuration  
4.2.3 Parameter area  
The parameter area of the buffer memory contains the following contents.  
Address  
0 CH1 status  
Address  
64  
1 CH2 status  
2 CH1 command  
3 CH2 command  
4 Status 1  
Status and  
command  
65  
66  
67  
68  
5 RSW1/2 information  
6 SW1 information  
7 SW2 information  
8
69  
70  
71  
72  
Reserved  
CH1, CH2  
common  
9
73  
10  
parameters  
74  
11  
75  
12 Command 1  
76  
13  
77  
14  
78  
15  
79  
16 CH1 receive error  
80 CH2 receive error  
17 CH1 transmit error  
81 CH2 transmit error  
18 CH1 channel status  
82 CH2 channel status  
19 CH1 receive length  
83 CH2 receive length  
20  
84  
21  
85  
22  
86  
23  
87  
24 CH1 trailing code  
88 CH2 trailing code  
25 CH1 time-out check CH1  
89 CH2 time-out check CH2  
26  
27  
28  
29  
30  
31  
parameters  
90  
91  
92  
93  
94  
95  
parameters  
63  
127  
Note: Blanks are for future use. (Reserved)  
User’s Manual 29  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4. Register Configuration  
Status and command (0 - 3)  
The addresses 0 to 3 store the same data as the I/O registers that are assigned to the  
AS311.  
Refer to section 4.1 for details.  
0
1
2
3
CH1 status  
CH2 status  
CH1 command  
CH2 command  
= XW(n)  
= XW(n+1)  
= YW(n+2)  
= YW(n+3)  
Status 1 (4)  
The address 4 shows the AS311 module status. If an error has occurred in the AS311,  
the error code is stored here.  
F
E
D
0
C
0
B
0
A
0
9
0
8
0
7
6
5
4
3
2
1
0
RDY ERR  
Error code  
4
Bit F  
RDY (Ready)  
ERR (Error)  
Error code  
1 = operating normally  
0 = under initialization or error state  
1 = error state  
0 = no error (normal)  
Shows the detected error item if ERR is 1.  
(H00 when normal)  
Bit E  
Bit 7-0  
See section 6.2.1 for details.  
RSW1/2 information (5)  
The address 5 stores the rotary switches RSW1 and RSW2 setting status.  
F
0
E
0
D
0
C
0
B
0
A
0
9
0
8
0
7
6
5
4
3
2
1
0
RSW1  
RSW2  
5
Bit 7-4  
Bit 3-0  
RSW1  
RSW2  
Stores the rotary switch 1 (RSW1) setting status.  
0 - F  
Stores the rotary switch 2 (RSW2) setting status.  
0 - F  
30 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4. Register Configuration  
SW1 information (6)  
The address 6 stores the setting status of the channel 1 transmission parameter setting  
switches (SW1).  
F
0
E
0
D
0
C
0
B
0
A
0
9
0
8
0
7
6
5
4
3
2
1
0
SW1  
6
SW1  
OFF  
ON  
8
7
6
5
4
3
2
1
ON: 1 OFF: 0  
SW2 information (7)  
The address 7 stores the setting status of the channel 2 transmission parameter setting  
switches (SW2).  
F
0
E
0
D
0
C
0
B
0
A
0
9
0
8
0
7
6
5
4
3
2
1
0
SW2  
7
SW2  
OFF  
ON  
8
7
6
5
4
3
2
1
ON: 1 OFF: 0  
User’s Manual 31  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4. Register Configuration  
Command 1 (12)  
The address 12 is used to reset the AS311 by T3 program.  
Two types of reset commands are available, hot reset and cold reset.  
The hot reset is used to change the trailing code and the time-out check time settings.  
The cold reset is used to initialize the AS311. The trailing code and the time-out check  
time will be reset to the default setting. The operation of the cold reset is the same as the  
hard reset switch and power on initialization.  
Refer to sections 5.5, 5.6 and 5.7 for these functions.  
F
E
0
D
0
C
0
B
0
A
0
9
0
8
0
7
6
5
4
3
2
1
0
RST  
Command number  
12  
Bit F  
Bit 7-0  
RST (Reset)  
1 = reset request  
0 = normal (no reset request)  
HFE = hot reset  
HFF = cold reset  
Command  
number  
CH1 receive error (16) and  
CH2 receive error (80)  
The address 16 (for channel 1) and the address 80 (for channel 2) indicate the error  
contents if an error has been detected in receiving a message. This information is set  
during the received message read sequence.  
Refer to section 6.2.3 for details.  
F
0
E
0
D
0
C
0
B
A
9
8
7
6
5
4
3
2
1
0
BRK PE  
FE  
OE  
Receive error code  
16 or 80  
Bit B  
Bit A  
Bit 9  
BRK (Break)  
1 = break detected  
0 = normal  
PE (Parity error) 1 = parity error  
0 = normal  
FE  
1 = framing error  
0 = normal  
(Framing error)  
Bit 8  
OE  
1 = overrun error  
0 = normal  
Shows the error code regarding received message.  
(H00 when normal)  
(Overrun error)  
Receive error  
code  
Bit 7-0  
See section 6.2.3 for details.  
32 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4. Register Configuration  
CH1 transmit error (17) and  
CH2 transmit error (81)  
The address 17 (for channel 1) and the address 81 (for channel 2) indicate the error  
contents if an error has occurred during message transmitting. This information is set  
during the write sequence for message transmitting.  
Refer to section 6.2.4 for details.  
F
0
E
0
D
0
C
0
B
0
A
0
9
0
8
0
7
6
5
4
3
2
1
0
Transmit error code  
17 or 81  
Bit 7-0  
Transmit error  
code  
Shows the error code for transmitting.  
(H00 when normal)  
See section 6.2.4 for details.  
CH1 channel status (18) and  
CH2 channel status (82)  
The address 18 (for channel 1) and the address 82 (for channel 2) indicate the control  
signal status. This information is always updated.  
F
0
E
0
D
0
C
0
B
0
A
0
9
0
8
7
6
0
5
0
4
0
3
2
1
1
0
0
0
IDL DSR  
CTS  
18 or 82  
Bit 8  
IDL (Idle)  
DSR  
(Data set ready) 0 = DSR is OFF  
CTS  
1 = transmitter is idle state  
0 = transmitter is non-idle state  
1 = DSR is ON  
Bit 7  
Bit 3  
Note (1)  
1 = CTS is ON  
0 = CTS is OFF  
(Clear to send)  
Note: (1) The channel 1 does not support DSR. Therefore, bit 7 of the address 18 is  
always 0.  
(2) The bit 2 is always 1.  
User’s Manual 33  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4. Register Configuration  
CH1 receive length (19) and  
CH2 receive length (83)  
The address 19 (for channel 1) and the address 83 (for channel 2) indicate the length of  
the received message (number of bytes). This information is set during the received  
message read sequence.  
F
E
D
C
B
A
9
8
7
6
5
4
3
2
1
0
Received message length  
19 or 83  
Bit F-0  
Received  
Shows the received message length (bytes).  
message length 0 - 896  
CH1 trailing code (24) and  
CH2 trailing code (88)  
The address 24 (for channel 1) and the address 88 (for channel 2) store the trailing  
codes. The default setting is H0D (CR code).  
To change the trailing code, write the desired code into this address then write the hot  
reset command into the Command 1 (12). See section 5.6 for this procedure.  
F
0
E
0
D
0
C
0
B
0
A
0
9
0
8
0
7
6
5
4
3
2
1
0
Trailing code  
24 or 88  
Bit 7-0  
Trailing code  
Stores the trailing code.  
Initial value at power on is H0D (carriage return).  
34 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4. Register Configuration  
CH1 time-out check (25) and  
CH2 time-out check (89)  
The address 25 (for channel 1) and the address 89 (for channel 2) store the time-out  
check times. If the time between each receiving character exceeds the specified time-out  
check time, it becomes the receiving time-out error. The default setting is 1 second.  
To change the setting, write the desired data into this address then write the hot reset  
command into the Command 1 (12). See section 5.7 for this procedure.  
F
E
D
C
B
A
9
8
7
6
5
4
3
2
1
0
Time-out check time  
25 or 89  
Bit F-0  
Time-out check  
time  
Stores the time-out check time (0.1 s units).  
Valid data range is 1 to 600 (0.1 to 60 s). If 0 or more  
than 600 is specified, the time-out check will not work.  
Initial value at power on is 10 (1 s).  
User’s Manual 35  
Download from Www.Somanuals.com. All Manuals Search And Download.  
4. Register Configuration  
4.2.4 Receiving and transmitting data area  
The receiving and transmitting data area is provided to exchange the communication  
characters between T3 and AS311. The address ranges in the AS311 buffer memory  
are as follows.  
Address  
128  
Word data  
Channel 1  
reading (receiving)  
data area  
448 words  
448 words  
448 words  
448 words  
576  
1024  
1472  
Channel 1  
writing (transmitting)  
data area  
Channel 2  
reading (receiving)  
data area  
Channel 2  
writing (transmitting)  
data area  
When AS311 receives a message (one set of transmission characters), AS311 sets the  
characters into the receiving data area starting with the address 128 or 1024. Then T3  
can read these characters from the receiving data area by using READ instruction.  
When T3 attempts to send a message via AS311, T3 writes the characters into the  
transmitting data area starting with the address 576 or 1472 by using WRITE  
instruction, and instructs AS311 to start transmitting. AS311 recognizes from the  
character stored in the starting address (576 or 1472) to the trailing code character as  
the one set of transmitting message.  
Refer to section 5 for message receiving/transmitting procedure.  
36 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Section 5  
Operation Procedure  
5.1 Transmission message format  
5.2 Received message read sequence  
5.3 Write sequence for message transmitting  
5.4 Checking the AS311 operation status  
5.5 Resetting the AS311 by software  
5.6 Setting the trailing code  
5.7 Setting the time-out check time  
User’s Manual 37  
Download from Www.Somanuals.com. All Manuals Search And Download.  
5. Operation Procedure  
5.1 Transmission message format  
The transmission message is composed by ASCII characters and a specified trailing  
code. The default setting of the trailing code is CR (carriage return code = H0D).  
Refer to section 5.6 for setting the trailing code other than CR.  
The maximum length of a message is 896 bytes. An example of the message is  
shown below.  
1
2
3
4
5
6
7
8
9
CR  
0″ ″1″ ″2″ ″A″  
B″  
7″  
8″  
9″  
In the above figure, xmeans an ASCII character. For example, 0is H30.  
When the above message is received or transmitted, the data arrangements in the  
T3 registers are as follows.  
Transmission message  
Register  
n
F
8 7  
0
0″  
1″  
2″  
A″  
B″  
7″  
8″  
9″  
CR  
1″  
A″  
7″  
9″  
0″  
2″  
B″  
8″  
CR  
n+1  
n+2  
n+3  
n+4  
38 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
5. Operation Procedure  
5.2 Received message read sequence  
5.2.1 Flag control timing  
In case of receiving a message, the following flags are used for handshaking between  
T3 and AS311. These flags are the bits of the I/O registers assigned to the AS311.  
Refer to section 4.1.  
Read ready  
Receive complete  
Receive error  
Bit 7 of XW(n) for channel 1 or XW(n+1) for channel 2  
Bit 6 of XW(n) for channel 1 or XW(n+1) for channel 2  
Bit 5 of XW(n) for channel 1 or XW(n+1) for channel 2  
Read start  
Bit 7 of YW(n+2) for channel 1 or YW(n+3) for channel 2  
The message receiving procedure is as follows. It is called “received message read  
sequence”.  
AS311 receives a message  
AS311 sets Receive complete to ON  
T3 sets Read start to ON  
Normal receiving  
Receiving error  
AS311 sets the message into buffer  
memory (receiving data area), and  
sets the received message length into  
buffer memory (parameter area)  
AS311 sets the error information into  
buffer memory (parameter area)  
AS311 sets Read ready to ON, and  
AS311 sets Receive error to ON, and  
resets Receive complete to OFF  
resets Receive complete to OFF  
T3 reads the message form buffer  
memory (receiving data area)  
by READ instruction  
T3 reads the error information from  
buffer memory (parameter area)  
by READ instruction  
T3 resets Read start to OFF  
T3 resets Read start to OFF  
AS311 resets Read ready to OFF  
AS311 resets Receive error to OFF  
User’s Manual 39  
Download from Www.Somanuals.com. All Manuals Search And Download.  
5. Operation Procedure  
5.2.2 T3 sample program for message receiving  
A sample program for the “received message read sequence” is shown below.  
This sample program is for the channel 1 of the AS311 that is allocated to XW000 -  
YW003.  
(Main program)  
Operation for normal received message  
Operation for receiving error  
(Subroutine No. 0)  
40 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
5. Operation Procedure  
In this sample program, the following devices/registers are used.  
R0100  
R0200  
R0300  
AS311 status (ON when ready) - Refer to section 5.4  
Receiving normal complete (comes ON when receiving is complete normally)  
Receiving error complete (comes ON when receiving error has occurred)  
X0006  
X0007  
X0005  
Y0027  
Receive complete flag  
Read ready flag  
Receive error flag  
Read start flag  
D0000 - D0063  
D3000  
D4000 - D4001  
Received message is stored here  
Receiving error information is stored here  
Parameters for READ instruction  
This sample program works as follows.  
Main program  
- Rung 1: Calls Subroutine No. 0 when the AS311 is normal and both R0200 and  
R0300 are OFF.  
- Rung 2: When R0200 comes ON (normal receiving), performs the necessary  
operation for the received message, then resets R0200 to OFF.  
- Rung 3: When R0300 comes ON (receiving error has occurred), performs the error  
processing, then resets R0300 to OFF.  
Subroutine No. 0  
- Rung 1: Indicates the entry of Subroutine No. 0.  
- Rung 2: Reads XW000 and XW001 from the AS311 by direct I/O instruction.  
- Rung 3: Sets Y0027 (Read start flag) to ON if X0006 (Receive complete flag) is ON.  
- Rung 4: When X0007 (Read ready flag) comes ON, reads the received message from  
the AS311’s buffer memory, 64 words starting with address 128, by READ instruction,  
and stores it into D0000 and after. Then resets Y0027 (Read start flag) to OFF, and  
sets R0200 to ON.  
When X0005 (Receive error flag) comes ON, reads the error information from the  
AS311’s buffer memory, 1 word of address 16, by READ instruction, and stores it into  
D3000. Then resets Y0027 (Read start flag) to OFF, and sets R0300 to ON.  
- Rung 5: Writes YW002 and YW003 into the AS311 by direct I/O instruction.  
- Rung 6: Indicates the return of Subroutine No. 0.  
User’s Manual 41  
Download from Www.Somanuals.com. All Manuals Search And Download.  
5. Operation Procedure  
Explanation for this sample program:  
(1) The “received message read sequence” is programmed on Subroutine No. 0.  
(2) The Subroutine No. 0 is called from Main program with resetting R0200 and R0300  
to OFF.  
(3) When a message is received normally, R0200 will come ON and the message  
(ASCII characters) will be stored in D0000 to D0063. In this sample program, the  
received message length information (buffer memory address 19) is not used. The  
maximum length of a message is 128 bytes (64 words) because the number of  
read words of the READ instruction is programmed as 64 words.  
(4) When an error has occurred in receiving the message, R0300 will come ON and  
the error information will be stored in D3000. For details of the error information,  
refer to section 6.2.3.  
42 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
5. Operation Procedure  
5.3 Write sequence for message transmitting  
5.3.1 Flag control timing  
In case of transmitting a message, the following flags are used for handshaking  
between T3 and AS311. These flags are the bits of the I/O registers assigned to the  
AS311. Refer to section 4.1.  
Write ready  
Bit F of XW(n) for channel 1 or XW(n+1) for channel 2  
Transmit complete Bit E of XW(n) for channel 1 or XW(n+1) for channel 2  
Transmit error  
Transmit start  
Bit D of XW(n) for channel 1 or XW(n+1) for channel 2  
Bit F of YW(n+2) for channel 1 or YW(n+3) for channel 2  
The message transmitting procedure is as follows. It is called “write sequence for  
message transmitting”.  
T3 checks Write ready is ON  
T3 writes a message into buffer  
memory (transmitting data area)  
by WRITE instruction  
T3 sets Transmit start to ON  
AS311 resets Write ready to OFF  
Normal transmitting  
Transmitting error  
AS311 sends out the message and  
sets Transmit complete to ON  
AS311 sets the error information into  
buffer memory (parameter area) and  
sets Transmit error to ON  
T3 resets Transmit start to OFF  
T3 reads the error information from  
buffer memory (parameter area)  
by READ instruction, and resets  
Transmit start to OFF  
AS311 resets Transmit complete to  
OFF, and sets Write ready to ON  
AS311 resets Transmit error to OFF,  
and sets Write ready to ON  
User’s Manual 43  
Download from Www.Somanuals.com. All Manuals Search And Download.  
5. Operation Procedure  
5.3.2 T3 sample program for message transmitting  
A sample program for the “write sequence for message transmitting” is shown below.  
This sample program is for the channel 1 of the AS311 that is allocated to XW000 -  
YW003.  
(Main program)  
Set the transmission message into  
D0200 - D0263, and set R0110 to ON  
Operation for transmitting error  
(Subroutine No. 1)  
44 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
5. Operation Procedure  
In this sample program, the following devices/registers are used.  
R0100  
R0110  
R0201  
AS311 status (ON when ready) - Refer to section 5.4  
Internal flag to start transmitting  
Transmitting normal complete (comes ON when transmitting is complete  
normally)  
R0301  
Transmitting error complete (comes ON when transmitting error has  
occurred)  
X000F  
Write ready flag  
X000E Transmit complete flag  
X000D Transmit error flag  
Y002F  
Transmit start flag  
D0200 - D0263  
D3010  
D4010 - D4011  
D4000 - D4001  
Transmitting message is set here  
Transmitting error information is stored here  
Parameters for WRITE instruction  
Parameters for READ instruction  
This sample program works as follows.  
Main program  
- Rung 1: Prepares a transmission message and sets it into D0200 and after (maximum  
64 words in this sample). Then sets R0110 to ON.  
- Rung 2: Calls Subroutine No. 1 when the AS311 is normal and R0110 is ON.  
- Rung 3: When R0201 comes ON (normal transmitting), resets R0110 and R0201 to  
OFF.  
- Rung 4: When R0301 comes ON (transmitting error has occurred), performs the error  
processing, then resets R0110 and R0301 to OFF.  
Subroutine No. 1  
- Rung 1: Indicates the entry of Subroutine No. 1.  
- Rung 2: Reads XW000 and XW001 from the AS311 by direct I/O instruction.  
- Rung 3: When X000F (Write ready flag) is ON, writes the message that is stored in  
D0200 to D0263 into the AS311’s buffer memory, 64 words starting with address 576,  
by WRITE instruction, and sets Y002F (Transmit start flag) to ON.  
- Rung 4: When X000E (Transmit complete flag) comes ON, resets Y002F (Transmit  
start flag) to OFF, and sets R0201 to ON.  
When X000D (Transmit error flag) comes ON, reads the error information from the  
AS311’s buffer memory, 1 word of address 17, by READ instruction, and stores it into  
D3010. Then resets Y002F (Transmit start flag) to OFF, and sets R0301 to ON.  
- Rung 5: Writes YW002 and YW003 into the AS311 by direct I/O instruction.  
- Rung 6: Indicates the return of Subroutine No. 1.  
User’s Manual 45  
Download from Www.Somanuals.com. All Manuals Search And Download.  
5. Operation Procedure  
Explanation for this sample program:  
(1) The “write sequence for message transmitting” is programmed on Subroutine  
No. 1.  
(2) To start transmitting, set the message (ASCII characters) into D0200 and after.  
Then set R0110 to ON.  
The message length is maximum 128 bytes (64 words) in this sample program.  
(3) When R0110 is set to ON while the AS311 is ready, the Subroutine No. 1 will be  
called and the message transmitting will be started.  
(4) When the message is transmitted normally, R0201 will come ON. Then R0110 will  
be reset to OFF.  
(5) When an error has occurred in transmitting the message, R0301 will come ON and  
the error information will be stored in D3010. For details of the error information,  
refer to section 6.2.4.  
46 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
5. Operation Procedure  
5.4 Checking the AS311 operation status  
AS311 operation status information is stored in the AS311’s buffer memory address 4  
(Status 1). T3 can read this information by using READ instruction.  
A sample program is shown below. This sample program is for the AS311 that is  
allocated to XW000 - YW003.  
The above sample program works as follows.  
- Rung 1: Resets S0051 (Instruction error flag) to OFF, and sets parameters for the  
READ instruction.  
- Rung 2: Reads the operation status information from the AS311’s buffer memory  
address 4 (Status 1).  
- Rung 3: When S0051 (Instruction error flag) is OFF and R050F (Ready) is ON, turns  
R0100 to ON.  
It means that the AS311 is operating normally when R0100 is ON.  
If R050E (Error) is ON, the AS311 is in error state. In that case, the error code is  
stored in the lower 8 bits of RW050. For the error code, refer to section 6.2.1.  
If S0051 (Instruction error flag) is ON, it means that an error has occurred during the  
READ instruction execution.  
User’s Manual 47  
Download from Www.Somanuals.com. All Manuals Search And Download.  
5. Operation Procedure  
5.5 Resetting the AS311 by software  
AS311 can be reset by T3 program. Two types of resetting are available, cold reset  
and hot reset.  
The cold reset is used to reset the AS311 error state. When the cold reset is executed,  
the AS311 will be initialized. The trailing code and the time-out check time are also  
reset to the default settings. This function is the same as pressing the hardware reset  
switch and power on initialization.  
On the other hand, the hot reset is used to change the trailing code and/or the time-out  
check time.  
For executing these functions, write the following data into the AS311’s buffer memory  
address 12 (Command 1). The data writing into this address must be one-shot.  
Clod reset: H80FF  
Hot reset: H80FE  
The written data will be cleared to 0 by AS311 when the operation is completed.  
A sample program for the cold reset is shown below. This sample program is for the  
AS311 that is allocated to XW000 - YW003.  
In this sample program, the cold reset operation will be started by setting R0120 to ON.  
(Main program)  
(Subroutine No. 2)  
(H80FF)  
For the hot reset, refer to sections 5.6 and 5.7.  
48 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
5. Operation Procedure  
5.6 Setting the trailing code  
The default setting of the trailing code is CR (carriage return code = H0D). The trailing  
code can be changed by T3 program.  
To do this, write desired trailing code into the AS311’s buffer memory address 24 (CH1  
trailing code) and/or address 88 (CH2 trailing code), and execute the hot reset (refer to  
section 5.5).  
A sample program is shown below. This sample program is for the AS311 that is  
allocated to XW000 - YW003.  
In this sample program, the trailing code changing routine will be executed once when  
the AS311 status is changed to ready (R0100 comes ON - refer to section 5.4), and the  
channel 1 trailing code will be changed to H03.  
If the channel 2 trailing code and/or the time-out check time are also changed, write  
these data on the Main program Rung 2 before calling Subroutine No. 3 in the same  
manner.  
(Main program)  
(H0003)  
(Subroutine No. 3)  
(H80FE)  
User’s Manual 49  
Download from Www.Somanuals.com. All Manuals Search And Download.  
5. Operation Procedure  
5.7 Setting the time-out check time  
The default setting of the time-out check time is 1 second. The time-out check time  
can be changed by T3 program. The valid setting range is 0.1 to 60.0 seconds in 0.1  
second units. Refer to section 4.2.3.  
To change the time-out check time, write desired value into the AS311’s buffer memory  
address 25 (CH1 time-out check) and/or address 89 (CH2 time-out check), and  
execute the hot reset (refer to section 5.5).  
T3 program for this purpose is almost same as that for setting the trailing code (refer to  
section 5.6). Only the difference is writing the time-out check time instead of the trailing  
code. See Rung 2 of the following sample. In this sample, the channel 1 time-out check  
time is changed to 5 seconds.  
If the channel 2 time-out check time and/or the trailing code are also changed, write  
these data on the Main program Rung 2 before calling Subroutine No. 3 in the same  
manner.  
(Main program)  
50 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Section 6  
RAS Information  
6.1 LED indication  
6.2 Buffer memory information  
6.3 Trouble shooting  
User’s Manual 51  
Download from Www.Somanuals.com. All Manuals Search And Download.  
6. RAS Information  
6.1 LED indication  
On the AS311, five status LEDs are provided as follows. These LEDs are useful to  
check the AS311 operation status and the communication status.  
RUN  
TX1  
RX1  
TX2  
RX2  
RUN  
Indicates the AS311 operation status.  
Lit when the AS311 is in ready state.  
Not lit when the AS311 is in error or under initialization.  
Indicates the channel 1 communication status.  
Lit while some data is transmitting from the AS311.  
Indicates the channel 1 communication status.  
Lit while some data is receiving into the AS311.  
Indicates the channel 2 communication status.  
Lit while some data is transmitting from the AS311.  
Indicates the channel 2 communication status.  
Lit while some data is receiving into the AS311.  
TX1  
RX1  
TX2  
RX2  
52 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
6. RAS Information  
6.2 Buffer memory information  
Various RAS information are stored in the AS311’s buffer memory. These information  
can be read by READ instruction. When some abnormality has occurred, check these  
information.  
6.2.1 Module status  
Address 4 of the buffer memory stores the AS311 module status.  
F
E
D
0
C
0
B
0
A
0
9
0
8
0
7
6
5
4
3
2
1
0
RDY ERR  
Error code  
4
Bit F  
RDY (Ready)  
ERR (Error)  
Error code  
1 = operating normally  
0 = under initialization or error state  
1 = error state  
0 = no error (normal)  
Shows the detected error item if ERR is 1.  
See the table below (H00 when normal)  
Bit E  
Bit 7-0  
Error  
code  
H01  
Type of error  
CPU error  
Description  
Status  
CPU error has been detected  
during initialization.  
ROM error has been detected  
during initialization.  
Work RAM error has been  
detected during initialization.  
Operation is stopped.  
Operation is stopped.  
Operation is stopped.  
Operation is stopped.  
Operation is stopped.  
H02  
H03  
H04  
H05  
ROM error  
RAM error  
Buffer memory Buffer memory error has been  
error  
Switch setting  
abnormal  
detected during initialization.  
Switch setting abnormality has  
been detected during  
initialization.  
H10  
H11  
H12  
Watchdog  
timer error  
Watchdog timer error has  
occurred during operation.  
Operation is stopped.  
Cold reset will be  
effective.  
Operation is stopped.  
Cold reset will be  
effective.  
Operation is stopped.  
Cold reset will be  
effective.  
Trap interrupt  
error  
Trap interrupt has occurred by  
detecting illegal instruction  
during operation.  
Buffer memory Buffer memory time-out has  
time-out error occurred during operation.  
User’s Manual 53  
Download from Www.Somanuals.com. All Manuals Search And Download.  
6. RAS Information  
6.2.2 Switch setting status  
Addresses 5, 6 and 7 of the buffer memory store the switches setting status. Check  
that the information agrees with the physical setting status if some abnormality has  
occurred.  
F
0
E
0
D
0
C
0
B
0
A
0
9
0
8
0
7
6
5
4
3
2
1
0
RSW1  
RSW2  
5
Bit 7-4  
Bit 3-0  
RSW1  
RSW2  
Stores the rotary switch 1 (RSW1) setting status.  
0 - F  
Stores the rotary switch 2 (RSW2) setting status.  
0 - F  
F
0
E
0
D
0
C
0
B
0
A
0
9
0
8
0
7
6
5
4
3
2
1
0
SW1  
6
SW1  
OFF  
ON  
8
7
6
5
4
3
2
1
ON: 1 OFF: 0  
F
0
E
0
D
0
C
0
B
0
A
0
9
0
8
0
7
6
5
4
3
2
1
0
SW2  
7
SW2  
OFF  
ON  
8
7
6
5
4
3
2
1
ON: 1 OFF: 0  
54 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
6. RAS Information  
6.2.3 Error information for data receiving  
Address 16 for channel 1 and address 80 for channel 2 store the error information for  
data receiving.  
F
0
E
0
D
0
C
0
B
A
9
8
7
6
5
4
3
2
1
0
BRK PE  
FE  
OE  
Receive error code  
16 or 80  
Bit B  
Bit A  
Bit 9  
BRK (Break)  
1 = break detected  
0 = normal  
When break has been detected, receive buffer is  
cleared. The next message can be received.  
PE (Parity error) 1 = parity error  
0 = normal  
When parity error has occurred, the message is  
disabled. The next message can be received.  
1 = framing error  
FE  
(Framing error)  
0 = normal  
When framing error has occurred, the message is  
disabled. The next message can be received.  
1 = overrun error  
Bit 8  
OE  
(Overrun error)  
0 = normal  
When overrun error has occurred, the message is  
disabled. The next message can be received.  
Shows the error code regarding received message.  
See the table below. (H00 when normal)  
Bit 7-0  
Receive error  
code  
Error  
code  
H01  
Type of error  
Description  
Status  
Receive time-  
out error  
Specified time-out check  
time has elapsed between will be received as the next.  
characters.  
The rest of the message  
H02  
H03  
Message  
length error  
The message length has  
exceeded the limit. (896  
bytes)  
The message is disabled.  
The next message can be  
received.  
The message is disabled.  
The next message can be  
received.  
Receive buffer Receive buffer overflow  
overflow has occurred.  
User’s Manual 55  
Download from Www.Somanuals.com. All Manuals Search And Download.  
6. RAS Information  
6.2.4 Error information for data transmitting  
Address 17 for channel 1 and address 81 for channel 2 store the error information for  
data transmitting.  
F
0
E
0
D
0
C
0
B
0
A
0
9
0
8
0
7
6
5
4
3
2
1
0
Transmit error code  
17 or 81  
Bit 7-0  
Transmit error  
code  
Shows the error code for transmitting.  
See the table below. (H00 when normal)  
Error  
code  
H01  
Type of error  
Description  
Status  
Trailing code  
missing  
The trailing code has not  
been written into the  
buffer memory.  
The message is disabled.  
The next message can be  
transmitted.  
56 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
6. RAS Information  
6.3 Trouble shooting  
When AS311 does not work properly, check the following points.  
When AS311’s RUN  
LED does not light;  
Does the POWER LED on  
the T3 power supply module  
light ?  
If no, check the power  
voltage/connection.  
If no, check the internal  
5 Vdc current  
consumption.  
Is the AS311 mounted  
securely on the base ?  
Remove the AS311,  
and mount again  
securely.  
When RX1/RX2 LED  
does not light while  
the connected device is  
transmitting a message;  
Are the transmission  
signals (RXD, SG, etc.)  
connected properly ?  
Check the cable  
connection.  
When the received data  
cannot be read properly;  
Does the receive error  
occur ?  
Check the transmission  
parameters (baudrate,  
parity, etc.).  
Check the cable  
connection.  
Confirm the receive  
error information.  
Is the T3 program working  
correctly ?  
Check the T3 program.  
When a data cannot be  
transmitted from the  
AS311 (TX1/TX2 LED  
does not light);  
Does the transmit error  
occur ?  
Confirm the transmit  
error information.  
Check the T3 program.  
Is the CTS signal  
connected properly ?  
Check the cable  
connection.  
If CTS signal is OFF,  
data transmitting  
is prohibited.  
User’s Manual 57  
Download from Www.Somanuals.com. All Manuals Search And Download.  
58 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix  
A.1 Specification of the READ instruction  
A.2 Specification of the WRITE instruction  
User’s Manual 59  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix  
A.1 Specification of the READ instruction  
FUN 237 Special module data read (READ)  
Reads designated range of data from the special module.  
Input  
Execution output  
[ A READ B C ]  
Function  
This instruction reads data from the buffer memory of the special module that is  
designated by operand A, and stores them in T3’s registers starting with operand C.  
The transfer source address (buffer memory  
Input  
Action  
Output ERF  
OFF  
ON  
address) is designated by operand B.  
The transfer size (number of words) is  
designated by operand B+1.  
OFF No execution  
ON Normal execution  
Error (see Note 2)  
ON  
ON  
Index  
Operand  
Constant  
Device  
Register  
X
Y
S
L
R
Z
T. C.  
I
O XW YW SW LW RW W  
T
C
D
F
IW  
O
I
J
K
Opr  
A
Name  
Special  
module  
Transfer  
parameter  
W
√ √  
√ √  
B
√ √ √ √ √ √ √ √ √ √  
√ √ √ √ √ √ √ √ √  
C Top register  
of destination  
Program example  
R0000  
[ XW000 READ RW010 D0100 ]  
When R0000 is ON, the buffer memory data of the size indicated by RW011, starting with the  
address indicated by RW010 of the special module allocated to XW000, are read and stored in  
D0100 and after.  
The maximum number of words to be read is 256 words.  
XW000 special module  
T3  
RW010  
RW011  
20  
16  
Buffer memory  
20 1234  
READ  
D0100 1234  
D0115 5678  
35 5678  
16 words  
60 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix  
Note 1) The special module can be designated not only by the assigned register, but  
also by the mounting position. The mounting position is designated by a  
constant data for the operand A as follows.  
(Unit number) × 256 + (Slot number)  
H
Slot number (hexadecimal)  
Unit number (hexadecimal)  
Unit number  
Hexadecimal  
H00  
Slot number  
Hexadecimal  
H00  
0
1
2
3
0
1
2
H01  
H02  
H03  
H01  
H02  
H03  
3
4
H04  
5
H05  
6
H06  
7
H07  
8
H08  
9
H09  
10  
H0A  
For example, if a special module is mounted on Slot-4, Unit-0 (basic unit)  
and allocated to XW008 - YW011, the following two READ instructions  
function the same.  
[ XW008 READ RW010 D0100 ]  
[ H0004 READ RW010 D0100 ]  
Note 2) The READ instruction is not executed as error in the following cases. In  
these cases, ERF (instruction error flag = S0051) is set to ON.  
When the operand A is other than a valid constant (see Note 1) or XW/YW  
register.  
When the designated special module has been disconnected.  
When no answer error occurs with the designated special module.  
When the number of words transferred exceeds 256 words.  
When the source table of transfer is out of the valid range.  
When the destination table of transfer is out of the valid range.  
User’s Manual 61  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix  
A.2 Specification of the WRITE instruction  
FUN 238 Special module data write (WRITE)  
Writes designated range of data into the special module.  
Input  
Execution output  
[ A WRITE B C ]  
Function  
This instruction transfers data stored in T3’s registers starting with operand A into the buffer  
memory of the special module that is designated by operand C.  
The destination address (buffer memory  
Input  
Action  
Output ERF  
OFF  
ON  
address) is designated by operand B.  
The transfer size (number of words) is  
designated by operand B+1.  
OFF No execution  
ON Normal execution  
Error (see Note 2)  
ON  
ON  
Index  
Operand  
Constant  
Device  
Register  
X
Y
S
L
R
Z
T. C.  
I
O XW YW SW LW RW W  
T
C
D
F
IW  
O
I
J
K
Opr  
A
Name  
W
Top register  
of source  
Transfer  
√ √ √ √ √ √ √ √ √ √  
√ √ √ √ √ √ √ √ √ √  
√ √  
B
parameter  
C Special  
module  
√ √  
Program example  
R0000  
[ D0100 WRITE RW010 YW002 ]  
When R0000 is ON, the register data of the size indicated by RW011, starting with D0100,  
are transferred to the buffer memory starting with the address indicated by RW010 of the  
special module allocated to YW002.  
The maximum number of words to be transferred is 256 words.  
T3  
YW002 special module  
RW010 320  
RW011 150  
Buffer memory  
320 1234  
D0100 1234  
D0249 5678  
WRITE  
150 words  
469 5678  
62 ASCII Interface Module (AS311)  
Download from Www.Somanuals.com. All Manuals Search And Download.  
Appendix  
Note 1) The special module can be designated not only by the assigned register, but  
also by the mounting position. The mounting position is designated by a  
constant data for the operand C as follows.  
(Unit number) × 256 + (Slot number)  
H
Slot number (hexadecimal)  
Unit number (hexadecimal)  
Unit number  
Hexadecimal  
H00  
Slot number  
Hexadecimal  
H00  
0
1
2
3
0
1
2
H01  
H02  
H03  
H01  
H02  
H03  
3
4
H04  
5
H05  
6
H06  
7
H07  
8
H08  
9
H09  
10  
H0A  
For example, if a special module is mounted on Slot-2, Unit-1 (expansion  
unit #1) and allocated to XW020 - YW023, the following two WRITE  
instructions function the same.  
[ D0100 WRITE RW010 XW020 ]  
[ D0100 WRITE RW010 H0102 ]  
Note 2) The WRITE instruction is not executed as error in the following cases. In  
these cases, ERF (instruction error flag = S0051) is set to ON.  
When the operand C is other than a valid constant (see Note 1) or XW/YW  
register.  
When the designated special module has been disconnected.  
When no answer error occurs with the designated special module.  
When the number of words transferred exceeds 256 words.  
When the source table of transfer is out of the valid range.  
When the destination table of transfer is out of the valid range.  
User’s Manual 63  
Download from Www.Somanuals.com. All Manuals Search And Download.  
TOSHIBA CORPORATION  
Industrial Equipment Department  
1-1, Shibaura 1-chome, Minato-ku  
Tokyo 105-8001, JAPAN  
Tel: 03-3457-4900 Fax: 03-5444-9268  
Download from Www.Somanuals.com. All Manuals Search And Download.  

Tascam MP3 Player MP VT1 User Manual
Technicolor Thomson Universal Remote M8521C User Manual
Thule Automobile Accessories Kit 262 User Manual
Toshiba Air Conditioner TCB BC1602UUL User Manual
Toshiba Fax Machine TF 531 551 User Manual
Tripp Lite Power Supply 3 Phase 30kVA User Manual
Troy Bilt Lawn Mower TB 38 User Manual
Vienna Acoustics Speaker Waltz Grand Series User Manual
Viking Cooktop F21208 User Manual
VocoPro Universal Remote DA X888RV24 User Manual