background image

UM-TS03***-E020 

 

 

 

PROGRAMMABLE CONTROLLER 

PROSEC 

T3 

 

 

 

 

ASCII INTERFACE MODULE 

AS311 

USER’S MANUAL 

 

 

 

 

 

 

 

TOSHIBA CORPORATION 

Summary of Contents for AS311

Page 1: ...UM TS03 E020 PROGRAMMABLE CONTROLLER PROSEC T3 ASCII INTERFACE MODULE AS311 USER S MANUAL TOSHIBA CORPORATION ...

Page 2: ... circuits equipment or examples of application in this publication Toshiba Corporation reserves the right to make changes and improvements to this publication and or related products at any time without notice No obligation shall be incurred other than as noted in this publication This publication is copyrighted and contains proprietary material No part of this book may be reproduced stored in a r...

Page 3: ... 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 sy...

Page 4: ...ifications 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 Procedu...

Page 5: ...o 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 Manua...

Page 6: ... O registers 24 4 2 AS311 buffer memory 26 4 2 1 Memory map 26 4 2 2 Buffer memory access 27 4 2 3 Parameter area 29 4 2 4 Receiving and transmitting data area 36 5 Operation Procedure 37 5 1 Transmission message format 38 5 2 Received message read sequence 39 5 2 1 Flag control timing 39 5 2 2 T3 sample program for message receiving 40 5 3 Write sequence for message transmitting 43 5 3 1 Flag con...

Page 7: ...nformation 53 6 2 1 Module status 53 6 2 2 Switch setting status 54 6 2 3 Error information for data receiving 55 6 2 4 Error information for data transmitting 56 6 3 Trouble shooting 57 Appendix 59 A 1 Specification of the READ instruction 60 A 2 Specification of the WRITE instruction 62 ...

Page 8: ...6 ASCII Interface Module AS311 ...

Page 9: ...User s Manual 7 Section 1 AS311 Overview 1 1 Introduction 1 2 AS311 functions 1 3 External features ...

Page 10: ... 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 The maximum number of AS311 that can be controlled...

Page 11: ...ing 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 Channel 1 WRITE Transmitting buffer area READ Receiving Transmitting area buffer WRITE Transmitting area Receiving Channel 2 buffer Transmitting buffer Here a message one set of transmission characters means a string of ASCII characte...

Page 12: ... RSW 2 RSW 1 8 7 6 5 4 3 2 1 RESET CH2 CH1 Channel 1 transmission parameter setting switches Channel 2 transmission parameter setting switches RS 232C RS 422 selection switches Optional rotary switches Hardware reset switch Channel 1 serial port RS 232C RS 422 D Sub 25 pin female connector Channel 2 serial port RS 232C D Sub 25 pin female connector ...

Page 13: ... ON OFF ON OFF Baud rate 300 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 The factory settings of the SW1 and SW2 are as shown above figure That is 1 stop bit 8 data bits odd parit...

Page 14: ...or RS 422 No 2 OFF ON Terminating Not connect Connect Used to connect the terminating resistor 120 Ω between CTSA and CTSB Effective for RS 422 No 3 OFF ON Terminating Not connect Connect NOTE 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 RSW2 RSW1 C 4 8 0 C 4 8 0 Always se...

Page 15: ... 232C 1 FG 1 FG 2 TXD 2 TXD 3 RXD for RS 232C 3 RXD 4 RTS 4 RTS 5 CTS 5 CTS 6 6 DSR 7 SG 7 SG 8 8 9 5 Vdc 9 5 Vdc 10 TXDA 10 11 RXDA for RS 422 11 12 RTSA 12 13 CTSA 13 14 14 15 15 16 16 17 17 18 18 19 19 20 DTR for RS232C 20 DTR 21 TXDB 21 22 RXDB for RS 422 22 23 RTSB 23 24 CTSB 24 25 25 The arrow on the above figure shows the signal direction FG is connected with the T3 s frame ground internall...

Page 16: ...14 ASCII Interface Module AS311 ...

Page 17: ...User s Manual 15 Section 2 Specifications 2 1 General specifications 2 2 Functional specifications 2 3 Transmission specifications ...

Page 18: ...Note 2 Between interface connector pins and internal circuit 2 2 Functional specifications Item Specifications Module type Serial communication interface I O allocation type iX Y 4W Buffer memory capacity 448 words x 4 accessed from T3 by READ WRITE instruction Transmission interface 2 channels Channel 1 RS 232C or RS 422 selectable Channel 2 RS 232C Display Status LEDs RUN lit when operating norm...

Page 19: ...m RS 422 Max 15 m Connector D sub 25 pin female 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...

Page 20: ...18 ASCII Interface Module AS311 ...

Page 21: ...User s Manual 19 Section 3 Cable Connections 3 1 RS 232C connection 3 2 RS 422 connection ...

Page 22: ...orted 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 Do not connect or remove the connector while the AS311 is powered Otherwise it will cause damage to the AS311 RXD TXD DTR SG DSR RTS CTS 1 2 3 4 5 6 7 20 FG TXD RXD RTS CTS DSR SG DTR NOTE ...

Page 23: ...W3 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 Do not connect or remove the connector while the AS311 is powered Otherwise it will cause damage t...

Page 24: ...22 ASCII Interface Module AS311 ...

Page 25: ...User s Manual 23 Section 4 Register Configuration 4 1 I O allocation and I O registers 4 2 AS311 buffer memory ...

Page 26: ...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...

Page 27: ...complete 1 transmitting has been completed normally D Transmit error 1 transmitting has been canceled by error XW n 1 C 8 No use always 0 CH2 7 Read ready 1 ready to read the received data 6 Receive complete 1 receiving for channel 2 has been completed 5 Receive error 1 receiving error has occurred 4 0 No use always 0 F Transmit start Set to 1 to start transmitting data from channel 1 YW n 2 E 8 N...

Page 28: ...ins 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 Word data 0 Status and command 4 words same data as I O registers 4 Parameter 124 words transmission parameters etc 128 Channel 1 reading receiving data area 448 words 576 Channel 1 writi...

Page 29: ...FUN237 Expression A READ B C Operands A I O register XW YW assigned to the AS311 B 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 X...

Page 30: ...dress 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 ...

Page 31: ...information 71 Reserved 8 CH1 CH2 72 9 common 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...

Page 32: ...ode is stored here F E D C B A 9 8 7 6 5 4 3 2 1 0 4 RDY ERR 0 0 0 0 0 0 Error code Bit F RDY Ready 1 operating normally 0 under initialization or error state Bit E ERR Error 1 error state 0 no error normal Bit 7 0 Error code Shows the detected error item if ERR is 1 H00 when normal See section 6 2 1 for details RSW1 2 information 5 The address 5 stores the rotary switches RSW1 and RSW2 setting st...

Page 33: ...arameter setting switches SW1 F E D C B A 9 8 7 6 5 4 3 2 1 0 6 0 0 0 0 0 0 0 0 SW1 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 E D C B A 9 8 7 6 5 4 3 2 1 0 7 0 0 0 0 0 0 0 0 SW2 SW2 OFF ON 8 7 6 5 4 3 2 1 ON 1 OFF 0 ...

Page 34: ...0 0 0 0 Command number Bit F RST Reset 1 reset request 0 normal no reset request Bit 7 0 Command number HFE hot reset HFF cold reset 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 sec...

Page 35: ...r 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 E D C B A 9 8 7 6 5 4 3 2 1 0 18 or 82 0 0 0 0 0 0 0 IDL DSR 0 0 0 CTS 1 0 0 Bit 8 IDL Idle 1 transmitter is idle state 0 trans...

Page 36: ...0 Received message length Shows the received message length bytes 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...

Page 37: ...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 25 or 89 Time out check time 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...

Page 38: ...g data area 448 words 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...

Page 39: ...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 ...

Page 40: ... 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 0 1 2 A B 7 8 9 CR In the above figure x means an ASCII character For example 0 is H30 When the above message is received or transmitted the data arrangements in the T3 registers are as follows Register F 8 7 0 n 1 0 n 1 A 2 n 2 7 B n 3...

Page 41: ...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 AS311 sets the error information into memory receiving data area and buffer memory parameter area sets the received message length into buffer memory parameter area AS311 sets Read ready to ON ...

Page 42: ...m 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 receiving error Operation for normal received message Subroutine No 0 ...

Page 43: ...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 ...

Page 44: ...ll 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...

Page 45: ... 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 AS311 sets the error information into sets T...

Page 46: ...ting 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 ...

Page 47: ...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 ...

Page 48: ...ssage 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...

Page 49: ... 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 ...

Page 50: ...alization 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...

Page 51: ... 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 a...

Page 52: ... 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...

Page 53: ...User s Manual 51 Section 6 RAS Information 6 1 LED indication 6 2 Buffer memory information 6 3 Trouble shooting ...

Page 54: ... the AS311 is in ready state Not lit when the AS311 is in error or under initialization TX1 Indicates the channel 1 communication status Lit while some data is transmitting from the AS311 RX1 Indicates the channel 1 communication status Lit while some data is receiving into the AS311 TX2 Indicates the channel 2 communication status Lit while some data is transmitting from the AS311 RX2 Indicates t...

Page 55: ...r has been detected during initialization Operation is stopped H02 ROM error ROM error has been detected during initialization Operation is stopped H03 RAM error Work RAM error has been detected during initialization Operation is stopped H04 Buffer memory error Buffer memory error has been detected during initialization Operation is stopped H05 Switch setting abnormal Switch setting abnormality ha...

Page 56: ...g status if some abnormality has occurred F E D C B A 9 8 7 6 5 4 3 2 1 0 5 0 0 0 0 0 0 0 0 RSW1 RSW2 Bit 7 4 RSW1 Stores the rotary switch 1 RSW1 setting status 0 F Bit 3 0 RSW2 Stores the rotary switch 2 RSW2 setting status 0 F F E D C B A 9 8 7 6 5 4 3 2 1 0 6 0 0 0 0 0 0 0 0 SW1 SW1 OFF ON 8 7 6 5 4 3 2 1 ON 1 OFF 0 F E D C B A 9 8 7 6 5 4 3 2 1 0 7 0 0 0 0 0 0 0 0 SW2 SW2 OFF ON 8 7 6 5 4 3 2...

Page 57: ...en framing error has occurred the message is disabled The next message can be received Bit 8 OE Overrun error 1 overrun error 0 normal When overrun error has occurred the message is disabled The next message can be received Bit 7 0 Receive error code Shows the error code regarding received message See the table below H00 when normal Error code Type of error Description Status H01 Receive time out ...

Page 58: ...ta transmitting F E D C B A 9 8 7 6 5 4 3 2 1 0 17 or 81 0 0 0 0 0 0 0 0 Transmit error code Bit 7 0 Transmit error code Shows the error code for transmitting See the table below H00 when normal Error code Type of error Description Status H01 Trailing code missing The trailing code has not been written into the buffer memory The message is disabled The next message can be transmitted ...

Page 59: ...ot light while signals RXD SG etc connection the connected device is connected properly transmitting a message When the received data Does the receive error Check the transmission cannot be read properly occur parameters baudrate parity etc Check the cable connection Confirm the receive error information Is the T3 program working Check the T3 program correctly When a data cannot be Does the transm...

Page 60: ...58 ASCII Interface Module AS311 ...

Page 61: ...User s Manual 59 Appendix A 1 Specification of the READ instruction A 2 Specification of the WRITE instruction ...

Page 62: ...is designated by operand B 1 Operand Index Constant Device Register Opr Name X Y S L R Z T C I O XW YW SW LW RW W T C D F IW O W I J K A Special module B Transfer parameter 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 X...

Page 63: ... 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 exc...

Page 64: ... by operand B 1 Operand Index Constant Device Register Opr Name X Y S L R Z T C I O XW YW SW LW RW W T C D F IW O W I J K A Top register of source B Transfer 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 o...

Page 65: ...020 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 transferre...

Page 66: ...TOSHIBA CORPORATION Industrial Equipment Department 1 1 Shibaura 1 chome Minato ku Tokyo 105 8001 JAPAN Tel 03 3457 4900 Fax 03 5444 9268 ...

Reviews: