background image

6

 

F

 

3

 

B

 

0

 

3

 

6

 

2

UM-TS02N**-E006

T2N Ethernet Port

Instruction Manual

Keep this instruction manual where it can be easily
referred to by users and those responsible for the
equipment.

Read this instruction manual carefully before using
the equipment.

After this instruction manual has been read, keep it
beside the equipment.

TOSHIBA CORPORATION

July, 1998

REQUIREMENTS

Main Menu

Contents

Summary of Contents for PU235N

Page 1: ...manual where it can be easily referred to by users and those responsible for the equipment Read this instruction manual carefully before using the equipment After this instruction manual has been read keep it beside the equipment TOSHIBA CORPORATION July 1998 REQUIREMENTS Main Menu Contents ...

Page 2: ...anical by photocopying recording or otherwise without obtaining prior written permission from Toshiba Important Information Misuse of this equipment can result in property damage or human injury Because controlled system applications vary widely you should satisfy yourself as to the acceptability of this equipment for your intended purpose In no event will Toshiba Corporation be responsible or lia...

Page 3: ...rtation equipment such as trains medical applications aerospace applications nuclear reactor control or underwater relay equipment or other special contexts 2 Although the PU235N 245N is manufactured under strict quality control if an PU235N 245N is to be used in critical equipment in which human lives could be endangered or in which large losses could occur should the PU235N 245N fail install saf...

Page 4: ...hat you can refer to it at any time even after you have read it Description of Safety Signs Safety sign Meaning WARNING Indicates a potentially hazardous situation which could result in death or serious injury if you do not follow the instructions CAUTION Indicates a potentially hazardous situation which may result in minor or moderate injury and or property damage if you do not follow the instruc...

Page 5: ... Also other equipment could be damaged or a breakdown could occur T2N User s Manual Hardware 3 Preparing for Operation Hardware CAUTION 1 Take all necessary safety precautions before performing operations such as changing a running program forcing output or switching to RUN operate or HALT stop modes Equipment can be damaged and breakdowns can be caused by operating this equipment incorrectly T2N ...

Page 6: ... 4 Verify that connectors cables and the mounting of the PU235N 245N itself in the base unit are all secured and that there is no play missing screws or disconnections in any of these parts If any of these parts is inadequately secured breakdown or malfunction could occur as the result of vibration 3 3 Mounting in the Base Unit Connecting to the network CAUTION 1 Do not connect or disconnect cable...

Page 7: ...mple programs present basic examples of Ethernet Port usage and should be reviewed carefully before use in an actual system 4 Preparing for operation software 5 Computer link protocol and the PC Link protocol transmission 6 Socket interface communication 7 RAS information Installation environment and base unit mounting CAUTION 1 Only use this equipment in the environment described in the T2N User ...

Page 8: ...at all times and to prevent trouble in advance perform daily inspections periodic inspections and cleaning 3 Refer to the section on error recovery in this document if the Ethernet Port does not operate correctly Contact your local Toshiba dealer or service representative if a breakdown occurs and request that the module be repaired or returned to Toshiba Operation and safety cannot be guaranteed ...

Page 9: ...the maximum cable length 100 m in systems using 10BASE T 1 3 Basic Functionality Ethernet Port registration Usage Recommendations 1 Before performing the settings described in this chapter register the Ethernet Port as T2N I O The I O type is ETHER PU235N or E S PU245N 4 1 Ethernet Port Setup Flowchart Software Restrictions on subnet masks Usage Recommendations 1 The Ethernet Port does not allow t...

Page 10: ...k protocol transmission messages are received at any point other than a message transmission UDP socket 5 1 Computer Link Protocol Transmission 5 3 PC Link Protocol Transmission Data write 5 4 PC Link Protocol Transmission Data read Limitations on the T2N SEND and RECV instructions Usage Recommendations When using the SEND and RECV instructions 1 When using fixed period interrupt programs there ar...

Page 11: ...escribes the function and names of the components of the Ethernet Port Since this chapter presents information required to understand the hardware settings described in the next chapter read this chapter carefully and use the Ethernet Port correctly Chapter 3 Preparing for Operation Hardware Describes the hardware preparations and settings required to operate the Ethernet Port normally Chapter 4 P...

Page 12: ... Ethernet is a registered trademark of Xerox Corporation Cheapernet is not a registered trademark but rather is a common name 3 Com and Etherlink III are trademarks of 3 Com Corporation PC NFS Pro is trademarks of Sun Microsystems Inc Visual Ctt is trademarks of Microsoft Corporation Microsoft is trademarks of Microsoft Corporation UNIX is trademarks of UNIX System Laboratories Inc Describes the c...

Page 13: ...Operation Hardware 26 3 1 Connecting to the Network 27 3 2 Network Wiring Equipment 28 4 Preparing for Operation Software 31 4 1 Ethernet Port Setup Flowchart Software 31 4 2 Ethernet Port Instruction Specifications 32 4 3 Ethernet Port Reset 39 4 4 Parameter Setup Request 41 4 5 Operating Mode Control Requests 46 5 Computer Link Protocol and the PC Link Protocol Transmission 50 5 1 Computer Link ...

Page 14: ...7 4 Remote Port Loopback for an Ethernet Port 128 7 5 Time Setting 130 7 6 RAS Information Readout 132 8 Error Handling 140 8 1 LED Display 140 8 2 Status error status 143 8 3 T2N Special Relays and Registers 146 8 4 Socket Interface Information 147 8 5 Troubleshooting 148 9 Installation and Wiring 163 9 1 Installation Environment and Base Unit Mounting 163 9 2 Network Wiring 164 Appendix Appendix...

Page 15: ...rt and exchanges data with host computers workstations or personal computers or other programmable controllers on the LAN The remainder of this section presents a system that uses the Ethernet Port In this example the T2N is connected to host machines such as workstations and personal computers over a 10BASE T LAN and the T2N is connected to lower level controllers using a Toshiba proprietary cont...

Page 16: ...rd users must be sure to use network equipment that conforms to the ISO 8802 3 standard The networking terminology used in this document is the terminology used in the ISO 8802 3 standard Table 1 3 presents the correspondence between the DIX standard terminology common terms and the ISO 8802 3 standard terminology Table 1 1 Networking Terminology Correspondences DIX Standard ISO 8802 3 Standard Et...

Page 17: ...e T series computer link protocol This function can be used simply by making basic settings on the Ethernet Port from the T2N there is no need to write special user programs for the T2N Computer link protocol uses UDP IP as the transmission protocol UDP IP User datagram protocol Internet protocol Application program Host machine Personal computer Workstation Ethernet Port T2N operating system Resp...

Page 18: ...ic Ethernet Port settings performed from the T2N are required to use the slave functions and no special user programs are required on the T2N PC link protocol transmission uses UDP IP as the transmission protocol UDP IP User datagram protocol Internet protocol Response 10BASE T Request Ethernet Port T2N operating system User program Ethernet Port T2N operating system User program PC link host stat...

Page 19: ...ble using the socket interface There are eight sockets on an Ethernet Port and the transmission protocol TCP IP or UDP IP can be specified for each socket TCP IP Transmission control protocol Internet protocol UDP IP User datagram protocol Internet protocol Application program Host machine Personal computer Workstation Ethernet Port T2N 10BASE T User program Socket Socket Data transmission Figure ...

Page 20: ...he TOSLINE S20LP Port This function will allow access to stations PROSEC T3H T2N on the TOSLINE S20LP from ports on the 10BASE T LAN using the computer link protocol Application program Host machine Personal computer Workstation T2N operating system Response 10BASE T Request TOSLINE S20LP Port TOSLINE S20LP T3H TOSLINE S20LP T3H TOSLINE S20LP T2N Response Request TOSLINE S20LP PU245N Ethernet Port...

Page 21: ...s in length This network uses 10BASE T Twisted pair cable as the transmission cable The figure below shows the maximum interport separation Node HUB 500m HUB 500m HUB 500m HUB Node Coaxial cable 10BASE5 100m 100m Twisted pair cable Twisted pair cable It is regarded that HUB is repeater and a twisted pair cable is single segment link segment Figure 1 6 10BASE T Usage Recommendations 1 Do not exceed...

Page 22: ...s 1 T series computer link protocol slave port 2 T series PC link protocol 3 Socket interface 8 sockets 4 PC gateway function currently unsupported RAS functions 1 Self diagnostics at power on ROM RAM LAN controller EEPROM T2N interface buffer memory MAC address 2 Test functions accessible from user programs Remote port verification request Remote port loopback test Between T2N and T2N T3H systems...

Page 23: ... transmission control protocol Before transferring data with the remote port a connection virtual communication circuit is first established and then data is transferred Transmission reliability is guaranteed by packet order control retransmission flow control and other techniques The Ethernet Port supports the following Response bit ACK Push bit PSH Synchronized bit SYN Fin bit FIN Retransferring...

Page 24: ...does not support the indirect routing and multicast functions Although the Ethernet Port physical layer structure conforms to the ISO8802 3 standard it adopts DIX standard frames as the data link frames the IP datagram send receive frames ARP Address resolution protocol Searches for a port MAC address Ethernet address that has a specified IP address ICMP Internet control message protocol Reports I...

Page 25: ...ns of the Ethernet Port and their functions 2 1 Front Panel ERUN ET R EACC SRUN SONL SACC STNH STNL OTR1 OTR2 TOSLINE S20LP Port parts PU245N only 10BASE T Ethernet Port 10BASE T connector for connecting transmission cable Ethernet Port LED Display Figure 2 1 PU235N 245N External Dimensions ...

Page 26: ...ernet Port error occurred ET R Ether Transmis sion Receive Indicates whether or not the Ethernet Port is transmitting data or receiving data On Data transmission or receipt in progress Off Data is not being transmitted or received EACC Ether Access Indicates whether or not the T2N is accessing the Ethernet Port On The T2N is accessing the Ethernet Port Off The T2N is not accessing the Ethernet Por...

Page 27: ...urs in the PU235N 245N there is the danger that someone could be hurt or fatally injured Also other equipment could be damaged or a breakdown could occur CAUTION 2 Take all necessary safety precautions before performing operations such as changing a running program forcing output or switching to RUN operate or HALT stop modes Equipment can be damaged and breakdowns can be caused by operating this ...

Page 28: ... 10BASE T connector and insert the modular connector 2 Pull the 10BASE T connector and verify that the connector is locked and cannot be pulled out CAUTION 1 When installing a 10BASE5 10BASE2 or 10BASE T network the cabling must be laid with adequate safety precautions and in accordance with all applicable standards Installation and wiring should be performed by a qualified professional See the IS...

Page 29: ...t also conforms to this standard The following section introduces recommended wiring and related equipment We strongly recommend that these models be used when new items are needed Contact the manufacturer directly for detailed information on this equipment 1 10BASE T Twisted pair cable HUB Catalog no ECM 04 M Length 1 to 100 Manufacturer Showa Electric Wire Cable Co Ltd Enable cross cable Catalog...

Page 30: ... 10 and 15 meters Manufacturer Showa Electric Wire Cable Co Ltd Catalog no AUI50 M Length Standard outside diameter 10 5 mm diameter thick wire molded connectors Length 20 30 40 and 50 meters Manufacturer Showa Electric Wire Cable Co Ltd Catalog no EPL 6213 Manufacturer Showa Electric Wire Cable Co Ltd Catalog no EEJ 6213 Manufacturer Showa Electric Wire Cable Co Ltd Catalog no EAD 6213 Manufactur...

Page 31: ...ed by a qualified professional See the ISO IEC8802 3 standard for installation environment standards Catalog no ETS 8191 Manufacturer Showa Electric Wire Cable Co Ltd Catalog no EAD 8191 Manufacturer Showa Electric Wire Cable Co Ltd Catalog no EEJ 8191 Manufacturer Showa Electric Wire Cable Co Ltd Catalog no EPL 1067 Manufacturer Showa Electric Wire Cable Co Ltd Catalog no RG 58A U Standard outsid...

Page 32: ...t Port Reset The Ethernet Port parameters required for network transmission are set up by a user program running on the T2N For details on these setup operations see section 4 4 Parameter Setup Request In this state the system can handle remote port verification requests See section 7 3 Remote Port Verification Request In this state the system can respond to existence verification requests from ot...

Page 33: ... ü ü ü ü ü ü B Status ü ü ü ü ü ü ü ü ü ü ü Input Operation Output ERF OFF No execution OFF OFF ON Execution Transmission port instruction busy instruction execution in progress response wait OFF OFF Response reception complete normal complete ON OFF Instruction error ON ON Figure 4 2 SEND RECV Instruction Formats Important items a ERF is the S0051 special relay See the T series Instruction Set fo...

Page 34: ...mote port verification request Verifies the existence of another port on the network SEND 0014H RAS information readout request Reads out the Ethernet Port RAS information RECV 0015H Time set request Sets the Ethernet Port internal clock Time information for event trace RAS information SEND 0018H Register read request PC link function Reads register data from remote T2N into registers in the local...

Page 35: ...nother class command for a socket for which an instruction is executing If such a request is issued the status described in the following status will be transmission port busy and the request will go to the wait state There are eight sockets and each can independently accept and execute a class instruction g If the T2N switches from the run to the halt state and then back to the run state while an...

Page 36: ...d their instructions are executed simultaneously separate the status and detailed information register every instruction Table 4 3 TermSTS Part 1 TermSTS Status Meaning 00H Normal complete 01H Register specification error Occurs if a register other than XW YW W LW RW D F T C or SW is specified as the data storage register in one of the following requests Requests RAS information readout remote por...

Page 37: ...initializing Occurs if a T2N internal timer times out Requests UDP open UDP send UDP close TCP send TCP close 07H No send channel CH Occurs if the corresponding Ethernet Port is not installed 08H Port address out of range Occurs if the local port IP address was specified for the remote destination IP address Requests Remote port loopback register read write 09H Incorrect transmission word count Oc...

Page 38: ...3H Time setting Year 0074H Time setting Month 0075H Time setting Day 0076H Time setting Hour 0077H Time setting Minute 0078H Time setting Second Opened 0080H Occurs if an open request is issued for an already open socket Unopened 0081H Occurs if send receive or close request is issued for an unopened socket Occurs if send receive request is issued for TCP socket during receiving CLOSE request RCLO...

Page 39: ...pecification error 00A2H Occurs if the remote IP address is broadcast on a remote port verification request MAC address specification error 00B0H BCC error 00B1H Occurs if an error occurs after address saving on a MAC setup request Resource shortage error 00C0H Occurs if send request is issued for the Ethernet Port internal buffer fill Receive request from the T2N 00C1H The specifiable size from u...

Page 40: ... the Ethernet Port switches to standby mode the parameter setting wait state thus completing the reset sequence If an error is discovered during the self check the Ethernet Port goes to the down state Ethernet Port self check items System ROM check System RAM check LAN controller check T2N interface buffer memory check EEPROM check See section 4 5 Operating Mode Control Requests for more informati...

Page 41: ... and F F E D C B A 9 8 7 6 5 4 3 2 1 0 B 0 0 0 0 TermSTS B 1 Detailed information Only valid when TermSTS 0BH d Important items An error will occur if the Ethernet Port is in run mode or down mode Run mode Status Transmission error TermSTS 0BH Detailed information Port mode error 0040H Down mode Status Module error initialization in progress TermSTS 06H e Sample program This sample ladder program ...

Page 42: ...ata item IP addresses are written as the decimal values of each byte in the 32 bit datum with the decimal values separated by dots Example 11000000 00000000 00000000 00000001 192 0 0 1 IP addresses are divided into five classes A through C according to how many bits in the 32 bit value are used as the network address The networking standards also define classes D and E but the Ethernet Port does n...

Page 43: ... This allows the installation to operate the network internally as multiple subnetworks while the network is recognized externally as a single network The subnet mask is used to determine how many bits of the host address to allocate as the subnet address In the subnet mask the network address field and the subnetwork address field are set to 1 and the remaining field the subnet host address field...

Page 44: ...t interface transmission The range of port numbers that can be used with the Ethernet Port is from 1024 to 65535 for both TCP and UDP This is because UNIX allocates port numbers 1 to 1023 for standard services However note that the same port number cannot be used for both TCP and UDP on the Ethernet Port The following section describes the format of the parameter setup request Parameter setup requ...

Page 45: ...transmission receive port Computer link port number 2000 PC link protocol transmission Message transmission send port 1 Computer link protocol transmission port number 2001 Message transmission send port 2 PC link protocol transmission port number 2002 Figure 4 5 Relationship between Message Transmission Send and Receive Port Numbers As mentioned in the section on socket interface transmission UDP...

Page 46: ...544 3100H 00018 0012H 29061 7185H 02658 0A62H R0502 R0602 1 Parameter setup request R0602 2 12544 MOV RW000 00018 MOV RW001 Designates the module and sets the CMD number 29061 MOV RW002 02658 MOV RW003 01025 MOV RW004 Sets the IP address Port number RW000 SEND RW010 RST R0502 Sets the request ...

Page 47: ... parameter can set up Ethernet Port parameters cannot be set up in any mode other than standby mode After the Ethernet Port parameters have been set up the Ethernet Port can be switched to run mode by T2N user program instructions 3 Run mode In this mode the Ethernet Port can communicate with other ports The Ethernet Port can be switched to standby mode by T2N user program instructions In run mode...

Page 48: ... Figure 4 6 Ethernet Port Mode Transitions Run request Self check completes normally Unrecoverable error Self check terminates in an error state Power on off on cycle Reset request Power applied Down Run Standby Initialization Power down Standby request Unrecoverable error ...

Page 49: ...RUN run request Switches the Ethernet Port from standby mode to run mode Bit 5 MTEN message transmission enable prohibit request Computer link PC link protocol transmission enable prohibit 1 Enable 0 Prohibit Bit 4 STEN socket interface transmission enable prohibit request Socket interface transmission enable prohibit 1 Enable 0 Prohibit Examples Standby request 2000H Run request 1030H Allows both...

Page 50: ...mSTS 0BH Detailed information Incorrect control request specification 0083H No execution is possible in down mode Status Module error initialization in progress TermSTS 06H An error occurs if a control request that switches the Ethernet Port to run mode is issued without first setting the IP address Status Transmission error TermSTS 0BH Detailed information MAC IP not set up 0050H e Sample program...

Page 51: ...hen a T2N and a host computer communicate over an Ethernet Port using the computer link protocol they use UDP IP as the transmission protocol When a host computer transmits to a T2N using computer link protocol the host computer s UDP socket is used Socket refers to the combination of an IP address and a port number The host computer sends commands and data from its own UDP socket to the Ethernet ...

Page 52: ...s Local IP address 133 113 98 200 Local UDP port number 3001 Remote IP address 133 113 98 10 Remote UDP port number 3001 SAMPLE H Write and read requests can be issued to other T2N units by modifying this definition file C Copyright TOSHIBA Corporation 1995 All Rights Reserved Definition declarations define MY_PORT 3001 Local port number define DST_PORT 3001 Remote port number define DST_IP 133 11...

Page 53: ... that registers in other ports can be accessed by modifying the SAMPLE H definition file C Copyright TOSHIBA Corporation 1995 All Rights Reserved Include declarations define WIN31 This is a Windows 3 1 application define USECOMM The COMM API is required include string h include stdio h include stdlib h include string h include memory h include sys types h include fcntl h include errno h include sy...

Page 54: ...s 0 If normal return isdp socket AF_INET SOCK_DGRAM 0 Create socket UDP if isdp INVALID_SOCKET If normal return Soc sin_family AF_INET Soc sin_addr s_addr 0 Set local IP address Soc sin_port htons MY_PORT Set local port number Execute bind processing ists bind isdp struct sockaddr Soc sizeof Soc if ists SOCKET_ERROR If bind completed normally for i 0 i LOOP i Loop for the specified number of times...

Page 55: ...d buffer char crcv 1000 Data receive buffer fd_set ibits SELECT bit mask struct timeval timeout SELECT timer value struct sockaddr_in Snd Rcv iret 1 memset Snd 0x00 sizeof Snd memset Rcv 0x00 sizeof Rcv memset csnd 0x00 sizeof csnd Clear the send data buffer memset crcv 0x00 sizeof crcv Clear the receive data buffer Set up the register write send data sprintf csnd 0 A01DW Set up the register write...

Page 56: ...dr Snd sizeof Snd if ists isndsiz If the send length was OK Set the SELECT argument memset ibits 0x00 sizeof fd_set Set the BIT initial value timeout tv_sec RECVTOUT Set the timeout time FD_SET Isdp ibits BIT setup ists select 1 ibits 0 0 struct timeval timeout if ists 0 If normal return Register write response reception ists recvfrom Isdp crcv sizeof crcv 0 struct sockaddr Rcv ircvsiz if ists 5 i...

Page 57: ...of Snd if ists isndsiz Set the BIT initial value memset ibits 0x00 sizeof fd_set timeout tv_sec RECVTOUT Set the timeout time BIT setup FD_SET Isdp ibits ists select 1 ibits 0 0 struct timeval timeout if ists 0 If timeout and error return 1 recvfrom timed out Register read response reception ists recvfrom Isdp crcv sizeof crcv 0 struct sockaddr Rcv ircvsiz if ists 5 if crcv 6 C crcv 7 E iret 1 Reg...

Page 58: ...ions to guarantee communication reliability higher level protocols such as retry are required 2 No processing is performed if a PC link protocol transmission message is received at any point other than a message transmission UDP socket Register write request using the SEND instruction a Function The register data specified by the local port T2N is written to the specified register on the remote po...

Page 59: ... of the register specified by the remote port register type code 6 Timer count Specifies a time used to limit the response time from the remote port in 0 1 second units F E 0 A 10 Figure 5 1 indicates the register type code that the local or remote port can specify the code See T series Instruction Set Ladder SFC UM TS03 E004 RID Meaning RID Meaning 0000H XW YW registers 05H F register 0 8191 1 00...

Page 60: ...r TermSTS 09H occurs if the transferred register data length exceeds the range 1 to 485 words or 1 to 323 words for the T and C registers A register specification error TermSTS 01H occurs if a value other than a stipulated value is specified for the register type codes SRID DRID A register specification error TermSTS 01H occurs if 0007H the T register is specified for the local port register type ...

Page 61: ... F D RW LW W XW YW When PC link transmission or the UDP socket interface is used if an application transmits to a nonexistent remote port an transmission error TermSTS 0BH detailed information 0020H occurs 0 Write enabled 1 Write protected Special registers Counter registers Timer registers PC internal file registers Expansion file registers IC card Input output registers Link registers Link relay...

Page 62: ...N Usage Recommendations 1 Since UDP IP does not provide control functions to guarantee communication reliability higher level protocols such as retry are required 2 No processing is performed if a PC link protocol transmission message is received at any point other than a message transmission UDP socket Register read request using the RECV instruction a Function The register data specified by the ...

Page 63: ... B 0 0 0 0 TermSTS B 1 Detailed information Only valid when TermSTS 0BH d Important items The read operation is not synchronized with the remote port T2N T3H scan operation If synchronization is necessary applications must perform synchronization processing such as transferring the data to a separate registers at the start of the T2N scan The command number 0021H is the same as the Data Write A tr...

Page 64: ...pe on the local T2N by using the special coil settings described below In this case a memory write protect error TermSTS 04H will occur F 9 8 7 6 5 4 3 2 1 0 SW067 SW C T F D RW LW W XW YW When PC link transmission or the UDP socket interface is used if an application transmits to a nonexistent remote port an transmission error TermSTS 0BH detailed information 0020H occurs 0 Write enabled 1 Write ...

Page 65: ...sage transmission UDP port number 2000 RW090 Execution count specification 1 to 32767 RW091 Operation when a comparison error occurs continue 0 stop 1 RW092 Transfer register data length 1 to 485 words RW093 Write time transfer source register type RW094 Write time transfer source register start number RW095 Write time transfer destination register type read time readout source register type RW096...

Page 66: ...5 02000 MOV RW096 Transfer destination register type start number 00004 MOV RW097 03000 MOV RW098 Storage register type start number 0341995909 DMOV W0991 W0990 01025 MOV W0992 Remote destination IP address message transmission UDP port number Data preparation R0090 R009F 3 00001 MOV W0901 00900 MOV W0902 00000 MOV W0918 R0091 W0946 MOV W0900 RW093 MOV W0916 RW094 MOV W0917 R0098 R0098 W0901 XFER ...

Page 67: ...nsmission UDP port number W0903 SEND W0914 SET R0093 RST R0092 Sets the request and starts post completion readout Register readout R0093 5 12544 MOV W0920 00033 MOV W0921 Designates the module and sets the CMD number RW092 MOV W0922 Sets the transfer register data length RW097 MOV W0923 RW098 MOV W0924 Sets the storage register type start number RW095 MOV W0925 RW096 MOV W0926 Sets the transfer d...

Page 68: ...094 RW093 DMOV W0948 W0947 RW098 RW097 DMOV W0950 W0949 R0095 W0947 XFER W0940 W0941 R0096 W0949 XFER W0940 W0943 R0096 W0980 W0981 1 RW190 R0910 W0980 W0981 1 RW191 SET R0099 RST R0094 R0095 1 W0945 1 W0948 1 W0950 R0097 RW092 W0945 00000 MOV W0945 1 W0946 R0097 R0099 RW090 W0946 SET R0091 RST R0094 RW090 W0946 00000 MOV W0946 ...

Page 69: ...e and the differences between the UDP socket interface and the TCP socket interface 1 Positioning and functionality The socket interface is a programming interface that allows user programs to use the TCP IP and UDP IP functions Socket interface communication is a communication technique that has become standard on engineering workstations EWS and other networked computer systems The socket interf...

Page 70: ...ransmission source and transmission destination are specified in each data item a UDP socket can communicate with multiple remote UDP sockets The UDP socket interface provides no control functionality such as reception verification using e g ACK acknowledge responses or retransmission processing to assure transmission reliability Therefore reliability must be assured by higher level protocols impl...

Page 71: ...ng a connection between two ports one port must first open a socket in passive open mode and the other port must perform an active open on a local socket with respect to a remote socket that is in the passive open state Since the passive open socket port provides data transmission and other services it is called the server Since the active open socket port requests services it is called the client...

Page 72: ...on Data transmission Data reception Next data transmission Data reception Next data transmission Close request Close request Closed state Closed state Connection establishment request Data transmission Acknowledge response ACK Next data transmission Data transmission Acknowledge response ACK Data transmission Acknowledge response ACK Data transmission Close request Close request Server side Passiv...

Page 73: ... data units flowing on the network transmitted over the network 10BASE T See figure 6 8 For example when transmitting a 2000 byte data set which is the largest data size that can be handled by the Ethernet Port the phenomenon shown in figure 6 5 can occur 1 The sending T2N user program requests a transmission of 2000 bytes 2 The transmitted data is divided into two fragments A with 1472 bytes and ...

Page 74: ...formation indicating the size of the transmitted data for the single operation plus the data transmitted in the single operation will be stored in that area g In receive request programs from the T2N set the size of reception data to a value equal to or larger than that of the maximum size for the transmission data in a single operation If the size of reception data is smaller than the transmitted...

Page 75: ...ta is 800 or 1600 bytes those 800 or 1600 bytes can be acquired by the T2N by a receive request from the T2N In cases where the amount of received data is 2400 3200 or 4000 bytes 2000 bytes will be transferred by the first receive request from the T2N and the remaining 400 1200 or 2000 bytes can be transferred by issuing another receive request from the T2N d Therefore to handle one unit of transm...

Page 76: ...B are put onto the network in order The data that arrived at the receive side Ethernet Port is acquired by a receive request for 2000 bytes from the T2N and stored in the user specified register area See section 6 3 7 The amount of data that can be acquired by a TCP receive request differs depending on the timing with which the T2N issues the receive request and the timing with which the data arri...

Page 77: ... as well the user software on the receiving side must recognize the end of the transferred data either by using counts in the transmitted data or by including an end marker in the transmitted data and iterate receive requests until all the transmitted data has been received i User programs must store all incoming data so that the register area used to transfer data to the T2N is not overwritten wh...

Page 78: ... header 20 bytes UDP data field up to 1472 bytes TCP data field up to 1460 bytes FCS Frame Check Sequence 4 bytes 32 bit CRC code for the sections of the packet other than the preamble the SFD and the FCS Packet error detection Figure 6 8 Packet Format IP Datagram Packets traveling on the transmission path 72 to 1526 bytes IP data field up to 1480 bytes IP datagram 46 to 1500 bytes Data fields in ...

Page 79: ...close request was issued a significant amount of time may be required to process some close requests e The Ethernet Port includes a common transfer reception buffer of about 60k bytes to hold data This common transfer reception buffer is shared by all open sockets In the Ethernet Port TCP socket interface up to 4380 bytes of received data can be stored per socket In the case of using all TCP socke...

Page 80: ...s to the same socket Number of sockets used 50 ms Similarly the above intervals averaging 50 ms should be left between transmissions from remote ports to the local port Interval between remote port transmissions Number of remote ports 50 ms 5 UDP socket interface notes a In transmission using UDP sockets the user program must implement any processing required to assure transmission reliability suc...

Page 81: ...ngineering workstation and personal computer systems TCP sockets on the port that performed the close processing for the open connection cannot be opened again for a fixed period usually about 1 to 2 minutes although this time varies between systems g When the Ethernet Port issues a close request first the Ethernet Port waits 10 seconds If the T2N using the same port number reopen request during w...

Page 82: ... the remote port goes to the no response state a number of send requests equal to the Ethernet Port internal storage capacity i e three requests will complete normally When the number of send requests exceeds the Ethernet Port internal storage capacity errors will be returned for all further send requests l Segments with the reset bit RST set to 1 reset segments are not supported by the Ethernet P...

Page 83: ...sts the structure of the socket interface information and the extended memory area addresses Table 6 1 Socket Interface Information Socket identifier 1 2 3 4 5 6 7 8 Remote port number TCP only 0F4BH 0F53H 0F5BH 0F63H 0F6BH 0F73H 0F7BH 0F83H Remote port IP address TCP only 0F4CH 0F4DH 0F54H 0F55H 0F5CH 0F5DH 0F64H 0F65H 0F6CH 0F6DH 0F74H 0F75H 0F7CH 0F7DH 0F84H 0F85H Local port TCP UDP port number...

Page 84: ... response to a close request If the wait time exceeds the set value during a TCP active open request This bit is not set to 1 for a TCP passive open request timeout When a TCP active open request is reissued A socket status in which neither AOPEN nor POPEN is set to 1 indicates that the socket is in the closed state Important items This area is a read only area Do not attempt to write this data wi...

Page 85: ...rmSTS B 1 Detailed information Only valid when TermSTS 0BH d Important items After this request completes normally UDP send receive or close requests can be sent to the socket An error is returned if an open request is issued for an already open socket Status Transmission error TermSTS 0BH Detailed information Already open 0080H An error is returned if a value other than 1 to 8 is specified as the...

Page 86: ...ll occur if the port number overlaps Status Transmission error TermSTS 0BH Detailed information Already open 0080H If the T2N internal completion wait time limit 2 seconds is exceeded for this request the error listed below is returned Status Send completion timeout TermSTS 06H In this case first verify that the Ethernet Port is not in the down state by checking the station status and then verify ...

Page 87: ...DP open request CMD 0031H Hold the input of function block in the on state until the SEND instruction completes Instruction completion Verify the status Normal complete Yes Terminate UDP open processing No The specified socket is already open No An error occurred in the open processing and the specified socket could not be opened Handle the error according to the completion and socket status ...

Page 88: ... data storage register number Starting number of the registers that hold the transmission data c Status See figure 4 3 for details on bits C D E and F F E D C B A 9 8 7 6 5 4 3 2 1 0 B SportNO TermSTS B 1 Detailed information Only valid when TermSTS 0BH d Important items The T C register flag data is not transmitted if the T C registers are not specified as storage registers for transmitted data A...

Page 89: ...ntly may not be able to process socket 8 resulting in the following error response Status Send completion timeout TermSTS 06H When constructing a system take the socket utilization conditions into account when allocating sockets Since the send receive processing for each socket requires about 50 ms applications that issue send or receive requests to a given socket should leave an interval of at le...

Page 90: ...the SEND instruction completes Instruction completion Verify the status Normal complete Yes Terminate UDP transmission processing The processing in this section can be performed at this stage or at the point the instruction terminates abnormally No The specified UDP socket is in the closed state Open processing is required No An error occurred in transmission processing Transmission from the speci...

Page 91: ...00 words A 7 DRID Reception data storage register type code A 8 DregNO Reception data storage register number A 9 TimeCNT Reception wait timeout time Reception data length Set this parameter to a value greater than or equal to the largest size for transmission data that could be sent to the object socket in a single operation Reception data storage register type code Type code for the register tha...

Page 92: ...ecified as the socket identifier Status Transmission error TermSTS 0BH Detailed information Illegal socket identifier 0082H It is not possible to receive data sent from the local port even if the local port IP address is specified at the transmission source IP address Values in the range 1024 to 65535 can be specified as the object socket UDP port number for the transmission source An error will b...

Page 93: ...Status Send completion timeout TermSTS 06H When constructing a system take the socket utilization conditions into account when allocating sockets Since the send receive processing for each socket requires about 50 ms applications that issue send or receive requests to a given socket should leave an interval of at least 50 ms times the number of sockets used between each request Interval between re...

Page 94: ...he on state until the RECV instruction completes Instruction completion Verify the status Normal complete Yes Terminate UDP reception processing The processing in this section can be performed at this stage or at the point the instruction terminates abnormally No No The specified UDP socket is in the closed state Open processing is required The specified UDP socket has not received data No An erro...

Page 95: ...es Instruction completion Verify the status Did the operation complete before being timed out Yes Normal complete Yes Terminate UDP reception processing The processing in this section can be performed at this stage or at the point the instruction terminates abnormally No The specified UDP socket is in the closed state Open processing is required No Text was not received within the time limit No An...

Page 96: ... information Unopened 0081H An error is returned if a value other than 1 to 8 is specified as the socket identifier Status Transmission error TermSTS 0BH Detailed information Illegal socket identifier 0082H A UDP receive request will result in an error being returned if an unlimited wait state UDP receive request is terminated with this request Status Transmission completion timeout TermSTS 06H Su...

Page 97: ...equest CMD 0034H Hold the input of function block in the on state until the SEND instruction completes Instruction completion Verify the status Normal complete Yes Terminate UDP close processing No The specified UDP socket is already in the closed state No An error occurred in the close processing and the specified socket could not be closed Handle the error according to the completion and socket ...

Page 98: ...See figure 4 3 for details on bits C D E and F F E D C B A 9 8 7 6 5 4 3 2 1 0 B SportNO TermSTS B 1 Detailed information Only valid when TermSTS 0BH d Important items After this request completes normally TCP send receive or close requests can be sent to the socket An error is returned if an open request is issued for an already open socket Status Transmission error TermSTS 0BH Detailed informati...

Page 99: ...e range 0 1 to 6553 5 seconds or unlimited infinite we recommend that the timeout limit be set in the range 0 1 to 32 seconds for active opens This is because the Ethernet Port processing continuation time for active open processing is 32 seconds Even if the timeout limit is set to a value over 32 seconds once 32 seconds has elapsed the open processing will never actually be performed The system w...

Page 100: ...on state until the SEND instruction completes Instruction completion Verify the status Did the operation complete before being timed out Yes Normal complete Yes Terminate TCP open processing Connection established No The specified socket is already open active or passive No Connection could not be established within the time limit No An error occurred during open processing and the connection coul...

Page 101: ... when TermSTS 0BH d Important items Send requests complete at the point they are stored in the Ethernet Port This is to allow the send to be performed later even if that send request cannot be executed immediately due to network congestion or other problems The Ethernet Port can store up to three requests per socket and the Ethernet Port returns an error for send requests that it cannot store Stat...

Page 102: ... be set to 1 User programs should close such sockets Errors will be returned for send receive requests issued in this state Status Transmission error TermSTS 0BH Detailed information Protocol error 0091H However note that the Ethernet Port will return normal complete responses for TCP send requests issued prior to the timeout since the send requests from the T2N are stored internally by the Ethern...

Page 103: ...conditions into account when allocating sockets Since the send receive processing for each socket requires about 50 ms applications that issue send or receive requests to a given socket should leave an interval of at least 50 ms times the number of sockets used between each request Interval between requests to the same socket Number of sockets used 50 ms Similarly the above intervals averaging 50 ...

Page 104: ...nstruction completion Verify the status Normal complete Yes Terminate TCP transmission processing The processing in this section can be performed at this stage or at the point the instruction terminates abnormally No No A connection has not been established with the specified TCP socket Open processing is required The specified TCP socket is either Closed by the remote port or Not responding The s...

Page 105: ...de Type code for the register that holds the received data See Figure 5 1 Reception data storage register number Starting number of the registers that hold the received data Reception wait timeout time specified in 0 1 second units 1 to 65535 If zero is specified the system is set to an unlimited infinite wait state c Status See figure 4 3 for details on bits C D E and F F E D C B A 9 8 7 6 5 4 3 ...

Page 106: ...rt returns the following error Issuing a receive request in the receive wait state will also result in the following error being returned Status Transmission error TermSTS 0BH Detailed information Unopened 0081H Verify the socket status see section 6 3 RCLOSE and CONN bits and close the socket Allocate a reception data storage register area per a socket with a size equal to the size of the transmi...

Page 107: ...To handle single units of transmission data on the receiving side as single units as well the user software on the receiving side must recognize the end of the transferred data either by using counts in the transmitted data or by including an end marker in the transmitted data and iterate receive requests until all the transmitted data has been received User programs must save all incoming data so...

Page 108: ... instruction completes Instruction completion Verify the status Normal complete Yes Terminate TCP reception processing The processing in this section can be performed at this stage or at the point the instruction terminates abnormally No No No A connection has not been established with the specified TCP socket Open processing is required The specified TCP socket is Closed by the remote port The so...

Page 109: ...Verify the status Did the operation complete before being timed out Yes Normal complete Yes Terminate TCP reception processing The processing in this section can be performed at this stage or at the point the instruction terminates abnormally No No A connection has not been established with the specified TCP socket Open processing is required The specified TCP socket is Closed by the remote port T...

Page 110: ...if a value other than 1 to 8 is specified as the socket identifier Status Transmission error TermSTS 0BH Detailed information Illegal socket identifier 0082H A TCP receive requests will result in an error being returned if an unlimited wait state TCP open request receive request is terminated with this request Status Transmission completion timeout TermSTS 06H Supplement The T2N sees its requests ...

Page 111: ... the close processing for a fixed period The Ethernet Port which received a close request from the T2N replies to be received the T2N Therefore a close request of the T2N completes the no waiting time The Ethernet Port send a close request to a remote port and is waiting for a close request from a remote port If the T2N executes a open request in the same port number while the Ethernet Port is wai...

Page 112: ...function block in the on state until the SEND instruction completes Instruction completion Verify the status Normal complete Yes Terminate TCP close processing This is not necessary in processing for which the RCLOSE and NOACK bits have become 1 No The specified UDP socket is already in the closed state No An error occurred in the close processing and the specified socket could not be closed Handl...

Page 113: ...already completed a UDP open request This program issues a UDP open request for socket number 2 on the Ethernet Port This ladder program is executed by turning on the A contact on the R0620 Parameters 12544 3100H 00049 0031H UDP port number 4000 UDP open request executed when R0620 is set on R0620 1 12544 MOV RW000 00049 MOV RW001 Module designation CMD number setup 00002 MOV RW002 04000 MOV RW003...

Page 114: ...program is executed by turning on the A contact on the R0623 Parameters 12544 3100H 00052 0034H UDP close request executed when R0623 is set on R0623 1 12544 MOV RW000 00052 MOV RW001 Module designation CMD number setup 00002 MOV RW002 Socket identifier setup RW000 RECV RW010 RST R0623 Turn R0623 off after request setup and completion ...

Page 115: ...ransmission data word count 1000 Transmission data storage registers D1000 and above UDP send request executed when R0622 is set on R0622 1 12544 MOV RW000 00050 MOV RW001 Module designation CMD number setup 00002 MOV RW002 Socket identifier setup 0341995909 DMOV RW004 RW003 03000 MOV RW005 Remote port IP address port number setup 01000 MOV RW006 Transmission data word count setup 00004 MOV RW007 ...

Page 116: ...ception data storage registers D2500 and above Reception timeout time 1800 seconds UDP receive request executed when R0621 is set on R0621 1 12544 MOV RW000 00051 MOV RW001 Module designation CMD number setup 00002 MOV RW002 Socket identifier setup 0341995909 DMOV RW004 RW003 03000 MOV RW005 Remote port IP address port number setup 01000 MOV RW006 Reception data word count setup 00004 MOV RW007 02...

Page 117: ... 12544 3100H 00053 0035H 341995909 14627185H Remote port IP address 133 113 98 20 Remote port object socket TCP port number 4000 Local port specified socket TCP port number 4000 Open request timeout time 1800 seconds TCP passive open request executed when R0630 is set on R0630 1 12544 MOV RW000 00053 MOV RW001 Module designation CMD number setup 00008 MOV RW002 00002 MOV RW003 Socket identifier op...

Page 118: ...t number 4000 Local port specified socket TCP port number 4000 Open request timeout time 1800 seconds TCP active open request executed when R0640 is set on R0640 1 12544 MOV RW000 00053 MOV RW001 Module designation CMD number setup 00002 MOV RW002 00001 MOV RW003 Socket identifier open type setup RW106 RW105 DMOV RW005 RW004 RW107 MOV RW006 Remote port IP address and port number setup RW107 MOV RW...

Page 119: ...program is executed by turning on the A contact on the R0633 Parameters 12544 3100H 00057 0039H TCP close request executed when R0633 is set on R0633 1 12544 MOV RW000 00057 MOV RW001 Module designation CMD number setup 00008 MOV RW002 Socket identifier setup RW000 SEND RW010 RST R0633 Turn R0633 off after request setup and completion ...

Page 120: ...ount 1000 Transmission data storage registers D1000 and above TCP send request executed when R0632 is set on R0632 1 12544 MOV RW000 00055 MOV RW001 Module designation CMD number setup 00008 MOV RW002 Socket identifier setup 01000 MOV RW003 Transmission data word count setup 00004 MOV RW004 00000 MOV RW005 Transmission data storage register type storage register number setup RW000 SEND RW010 RST R...

Page 121: ...conds TCP receive request executed when R0631 is set on R0631 1 12544 MOV RW000 00056 MOV RW001 Module designation CMD number setup 00008 MOV RW002 RW103 MOV RW003 Socket identifier reception data word count setup 00004 MOV RW004 04000 MOV RW005 18000 MOV RW006 Reception data storage register type register number timeout time setup 00004 MOV RW021 04001 MOV RW022 Data transfer source register type...

Page 122: ...063E RW021 XFER RW025 RW023 Reception data transfer D4001 to D1001 1 RW009 1 RW022 1 RW024 Increment address and pointer R063E RW009 D4000 Reception data size check R063E RW008 RW024 RST R063D 00000 MOV RW009 04001 MOV RW022 Processing for data less than the reception data size RW008 RW024 RST R063D 00000 MOV RW009 RST R0635 Processing for data greater than the reception data size ...

Page 123: ...grams that use the Ethernet Port The sample programs present basic examples of Ethernet Port usage and should be reviewed carefully before use in an actual system 1 Ethernet Port status information Station status T2N special registers Down information T2N interface buffer 2 Test functions from user programs Remote port verification request corresponds to the UNIX ping command Inter port loopback t...

Page 124: ...ad out the internal station status of Ethernet Port and copy the SW register the renewing cycle of 100 ms Special registers Name SW063 CH1 station status c Station status format F E D C B A 9 8 7 6 5 4 3 2 1 0 Bit F DOWN down 1 Down mode 0 Other than down mode Bit E INZ initialization 1 Initialization in progress 0 Initialization completed Bit D STBY standby 1 Standby mode 0 Other than standby mod...

Page 125: ...ode run mode standby mode look at the value of the register The mode of Ethernet Port The station status During initialize Power on Reset request 4000H Standby mode initialize processing normally complete 2000H Run mode Allows the message transmission 1020H Run mode Allows the socket interface 1010H Run mode Allows the message transmission and socket interface 1030H ...

Page 126: ... Semaphore acquisition error 0504 MBX receive error 0505 MBX send error 0506 TCP resend queue full 0507 Acquired buffer in use 0508 Error in acquiring initial buffer Important items This is a read only area Do not write to this area with the WRITE instruction Subsequent reads will not return correct down information Sample Down information readout R0000 1 04081 MOV RW010 00001 MOV RW011 H00FE READ...

Page 127: ...A 1 CMD 0014H CMD number A 2 A 3 D IP address c Status See figure 4 3 for details on bits C D E and F F E D C B A 9 8 7 6 5 4 3 2 1 0 B 0 0 0 0 TermSTS B 1 Detailed information Only valid when TermSTS 0BH d Important items This request is possible in run and standby modes The IP address of the local port must be set up The Ethernet Port returns a response to this request in run and standby modes T...

Page 128: ...ed by turning on the R0504 A point Parameters 12544 3100H 00020 0014H 341995909 14627185H 85H 71H 62H 14H 133 113 98 20 R0504 R0604 1 Remote port verification request R0604 2 12544 MOV RW000 00020 MOV RW001 Designates the module and sets the CMD number 341995909 DMOV RW003 RW002 Sets remote port IP address RW000 SEND RW010 RST R0504 Sets the request ...

Page 129: ...4 3 for details on bits C D E and F F E D C B A 9 8 7 6 5 4 3 2 1 0 B 0 0 0 0 TermSTS B 1 Detailed information Only valid when TermSTS 0BH d Important items This request cannot be executed unless message transmission is enabled with an operating mode control request In response to a request from a user program the T2N OS performs the processing using the Ethernet Port PC link protocol User program...

Page 130: ...00015 000FH R0092 1 12544 MOV W0903 00015 MOV W0904 Designates the module and sets the CMD number 00485 MOV W0905 Sets the loopback data length 00004 MOV W0906 00000 MOV W0907 Sets the send source register type and starting register number 00004 MOV W0908 00500 MOV W0909 Sets the loopback destination register type and starting register number 00100 MOV W0910 Sets the response time limit 10 seconds...

Page 131: ...e date July 20 1996 14 30 00 would be entered as A 3100H 12544 A 1 0018H 00024 A 2 0796H 01942 A 3 1404H 05124 A 4 0030H 00048 c Status See figure 4 3 for details on bits C D E and F F E D C B A 9 8 7 6 5 4 3 2 1 0 B 0 0 0 0 TermSTS B 1 Detailed information Only valid when TermSTS 0BH d Important items This request can be executed in run or standby mode The time set here is updated by the Ethernet...

Page 132: ... on the R0508 A point Parameters 12544 3100H 00024 0018H 01942 0796H 05124 1404H 00048 0030H R0508 R0608 1 Time set request R0608 2 12544 MOV RW000 00024 MOV RW001 Designates the module and sets the CMD number 01942 MOV RW002 05124 MOV RW003 00048 MOV RW004 Sets the year month day hour minute and seconds RW000 SEND RW010 RST R0508 Sets the request ...

Page 133: ...f the register used to store the read out RAS information See figure 5 1 for the type codes that can be specified here 2 RAS information storage register start address Specifies the start address for the registers specified by the local port register type code 3 RAS request type specifies the type of RAS information read out 1 RAS counter LAN controller line information See table 7 2 2 MIB informa...

Page 134: ... RAS information plus one word must be allocated A boundary error TermSTS 0AH occurs if it is not possible to allocate an area that is the size of the read out RAS information plus one word for the RAS information storage area A parameter error TermSTS 03H occurs on any of the following transfer parameter settings If the RAS request type Kind is out of range a value other than 1 to 5 If the start ...

Page 135: ...t type Event trace information reads out 30 items starting with the most recent data R0505 R0605 1 RAS information readout R0605 2 12544 MOV RW000 00021 MOV RW001 Designates the module and sets the CMD number 00004 MOV RW002 00000 MOV RW003 Sets the RAS storage register type and start number 00004 MOV RW004 Sets the RAS request type 00000 MOV RW005 00030 MOV RW006 Sets the information readout star...

Page 136: ...tion Reads out 13 words of data using RAS information readout Table 7 3 MIB_IF Symbol Description MIB_IF 0 It is possible to use the interface number in this system MIB_IF 1 Reserved MIB_IF 2 Lower level layer of IP with interface type of protocol MIB_IF 3 Progress of time with changing states by the interface MIB_IF 4 Total number of octets bytes received by the interface MIB_IF 5 Number of non b...

Page 137: ...MIB_IP 13 Number of IP datagrams for which reassembly failed MIB_IP 14 Number of IP datagrams that were fragmented successfully MIB_IP 15 Number of IP datagrams for which fragmentation failed an which were discarded MIB_IP 16 Number of created IP fragments IP datagram The IP header and IP data sections of a packet See figure 7 1 IP fragment Items that are divided into multiple IP datagrams when se...

Page 138: ... from upstream UDP datagrams The UDP header and UDP data block in an IP datagram See figure 7 1 6 Event trace information Record size 16 bytes Number of records 160 Operation on overflow Old information is updated This means that it is always possible to verify the 160 most recent event trace records Format Since this format is for Ethernet Port internal data it is binary codes However the time is...

Page 139: ...change Mode change Control request 0001 Mode prior to change Mode after change station status 0007H Task ID Memory pool number Error code Instruction storage buffer allocation error 0008H Task ID Station status Transmission prohibit 0009H Receive response code T2N driver reception or response code error 0100H CMD number 0011 Error code Station status Write port contents T2N Ethernet Port interface...

Page 140: ... header 20 bytes UDP data field up to 1472 bytes TCP data field up to 1460 bytes FCS Frame Check Sequence 4 bytes 32 bit CRC code for the sections of the packet other than the preamble the SFD and the FCS Packet error detection Figure 7 1 Packet Format IP Datagram Packets traveling on the transmission path 72 to 1526 bytes IP data field up to 1480 bytes IP datagram 46 to 1500 bytes Data fields in ...

Page 141: ...e that the Ethernet Port operating mode can be determined by the combination of the ERUN and ET R LED display states as listed in table 8 2 User programs should read out and verify the down information error codes listed in table 8 2 using the READ instruction issued for the down information in the T2N interface buffer See section 7 2 Down Information Ethernet Port that fail go to the down state s...

Page 142: ...ernet Port is down ET R Ethernet transmission Possible causes of the Ethernet Port going down Down information error code receive blinking Watchdog timeout occurred 0010 Memory bus stall occurred 0020 Trap occurred 0030 Jabbering timeout occurred 0040 Semaphore acquisition error 0500 0501 Semaphore acquisition error 0502 0503 MBX reception error 0504 MBX transmission error 0505 No empty TCP resend...

Page 143: ... accessing the Ethernet Port Lights after Ethernet Port initialization completes when power is first applied Access starts If this LED does not light after power is turned on Verify that the T2N is correctly connected to the base unit If this LED does not light at above then the T2N itself is defective Replace the T2N Supplement We recommend keeping spares on hand to minimize the time required to ...

Page 144: ...ure Table 8 4 TermSTS Part 1 TermSTS Status Meaning 00H Normal complete 01H Register specification error Occurs if a register other than XW YW W LW RW D F T C or SW is specified as the data storage register in one of the following requests Requests RAS information readout remote port loopback UDP send receive TCP send receive register read write In a register read or write request the request spec...

Page 145: ...open UDP send UDP close TCP send TCP close 07H No send channel CH Occurs if the corresponding Ethernet Port is not installed 08H Port address out of range Occurs if the local port IP address was specified for the remote destination IP address Requests Remote port loopback register read write 09H Incorrect transmission word count Occurs if either 0 words or 486 or more words were specified for eith...

Page 146: ...issued for an already open socket Unopened 0081H Occurs if send receive or close request is issued for an unopened socket Incorrect socket identifier 0082H Occurs if the socket identifier is out of range 1 to 8 Incorrect control request specification 0083H Occurs if a request that was prohibited by an operating mode control request is issued Occurs if a run request is issued in run mode Occurs if ...

Page 147: ...n Ethernet Port 2 Special registers Special registers Name SW063 CH1 station status 3 Station status format F E D C B A 9 8 7 6 5 4 3 2 1 0 Bit F DOWN down 1 Down mode 0 Other than down mode Bit E INZ initialization 1 Initialization in progress 0 Initialization completed Bit D STBY standby 1 Standby mode 0 Other than standby mode Bit C RUN run 1 Run mode 0 Other than run mode Bit 5 MTEN Message tr...

Page 148: ... no Bit Condition under which the bit is set to 1 Condition under which the bit is reset to 0 F TCP TCP used by the socket The socket closed in response to a close request E UDP UDP used by the socket The socket closed in response to a close request D AOPEN TCP socket in active open state The socket closed in response to a close request C POPEN TCP socket in passive open state or UDP socket in ope...

Page 149: ... that information and the PU235N 245N to Toshiba 3 If a SEND or RECV instruction fails complete Recovery procedure 1 Verify that the inputs of function block are held in the on state until the instruction completes 2 Determine whether the user program is writing to the status register while the instruction is executing START Apply the rated line voltage to the primary side of the power supply modu...

Page 150: ... the Ethernet Port from standby mode to run mode a Parameter setup request START Execute a parameter setup request that sets up the IP address and the message transmission UDP port number No Yes Is the parameter setup request executed Verify the status using the procedure described in the item 3 If a SEND or RECV instruction fails complete on page 148 No Does the SEND instruction complete Yes To t...

Page 151: ...mode control request executed Yes Verify the status using the procedure described in the item 3 If a SEND or RECV instruction fails complete on page 148 No Does the SEND instruction complete Yes The Ethernet Port internal MAC address has been corrupted Replace the PU235N 245N No Have the parameters not been set up yet Yes Check the status and resolve the error END ...

Page 152: ... Did the computer link protocol return without errors Yes END Verify the slave Ethernet Port message transmission UDP port number Supplement Remember that there are separate send and receive ports that each have their own message transmission UDP port number No Is the transmission destination message transmission UDP port number correct Yes 1 Recheck the slave port IP address and message transmiss...

Page 153: ...hort packet CRC error It is possible that there is an abnormality on the network itself Check the network verification items No Is the error counter read out from the RAS information constant i e not being incremented Use RAS information readout to determine this Yes END 1 Check the main port side IP address 2 Verify that there is no router on the network 3 Check the network verification items No ...

Page 154: ...age transmission is enabled No Yes Verify the slave Ethernet Port message transmission UDP port number Supplement Remember that there are separate send and receive ports that each have their own message transmission UDP port number No Is the slave port message transmission UDP port correct Yes 1 Recheck the slave port IP address and message transmission UDP port numbers 2 Verify that there is no r...

Page 155: ... Verify that there is no router on the network 3 Check the network verification items No Does a response come back if a ping is issued to the main Ethernet Port Yes Is the error counter read out from the RAS information constant i e not being incremented Use RAS information readout to determine this RAS error counters Alignment error Short packet CRC error It is possible that there is an abnormali...

Page 156: ...escribed in the item 3 If a SEND or RECV instruction fails complete on page 148 No Yes Does the SEND instruction complete Set the Ethernet Port to run socket transmission enabled using an operating mode control request No Is the station status such that run socket transmission is enabled Yes Check the status and resolve the error END ...

Page 157: ...emote port IP address and message transmission UDP port numbers 2 Verify that there is no router on the network 3 Check the network verification items No Does a response come back if a ping is issued to the remote Ethernet Port Yes Open UDP ports on the local port and remote ports No Are the UDP ports on the local and remote ports opened Yes Resolve the problem by referring to the status No Does t...

Page 158: ...Open UDP ports on the local port No Is the local port open Yes No Is the remote port transmitting Yes Verify the remote port IP address and UDP port number No Are the remote port IP address and UDP port number correct Yes 1 Recheck the remote port IP address and message transmission UDP port numbers 2 Verify that there is no router on the network 3 Check the network verification items No Does a re...

Page 159: ...nstruction time out TermSTS 0BH Details 0020H Yes No Is the station status such that run socket transmission is enabled Yes No Is the program attempting to issue an active open to a socket in the passive open state Yes Verify the remote port IP address and TCP port number No Are the remote port IP address and TCP port number correct Yes 1 Recheck the remote port IP address and message transmission...

Page 160: ...ND or RECV instruction fails complete on page 148 No Does the SEND instruction complete Yes Set the Ethernet Port to run socket transmission enabled using an operating mode control request Is the station status such that run socket transmission is enabled Yes Resolve the problem by referring to the status END No ...

Page 161: ...Does the SEND instruction complete Yes Set the Ethernet Port to run socket transmission enabled using an operating mode control request No Is the station status such that run socket transmission is enabled Yes Open UDP ports on the local and remote ports No 1 0 Was a TCP connection established Yes Close the socket Is the socket status NOACK bit Requests cannot be accepted due to network congestion...

Page 162: ...s such that run socket transmission is enabled Yes Establish a connection with the remote port No Was a connection established Yes No Is the remote port transmitting Yes 1 Recheck the remote port IP address and message transmission TCP port numbers 2 Verify that there is no router on the network 3 Check the network verification items No Does a response come back if a ping is issued to the remote p...

Page 163: ...es for missing termination resistors and damage 2 Is the collision frequently happen Can you confirm the table indicating the collision 2 Since network loading is heavy Transmission efficiency can be degraded TCP and There is an increased possibility of packet loss UDP Therefore the circuit usage conditions should be reviewed 3 Are the error counters read out from the RAS information increasing as...

Page 164: ...nd cautionary advice presented in section 4 1 Installation Environment CAUTION 1 Only use this equipment in the environment described in the T2N User s Manual Hardware Use in any other environment can cause electrical shocks fires failures and malfunctions 2 Mount this equipment according to the mounting method specified in the T2N User s Manual Hardware Mounting in any direction other than the sp...

Page 165: ...vironment and required work Lay out cables in a manner appropriate for the environment The steps listed in the following table are generally required Table 9 1 Wiring Environment and Work Operations Environment in which cable is laid Work operations Major categories Minor categories Locations where cables will not be damaged Installation without protective pipes Installation with protective pipes ...

Page 166: ...and lines carrying high currents in the same pipe 2 When bending pipes do not bend pipes to an angle sharper than 90 degrees 3 When bending pipes the radius of curvature must be at least 6 times the internal diameter of the pipe and must be no smaller than the minimum radius of curvature for bending of the enclosed cables 4 Ground metal pipes d Separation from other wiring As a general principle c...

Page 167: ...o 125 V up to 10 A Up to 250 V up to 50 A Up to 400 V up to 100 A Up to 500 V up to 200 A 10 10 50 100 10 50 100 200 50 150 200 250 100 200 250 250 200 250 250 250 250 250 250 250 Levels exceeding the above At least 500 When using cable ducts install steel separators to separate power cables from coaxial cables as shown in the figure below Figure 9 1 Duct Internal Layout Example When laying cables...

Page 168: ...ng radius 3 Notes on laying and wiring twisted pair cable 10BASE T a Only use this twisted pair cable in boards Consult with a specialist contractor if twisted pair cable must be routed out of boards 4 Notes on laying and wiring 10BASE2 and 10BASE5 coaxial cable a Only use this coaxial cable indoors Consult with a specialist contractor if coaxial cable must be routed outdoors b Connect terminators...

Page 169: ...tion a Attach MAUs at the 2 5 meter separated marks on the coaxial cable b Since the procedure for attaching MAUs to coaxial cable differs between manufacturer refer to the MAU user s manual c Since the coaxial cable is grounded the MAU main unit should be mounted insulated from ground d Do not install MAUs in the vicinity of equipment that generates electrical noise If a MAU must be installed in ...

Page 170: ...seness or play The 10BASE5 connector slide latches must be in their locked positions First press the cable firmly into the connector and then slide the slide latch to the locked position 10BASE2 Are the coaxial cables firmly locked in place There must be no looseness or play The T connector locks must be engaged First press the T connector firmly into position and then engage the T connector lock ...

Page 171: ...ce representative 4 Do not disassemble or modify the module hardware and do not modify the module software Breakdowns or malfunctions may lead to fire electrical shock or injury 5 When measuring the voltages at the module terminal block during inspections use adequate caution There is a danger of electrical shock during this operation 6 Only exchange modules with the power completely off Exchangin...

Page 172: ...ort on the network SEND 000FH 2 Section 7 4 UDP open request Opens a UDP socket SEND 0031H 3 Section 6 4 1 UDP send request Transmits data from an open UDP socket SEND 0032H 3 Section 6 4 2 UDP receive request Reads out data received by an open UDP socket RECV 0033H 3 Section 6 4 3 UDP close request Closes terminates an open UDP socket SEND 0034H 3 Section 6 4 4 TCP open request Opens a TCP socket...

Page 173: ... send receive TCP send receive register read write In a register read or write request the request specified a read or write from a T register to a register other than a T register This also applies to C registers 02H Response timeout Occurs if a response is not received within the specified time for a remote port loopback or register read write request 03H Parameter error Occurs if a value other ...

Page 174: ...er 0 words or 486 or more words were specified for either a register read write or a remote port loopback request Occurs if either 0 words or 1001 or more words were specified for a UDC TCP send receive request 0AH Boundary error Occurs if the specified area start address register range does not exist in the T2N data storage registers Requests RAS information readout remote port loopback UDP send ...

Page 175: ...d for an already open socket Unopened 0081H Occurs if send receive or close request is issued for an unopened socket Incorrect socket identifier 0082H Occurs if the socket identifier is out of range 1 to 8 Incorrect control request specification 0083H Occurs if a request that was prohibited by an operating mode control request is issued Occurs if a run request is issued in run mode Occurs if a sta...

Page 176: ...er of words that can be set for the SEND and RECV instructions is stipulated to be either The number of words that the local port transmitted with the SEND instruction or The number of words that the local T2N transmitted in response to a data request issued with the RECV instruction from a remote T2N When some number of words are transmitted by the local T2N with the SEND instruction and some oth...

Page 177: ...here are PU245N unit installed d If less than 128 words are used with the S20LP PC link protocol transmission the number of words that can be specified during PC link transmission on the Ethernet Port can be increased over the values listed in table a 6 If the number of words for S20LP PC link protocol transmission on the PU245N decreased on one word the number of words for PC link protocol transm...

Page 178: ...Refer to the T2N User s Manual Hardware for the processing times for the instructions c This table assumes that for PU245N 128 words is specified for S20LP PC link protocol transmission SEND instruction on local port or RECV instruction from remote ports However if S20LP PC link protocol transmission is not used use the PU235N row in the above table even if there are PU245N unit installed d If les...

Page 179: ...CV instruction from remote ports However if S20LP PC link protocol transmission is not used use the PU235N row in the above table even if there are PU245N unit installed d The number of words is the maximum number words that can be specified during PC link transmission and socket transmission The maximum number of words that can be specified during PC link transmission on Ethernet Port is 485 word...

Reviews: