Home

Toshiba T2N Network Card User Manual

image

Contents

1. 6F3B0362 Preamble 7 bytes Signal used to synchronize reception SFD Start Frame Delimiter 1 byte Remote port address 6 bytes Local port address 6 bytes Ethernet type 2 bytes 0800H IP O806H ARP IP header 20 bytes UDP header TCP header 8 bytes 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 139 TOSHIBA 6F3B0362 8 Error Handling This chapter describes the error analysis and recovery procedures for errors that occur while using the Ethernet Port Also refer to the T2N user s manual when recovering from Ethernet Port related errors 8 1 LED Display The Ethernet Port indicates its Ethernet Port status in the ERUN ET R and EACC LEDs Table 8 1 lists the state indicated by the ERUN LED Note 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 should be replaced Table 8 1 States Indic
2. Self check terminates in an error state Run request Unrecoverable error Unrecoverable error Figure 4 6 Ethernet Port Mode Transitions BE o ss TOSHIBA 6F3B0362 This section describes the operating mode control request instruction format Operating mode control request using the SEND instruction a Function This is a request from a user program that controls the Ethernet Port operating mode b Transfer parameters A 3100H Module designation A 1 CMD 0013H CMD number A 2 Specified information Specified information E D C BA STBY MTEN RUN STEN Bit D STBY standby request Switches the Ethernet Port from run mode to standby mode Bit C 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 message transmission and socket interface transmission 1010H Allows socket interface transmission only 1020H Allows message transmission only c Status See figure 4 3 for details on bits C D E and F E D C B A 9 6 5 4 3 2 1 0 B EG 0 ee B 1 Detailed information Only valid when TermSTS OBH 48
3. Socket identifier setup RWO00 SEND RWO10 RST R0633 Turn R0633 off after request setup and completion ee GE TOSHIBA 6F3B0362 d TCP send request This program issues a TCP send request for socket number 8 on the Ethernet Port This ladder program is executed by turning on the A contact on the R0632 Parameters 12544 3100H 00055 0037H Transmission data word count 1000 Transmission data storage registers D1000 and above TCP send request executed when R0632 is set on R0632 12544 MOV RWO00 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 R0632 Turn R0632 off after request setup and completion gre TOSHIBA e TCP receive request 6F3B0362 This program issues a TCP receive request for socket number 8 on the Ethernet Port This ladder program is executed by turning on the A contact on the R0631 Parameters 12544 3100H 00056 0038H Reception data word count RW103 Reception data storage registers D4000 and above Reception data transfer destination registers D1001 and above Reception timeout time 1800 seconds TCP receive request executed when R0631 is set
4. 00004 MOV RW093 01000 MOV RW094 Transmission source register type start number 00004 MOV RW095 02000 MOV RW096 Transfer destination register type start number 00004 MOV RW097 03000 MOV RW098 Storage register type start number 0341995909 DMOV WO0991eW0990 01025 MOV W0992 Remote destination IP address message transmission UDP port number Data preparation R0090 ROO09F 4 00001 MOV WO901 00900 MOV W0902 00000 MOV WO918 ROO91 ef fe W0946 MOV WO900 RWO93 MOV WO916 RWO94 MOV WO917 R0098 W0901 ER W0901 gt W0916 RW092 WO918 SET R0092 RST R0091 TOSHIBA 6F3B0362 Register write R0092 12544 MOV W0903 00033 MOV W0904 Designates the module and sets the CMD number RW092 MOV WO905 Sets the transfer register data length RWO93 W0906 RWO94 MOV WO907 Se the transmission source register type start number RWO95 W0908 RWO96 MOV WO909 Se he transfer destination register type start number 00100 WO910 Set he response time limit 10 seconds WO0991eW0990 DMOV WO0912eWw0911 WO992 MOV WO913 Remote destination IP address message transmission UDP port number W0903 SEND W0914 SET R0093 RST R0092 Sets the request and starts post completion readout Register readout R0093
5. e T2N User s Manual Basic Hardware Describes the configuration specifications and Function installation and wiring techniques UM TS02 E001 maintenance and preventive maintenance procedures for the T2N base system hardware and describes the function provided by the T2N CPU and the use of that CPU and presents information required for creating user programs for the T2N e T series Instruction Set Describes the detailed specifications of the UM TS03 E004 instruction words for the ladder and SFC program languages which are two of the programming languages supported on the T2N e T series Computer Link Operation Manual Describes the specifications and use of UM TS03x E008 computer link protocol transmission which is built into the T2N CPU Registered trademarks 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 11 TOSHIBA 6F3B0362 Contents Safy Pee REE tae Re ea eee 2 Usage Recommendations cc cece ccc cc ec ee sonsir nir eee ee sees eeeeeeeeeeaeaee een ene ees 8 Before Reading This Document cccceccee cece ee eee te
6. Interval between remote port transmissions gt Number of remote ports x 50 ms f Broadcast reception It is possible to broadcast to all ports on the network using UDP sockets Receive side Specify the transmission source IP address to be 0 0 0 0 Specify the UDP port number for the broadcast transmitting socket as the transmission source UDP port number 92 TOSHIBA 6F3B0362 g UDP reception processing example Socket status monitoring type Ladder program flowchart Error result UDP reception processing start The processing in this section can be performed at this stage or at the point the Socket status read verify l instruction terminates abnormally Are bits C and E both 1 Opened state Yes The specified UDP socket is in the closed state Open processing is required Is bit A set to 1 Reception text present Yes The specified UDP socket has not received data Execute a UDP receive request CMD 0033H Hold the input of function block in the on state until the RECV instruction completes Instruction completion Verify the status An error occurred in reception processing The specified socket could not receive the Normal complete data Handle the error according to the completion and socket status Terminate UDP reception processing 93 TOSHIBA 6F3B0362 h UDP reception processing example Receive request iss
7. Mount this equipment according to the mounting method specified in the T2N User s Manual Hardware Mounting in any direction other than the specified direction or defective or inadequate mounting can result in the equipment falling fires failures and malfunctions 163 TOSHIBA 9 2 Network Wiring 6F3B0362 See section 3 2 Network Wiring Equipment for details on the equipment that makes up the network This section presents an outline of the wiring laid inside the control panel and outside the control panel This section also presents individual notes on the twisted pair cables used the coaxial cables the AUI cables and the MAUs Basic points in laying out a network When laying network cable take adequate safety measures and perform all operations in accordance with the relevant standards See the ISO IEC 8802 3 standard for details on laying networks We strongly recommend hiring a qualified contractor who has specialized knowledge about safety precautions and standards Avoid installing 10BASE5 10BASE2 or 10BASE T networks in environments that have high noise levels If this is unavoidable adopt the noise prevention measure described below Overview of wiring outside the control panel a Layout environment 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
8. Status Transmission error TermSTS OBH Detailed information Port mode error 0040H Down mode Status Module error initialization in progress TermSTS 06H e Sample program This sample ladder program issues a reset request to the channel 1 Ethernet Port This program is executed by turning on the R0501 A contact Parameters 12544 3100H 00017 0011H Reset request 12544 MOV RWO00 00017 MOV RW001 Designates the module and sets the CMD number RWO00 SEND RWO10 RST R0501 Sets the request 40 TOSHIBA 6F3B0362 4 4 Parameter Setup Request This section describes the procedure for Ethernet Port parameter setup in the Ethernet Port from a T2N user program The Ethernet Port parameters consist of the following 1 Local port IP address 2 UDP port number for computer link and PC link transmission Here we first describe the IP address subnet mask and port number which are the parameters required for TCP IP and UDP IP transmission 1 IP address The IP address is the address that specifies a particular port when transmitted data using the IP internet protocol Therefore IP addresses must be set and managed so that they are not duplicated The following presents an overview of IP addresses a IP address format An address consists of a network address and a host address The network address is an address that specifies a particular network and the host address is an addr
9. e If the transmission data size for a single operation is larger than the reception data size the section of the transmitted data that exceeds the specified reception size is discarded resulting in the following error response Status Transmission error TermSTS OBH Detailed information Insufficient data size 00C1H If this error is occurred a reception data storage register of the T2N enters the data following below The data of slash bar is not received to T2N and discarded The size of from Ethernet Port to T2N reception data The size of reception Specify the T2N The reception data itself data of Ethernet Port e The Ethernet Port uses a priority ordering in processing sockets 1 through 8 Therefore systems constructed so that socket I is activated frequently 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 least 50 ms times the number of sockets used between each request Interval between requests to the same socket gt Number of sockets used x 50 ms Similarly the above intervals averaging 50 ms should be left between transmissions from remote ports to the local port
10. ee aen TOSHIBA 6F3B0362 7 RAS Information This chapter describes the following RAS functions provided by the Ethernet Port Chapter 7 presents information related to using the functions provided by the Ethernet Port from a T2N including the instruction request format important items that require attention and sample 1 programs Make a point of understanding the content of chapter 4 thoroughly before writing programs 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 Ethernet Port status information e Station status T2N special registers e Down information T2N interface buffer Test functions from user programs e Remote port verification request corresponds to the UNIX ping command e Inter port loopback test between T2N and T2N T3H units Time setting function Information provided by RAS information readout e LAN controller network circuit information e Protocol state e State of the T2N Ethernet Port interface e Event trace 122 TOSHIBA 6F3B0362 7 1 T2N Special Relays and Registers The Ethernet Port status information is reflected in the T2N special relays and special registers a Special relays the renewing cycle of 100 ms Special relay Function S000B Ethernet P ort error 1 The installed Ethernet Port unit is down warning The T2N continues to operate 0 R
11. 12544 MOV W0920 00033 MOV WO921 Designates the module and sets the CMD number RW092 MOV W0922 Se the transfer register data length RWO97 Ww0923 RWO98 MOV WO924 Se he storage register type start number RWO95 W0925 RWO96 MOV WO926 Se the transfer destination register type start number 00100 W0927 Set he response time limit 10 seconds WO991eWw0990 DMOV WO0929eW0928 WO992 MOV W0930 Remote destination IP address message transmission UDP port number W0920 RECV WO931 SET R0094 RST R0093 Sets the request and starts post completion comparison 66 TOSHIBA 6F3B0362 Comparison check RO094 00001 MOV WO940 00001 MOV W0943 00981 MOV W0944 RWO94 RW093 DMOV WO948eWw0947 RW098 RW097 DMOV W0950eW0949 R0095 W0947 XFER W0940 gt W0941 W0949 XFER W0940 gt W0943 R0096 WO980 WO981 1 RW190 W0980 lt gt WO981 1 RW191 SET R0099 RST R0094 1 WO945 1 W0948 1 WO950 RWO92 WO945 00000 MOV WO945 1 W0946 R0097 R0099 RWO090 gt W0946 SET R0091 RWO90 WO0946 00000 MOV WO946 TOSHIBA 6F3B0362 6 Socket Interface Communication 1 Chapter 6 presents information related to using the functions provided by the Ethernet Port
12. Length Standard outside 10 3 mm diameter with terminators at both ends diameter Manufacturer Showa Electric Wire amp Cable Co Ltd JENS Catalog no EP L 6213 Manufacturer Showa Electric Wire amp Cable Co Ltd gt Jennns Catalog no EE 6213 Manufacturer Showa Electric Wire amp Cable Co Ltd idapo Catalog no EAD 6213 Manufacturer Showa Electric Wire amp Cable Co Ltd e oman eamp Catalog no EEL 6213 Manufacturer Showa Electric Wire amp Cable Co Ltd AVEAI Catalog no AUI15 CM O Length Standard outside 6 5 mm diameter thin wire molded connectors diameter Length 1 2 3 5 10 and 15 meters Manufacturer Showa Electric Wire amp Cable Co Ltd Catalog no AUI50 OM O Length Standard outside 10 5 mm diameter thick wire molded connectors diameter Length 20 30 40 and 50 meters Manufacturer Showa Electric Wire amp Cable Co Ltd oD Catalogno ETR 6071 02 Manufacturer Showa Electric Wire amp Cable Co Ltd my eS TOSHIBA 3 10BASE2 Coaxial cable BNC plugs T connectors Adapters Terminators 6F3B0362 Catalog no RG 58A U Standard outside 5 0 mm diameter with BNC plugs at both ends diameter Manufacturer Showa Electric Wire amp Cable Co Ltd Catalog no EPL 1067 Manufacturer Showa Electric Wire amp Cable Co Ltd Catalog no ETS 8191 Manufacturer Showa Electric Wire amp Cable Co Ltd Catalog no EAD 8191 Manufacturer Showa Electric Wire a
13. Number of IP datagrams discarded due to incorrect delivery Number of IP datagrams sent out Number of IP datagrams sent to an undefined protocol Number of IP datagrams transferred to upstream Number of IP datagrams transferred from upstream Number of IP datagrams discarded due to not exist route The maximum number of seconds that maintained reception fragment and waiting reassembly Number of received IP fragments that required reassembly Number of IP datagrams that were reassembled successfully Number of IP datagrams for which reassembly failed Number of IP datagrams that were fragmented successfully Number of IP datagrams for which fragmentation failed an which were discarded Number of created IP fragments The IP header and IP data sections of a packet See figure 7 1 Items that are divided into multiple IP datagrams when sending over 1500 bytes of data Restoring data to its original form from fragmented IP datagrams 4 MIB information MIB_TCP TCP protocol information Symbol MIB_TCP 0 MIB_TCP 1 MIB_TCP 2 MIB_TCP 3 MIB_TCP 4 MIB_TCP 5 MIB_TCP 6 MIB_TCP 7 MIB_TCP 8 MIB_TCP 9 Reads out 10 words of data using RAS information readout Table 7 5 MIB TCP Description The maximum of resent timeout per ms Number of active open connections Number of passive open connections Number of times the connection open operation failed Number of currently open connections Numbe
14. Return status Ke int ircvsiz 7 Reception data length int isndsiz 7 Data length int icunt Data setup index int idat Temporary ep char csnd 1000 Data send buffer char crev 1000 Data receive buffer fd set ibits SELECT bit mask struct timeval timeout SELECT timer value struct sockaddr in Snd Rcv iret 1 memset amp Snd 0x00 sizeof Snd memset amp Rcv 0x00 sizeof Rev memset csnd 0x00 sizeof csnd Clear the send data buffer Ko memset crcv 0x00 sizeof crev Clear the receive data buffer of Set up the register write send data po sprintf amp csnd 0 AO1DW Set up the register write command as Set the starting register number sprintf amp csnd strlen csnd s REG TYPE sprintf amp csnd strlen csnd J 04s REG ADR sprintf amp csnd strlen csnd I idat DATASIZ Set the data count 54S TOSHIBA 6F3B0362 sprintf amp csnd strlen csnd 02d idat sprintf amp csnd strlen csnd I icunt 07 Comparison data storage index for j 0 k 0 k lt DATASIZ k Set register write data sprintf amp csnd strlen csnd J 04X k eigde ay sprintf amp csnd strlen csnd I ae Nearer icunt icunt 4 sprintf amp csnd strlen csnd 1 r is
15. TOSHIBA 6F3B0362 Table 8 5 TermSTS Part 2 03H Parameter error Occurs if a value other than 3 is specified for the module ID Occurs if a value other than 1 is specified for the channel number Occurs if a command number other than one of the following is specified for a SEND instruction 000FH 0011H 0014H 0018H 0021H 0031H 0032H 0034H 0035H 0037H 0039H Occurs if a command number other than one of the following is specified for a RECV instruction 0015H 0021H 0033H 0038H Occurs if a value other than 1 to 8 is specified for the socket identifier See section 6 4 Using the Ethernet P ort Socket Interface Occurs if an incorrect parameter Is specified in a RAS information readout request See section 7 6 RAS Information Readout Occurs if an attempt to write is made when the remote registers were write protected Occurs if an attempt to read is made when the local registers were write protected 04H Memory write protect 05H Reserved 06H Occurs if the Ethernet Portis down Occurs if the Ethernet Port is initializing Occurs ifa T2N internal timer times out timeout Requests UDP open UDP send UDP close TCP send TCP close 07H Occurs if the corresponding Ethernet Portis 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
16. 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 I Segments with the reset bit RST set to 1 reset segments are not supported by the Ethernet Port If a reset segment is received from the remote port the NOACK bit in the socket status see section 6 3 will be set to 1 about 32 seconds later Such sockets should be closed Reset segment A transmitted segment used to forcibly close a connection from one of the ports Connections are forcibly closed in this manner if an error that cannot be recovered from by normal means such as retransmission has occurred or if a port has recovered after having gone down m In the Ethernet Port TCP socket interface when reception data in the Ethernet Port is read out by a receive request from the T2N the Ethernet Port sends an ACK acknowledge response to the port that sent the data Since an ACK will not be sent to the sending port if the received data remains in the Ethernet Port if the T2N does not read out that received data the sending port will resend the data If this state continues for a predetermined period the sending port may will decide that the TCP connection is abnormal and close the connection To prevent this from occurring the T2N software should monitor the RCV receive d
17. a local port send operation in a state where a TCP connection was established and the TCP resend function resulted in a timeout because the remote port was down etc If the wait time exceeds the set value during WhenaTCP active open request is reissued TCP active open request This state does not occur for TCP passive open requests O DUIm mnm w gt A socket status in which neither AOPEN nor POPEN is set to indicates that the socket is in the closed state SHAY Ss TOSHIBA 6F3B0362 8 5 Troubleshooting 1 If the Ethernet Port fails to come up normally i e does not reach standby state If the Ethernet Port is functional then the Ethernet Port can be initialized and brought to the standby state with the ERUN LED lit by applying power or by issuing a reset request Apply the rated line voltage to the primary side of the power supply module Is power supplied to the T2N power supply module Yes Is the T2N correctly mounted in the Bees Insert the PU235N 245N into its slot correctly Yes Replace the PU235N 245N Read out the down information and send both that information and the PU235N 245N to Toshiba 2 Ifthe Ethernet Port fails during operation Recovery Replace the PU235N 245N procedure Before replacing the PU235N 245N read out the down information and then send both that information and the PU235N 245N to Toshiba 3 Ifa SEND or RECV instruction fa
18. ee TOSHIBA 6F3B0362 2 When using socket transmission TCP or UDP with the Ethernet Port Table A 7 Number of Words that can be Transmitted Using TCP UDP Socket Transmission with the Ethernet Port When the PC link protocol is not used Module classification Processing time for function instructions Maximum number of words that can be specified in socket transmission PU235N 1000 words maximum Tors nad TIZ vors nasa 7 vor namn 22 vors maxima NIT nn nil n 3 wn 3 PUZASN STE words maximum TES words maximum 548 words maximum m aximu 333 words maximum aximum 118 words maximum Janja gt 3 a sls uw 3 wn 3 Conditions for the above table a For the T2N configuration this table assumes the configuration of figure A 4 in which T2N PU235N 245N is mounted in the main base unit b 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 less than 128 words are used with the S20LP PC link protocol transmission the number of words that can be specified during socket transmission on t
19. for a close request from a remote port a open request will result in an error being returned Status Transmission error TermSTS OBH Detailed information Opened 0080H or LAN controller driver error 0090H 0092H un He TOSHIBA 6F3B0362 e TCP close processing example Ladder program flowchart Error result TCP close processing start Socket status read verify Are bits B and F both 1 Is a connection established Yes Execute a TCP close request CMD 0039H Hold the input of function block in the on state until the SEND instruction completes This is not necessary in processing for which the RCLOSE and NOACK bits have become 1 The specified UDP socket is already in the closed state Instruction completion Verify the status An error occurred in the close processing and the specified socket could not be Normal complete closed Handle the error according to the completion and socket status Terminate TCP close processing 111 TOSHIBA 6F3B0362 6 5 Sample Programs This section presents sample programs using UDP and TCP sockets UDP sockets This is a sample program that issues the requests used with UDP sockets It assumes that the parameter set up and operating mode control requests run mode socket interface transmission enable have already completed a UDP open request This program issues a UDP open request for socket number 2 on th
20. or E S PU245N 4 1 Ethernet Port Setup Flowchart Software e Restrictions on subnet masks Usage Recommendations 1 The Ethernet Port does not allow the user to set the subnet mask The Ethernet Port that the network address number is 1 can use the subnet mask Therefore the Ethernet P ort cannot be used in systems that operate a subnetwork 4 4 Parameter Setup Request TOSHIBA 6F3B0362 Usage Recommendations continued e Computer link protocol transmission Usage Recommendations Since UDP IP does not provide control functions to guaranteed communication reliability higher level protocols such as retry are required No processing is performed if a computer link protocol and a PC link 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 e 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 are limitations on the number of words that can be specified Appendix 4 Limitations on the T2N SEND and RECV Instructions TOSHIBA 6F3B0362 Before Reading This Document Thank you for purchasing a Toshiba PROSEC T2N multi purpose programmable controller This manual describes the T2N Ethernet Port specific
21. remove power from the power supply and replace the damaged cables Separate the cables from the power lines Shield the cables rove the environment so all aspects are within the ranges stipulated in the specifications TOSHIBA 6F3B0362 Always turn off the power before attaching or removing modules the terminal block or cables Electrical shock malfunctions and breakdowns are possible if these operations are performed with the power on To keep the system operating normally at all times and to prevent trouble in advance perform daily inspections periodic inspections and cleaning 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 if service is performed by anyone other than an authorized Toshiba service representative 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 When measuring the voltages at the module terminal block during inspections use adequate caution There is a danger of electrical shock during this operation Only exchange modules with the power completely off Exchanging modules with the power on can lead to malfunctions breakdowns and electri
22. OFF1H down information area OFF1H is the down information area for the Ethernet Port RWOI1 Specifies the number of words 00001 to be read out D1000 Specifies the register in which to store the read out down information In this case the down information that is read out is stored in D1000 The down information is stored in D1000 by turning R0000 on 125 6F3B0362 TOSHIBA 6F3B0362 7 3 Remote Port Verification Request This request verifies the existence of the specified remote port and corresponds to the UNIX ping command This request can be issued when the Ethernet Port operating mode is either run or standby mode The Ethernet Port will respond to this request if its operating mode is either run or standby mode Remote port verification request using the SEND instruction a Function This is a request that verifies the existence of the specified remote port b Transfer parameters A 3100H Module designation A 1 CMD 0014H CMD number A 2 D IP address IP address of the remote station whose A 3 existence is to be verified The input format is the same as that for the parameter setup request c Status See figure 4 3 for details on bits C D E and F E D C BA 9 8 7 6 5 4 3 2 1 0 F B ofofojo Temsts B 1 Detailed information Only valid when TermSTS OBH d Important items e This request is possible in run and standby modes The IP address of the local por
23. Occurs if either 0 words or 486 or more words were specified for either a count register read write or a remote port loopback request Occurs if either 0 words or 1001 or more words were specified for a UDP TCP send receive request OAH 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 portloopback UDP send receive TCP send receive register read write OBH Transmission error Occurs if the Ethernet Port returns an error response Detailed information the Ethernet Port response status is stored OCH No I O response Occurs if the T2N cannot access the Ethernet P ort ODH Reserved OEH Send data capacity Occurs ifa request is discarded when a T2N internal resource insufficiency exceeded occurs due to increasing amounts of transfer data Occurs ifa T2N retransmission times out OFH Reserved When a transmission error OBH occurs details of the Ethernet Port error response are stored in the register following the status See table 8 6 dn TOSHIBA 6F3B0362 Table 8 6 Detailed Information Ethernet Port Error Responses a o Error de Description Normal complete 1H Request completed normally Local port fault 2H The local port is in down mode Local port standby 0003H Data transmission in standby mode socket interface transmission or PC link protocol transmission was req
24. TOSHIBA 6F3B0362 d Important items e Values other than 1010H 1020H 1030H and 2000H may not be specified for the specification information Status Transmission error TermSTS OBH Detailed information Incorrect control request specification 0083H e Simultaneous run mode and standby mode requests 30x0H cannot be executed Status Transmission error TermSTS OBH Detailed information Incorrect control request specification 0083H e A mode that has already been established cannot be requested However requests that change the MTEN STEN state within the same mode do not cause an error Status Transmission error TermSTS OBH Detailed information Incorrect control request specification 0083H e No execution is possible in down mode Status Module error initialization in progress TermSTS 06H e 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 OBH Detailed information MAC IP not set up 0050H e Sample program This sample ladder program issues a operating mode control request to the channel 1 Ethernet Port This program is executed by turning on the R0503 A point Parameters 12544 3100H 00019 0013H 04144 1030H Control request RWO00 00019 MOV RW001 Designates the module and sets the CMD number RWO02 Setup specified information RWO
25. 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 Host machine Personal computer Workstation Application program 10BASE T Ethernet Port T2N operating PU 245N system TOSLINE S20LP Port v TOSLINE S20LP Response TOSLINE TOSLINE TOSLINE S20LP i S20Lp I S20LP T3H T3H T2N Figure 1 5 Gateway Function 19 TOSHIBA 6F3B0362 5 Support for 10BASE T Network The Ethernet Port can connect to a 10BASE T network 10BASE T is a LAN technology that uses baseband transmission provides a data transmission rate of 10 Mbps and supports single segments of up to 100 meters in length This network uses 10BASE T Twisted pair cable as the transmission cable The figure below shows the maximum interport separation Node Node Twisted pair cable Twisted pair cable HUB 500m HUB 500m HUB 500m HUB oe eae Coaxial cable LOBASE 5 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 the maximum cable length 100 m in systems using 10BASE T O TOSHIBA 6F3B0362 1 4 Ethernet Port Specifications Table 1 2 lists the Ethernet Port specifications The
26. WsaDtata if ists 0 If normal return Kl 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 amp Soc sizeof Soc if ists SOCKET ERROR If bind completed normally for i 0 i lt LOOP i Loop for the specified number of times ists cl_send isdp Register read write processing Kop if ists 0 If an error occurred in register read write processing break Terminate processing ap closesocket isdp Socket close processing WSACleanup Report WINSOC termination TOSHIBA 6F3B0362 SLW f KRKKKKKK KR AR A I RA AA A AAAI I AAA A A A A A I kkk a f E x Ss cl send Register read write processing baa xf KK KK RR A RA I AAA I AAA A I k kkk kkk kkk A A k k kkk kkk f xf fe Calling sequence pE x cl send Arguments Isdp z int I socket identifier Le ists pint O return status A fo kg f KRKKKKKK KK KK KK KK KKK KKK KK KK KK KKK KKK KK KK KKK KKK KKK KK KKK KKK KKK KK KKK KKK f int cl send int Isdp int Tsk Loop counter int ists 0 Return status ay int iret
27. checking the station status and then verify the open closed state of the socket in the socket status TOSHIBA 6F3B0362 e UDP open processing example Ladder program flowchart Error result UDP open processing start Socket status read verify Are bits C and D both 0 Closed state Yes Execute a UDP open request CMD 0031H Hold the input of function block in the on state until the SEND instruction completes The specified socket is already open Instruction completion Verify the status An error occurred in the open processing and the specified socket could not be Normal complete opened Handle the error according to the completion and socket status Terminate UDP open processing 86 TOSHIBA 6F3B0362 UDP send request broadcast send request using the SEND instruction a Function This request sends local port register data using an open UDP socket Amount of data sent b A A 1 A 2 A 3 A 4 A 5 A 6 A 7 A 8 1 to 1000 words Transfer parameters 3100H Module designation 1 channel number CMD 0032H Command number SportNO Socket identifier 1 to 8 DIPAddress Transmission destination IP address The input format is the same as that for the parameter setup request Transmission destination object socket UDP port number Transmission data length 1 to 1000 words Transmission data storage register type code Transmission d
28. complete on page 148 Was the wait time set to unlimited Set the Ethernet Port to run socket transmission enabled using an operating mode control request No Establish a connection with gt the remote port Is the station status such that run socket transmission is enabled Did the instruction time out TermSTS 0BH Details 0020H Resolve the problem by referring to the status INO gt Transmit a message at the remote port 1 Recheck the remote port IP address and Does a response come back message transmission TCP port numbers ifa pot ae the 2 Verify that there is no router on the network pe 3 Check the network verification items Is the remote port transmitting Yes Is the error counter read out from the RAS information It is possible that there is an abnormality on the constant i e not being 9 gt network itself Check the network verification incremented items Use RAS information readout to determine this RAS error counters Alignment error Short packet CRC error 161 TOSHIBA 6F3B0362 9 Network check items Ethernet Port Check items Countermeasure Transmission 1 Is the twisted pair cable connected 1 Verify the twisted pair cable connections between the medium between the Ethernet Port and HUB Ethernet Port and HUB installation 10BASE T 2 How long in meters are the twisted pair The ma
29. issued for a socket that is not yet opened Status Transmission error TermSTS OBH Detailed information Unopened 0081H e An error is returned if a value other than 1 to 8 is specified as the socket identifier Status Transmission error TermSTS OBH Detailed information Illegal socket identifier 0082H e An error will be returned if a value of 0 words or 1001 or more words is specified as the reception data size Status Transmission word count error TermSTS 09H e An error will be returned if the reception timeout time is exceeded Status Transmission error TermSTS OBH Detailed information Timeout 0020H e Ifa close request from the remote port TCP socket has arrived while a connection is established and the user program issues a receive request the Ethernet Port 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 OBH Detailed information Unopened 0081H Verify the socket status see section 6 3 RCLOSE and CONN bits and close the socket e Allocate a reception data storage register area per a socket with a size equal to the size of the transmission data plus one word e If the reception data size is larger than the reception data size of the receiving Ethernet Port the size of transmission data for the single operation and the size of reception data at that time is transmitted to the T2N
30. it requires support from a higher level protocol The Ethernet Port supports the e the UDP checksum function IP Internet protocol Sends and receives data in the datagram format Sends data in datagram units to the remote port according to the IP address The Ethernet Port supports e Data fragmentation and reassembly e Direct routing and e Broadcast functions The Ethernet Port does not support the indirect routing and multicast functions Although the Ethernet Port physical layer structure conforms to the IS08802 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 IP packet errors verifies the state of the IP network and supports related functions The Ethernet Port supports the e Echo request reply e Timestamp request reply and e Information request functions The Ethernet Port does not support the e Destination unreachable e Source quench e Redirect e Time exceeded for a datagram e Parameter problem on datagram e Information reply e Address mask request and e Address mask reply functions oe TOSHIBA 6F3B0362 2 Ethernet Port Parts and Functions This chapter describes the sections of the Ethernet Port and their functions 2 1 Front Panel ER
31. performs the self check described below If the self check completes normally 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 e Ethernet Port self check items e System ROM check e System RAM check e LAN controller check e T2N interface buffer memory check e EEPROM check See section 4 5 Operating Mode Control Requests for more information on the Ethernet Port operating modes 1 T2N power on When power is applied to the T2N power is also applied to the Ethernet Port and the PU235N 245N performs its reset processing sequence TOSHIBA 6F3B0362 2 Reset request from the T2N It is possible to initiate reset processing from user programs on the T2N T2N can execute the reset processing instruction on standby mode See section 4 5 This section describes the format of the reset processing instruction Reset request using the SEND instruction a Function Reset request from a user program to an Ethernet Port b Transfer parameters A 3100H Module designation A 1 CMD 0011H CMD number c Status See figure 4 3 for details on bits C D E and F E D C B A 9 7 6 5 4 3 2 1 0 B CI Tororofo ves B 1 Detailed information Only valid when TermSTS OBH d Important items An error will occur if the Ethernet Port is in run mode or down mode Run mode
32. point other than a message transmission UDP socket Register read request using the RECV instruction a Function The register data specified by the remote port T2N T3H is read to the specified register on the local port T2N b Transfer parameters A Module designation A Command number A 2 1 Transfer register data length 1 to 485 words A 3 2 Local port register type code A 4 3 Local port register number A 5 4 Remote port register type code 5 A 6 DRegNO 5 Remote port register number A 7 6 Timer count A 8 D IPAddress Remote port IP address The input format is the same as that A 9 for parameter setup requests A 10 D UDP PortNO Remote port message transmission UDP port number P TOSHIBA 6F3B0362 1 Transferred register data length Specifies the transmission data length in word units 1 to 485 words For the T C registers the data length will be between 1 and 323 words 2 Local port register type code This code specifies the type of the local port register into which the data read out will be stored See table 5 1 for the codes that can be specified here 3 Local port register number Specifies the starting number of the register specified by the local port register type code 4 Remote port register type code This code specifies the type of the remote port register that holds the transmission source data See table 5 1 for the codes that can be specified 5 Remote port regis
33. register Figure 5 1 Register Type Code 1 Includes the expansion F registers One bank has 8k words 0 to 8191 F 7 0 05H Bank number 00H T2N internal registers F0000 to F1023 01H to 03H Expansion F registers F0000 to F8191 TOSHIBA 6F3B0362 2 Includes the expansion F registers Only T3H One bank has 64K words 0 to 65535 F 7 0 Bank number 00H T3H internal registers F0000 to F32767 01H Expansion F registers IC card F0000 to F65535 02H Expansion F registers IC card F0000 to F57343 3 The T and C registers hold data that has flags attached Supplement The transfer data length has a maximum of 323 words when data is transferred over the Ethernet For the T registers it is not possible to specify a range that spans both the basic T registers 0 to 511 and the expansion T registers 512 to 999 The T3H has the expansion T register but the T2N does not have c Status ne figure 4 3 for details on bits C D E and F E D C B A 9 7 6 5 4 3 2 1 0 B LECL ERLI e B 1 Detailed information Only valid when TermSTS OBH d Important items e The write 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 e The command number 0021H is the same as the Data Read e A transfe
34. 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 BA 9 8 7 6 5 4 3 2 1 0 B Sporto TemsTs B 1 Detailed information Only valid when TermSTS OBH SportNO Socket identifier 1 to 8 TermSTS See tables 4 3 and 4 4 Detail information See table 4 5 d Methods for storing reception data e Applications must allocate a reception data storage area of 1001 words The reception data count and the reception data the data received by the object socket at the point the receive request was issued will be stored in this area as shown below Reception data count bytes lt Start of the specified register ar ogs Reception data storage Reception data register area 104 TOSHIBA 6F3B0362 e The T2N checks for register area allocation of the reception data size plus one word and returns an error if the register area does not exist Status Boundary error TermSTS 0AH In this case data is not transferred to the register area and the data is discarded The data is not retained in the Ethernet Port either e Important items e An error is returned if a receive request is
35. s reception data storage register area e Since a TCP receive request merely places the socket in the receive wait state it cannot detect remote ports that are not responding Use one of the following methods to prevent this state e Monitor for a no response state by sending data periodically over a separate different TCP connection e Execute a remote port presence verification request for the remote port periodically See section 7 3 e Monitor the interval between data receptions when data is being received periodically Receive request issued first type specify a limited timeout limit Socket status monitoring type monitor the interval between points when the received text present bit is set to the on state 105 TOSHIBA 6F3B0362 e One of the following problems may have occurred when there is no response from the remote port e The remote port may have gone down e Power may have been lost e The remote ports and or local port may have become disconnected from the network e In the Ethernet Port TCP socket interface when reception data in the Ethernet Port is read out by a receive request from the T2N the Ethernet Port sends an ACK acknowledge response to the port that sent the data Since an ACK will not be sent to the sending port if the received data remains in the Ethernet Port if the T2N does not read out that received data the sending port will resend the data If this state continues for a prede
36. storage register type and start number MOV RWOO4 Sets the RAS request type MOV RW005 00030 MOV RW006 Sets the information readout start position and count RECV RW010 RST R0505 Sets the request a cy Event trace information reads out 30 items starting with the most TOSHIBA 6F3B0362 f RAS information details 1 RAS counters rsnnrronrrrrnrrrrnnr LAN controller line information Reads out 128 words of data using RAS information readout Table 7 2 RAS Counters Symbol Description RAS CNT 0 Normal reception count RAS CNT 1 Bus read error reception buffer read failure count RAS CNT 2 Remote reset packet reception count Packets whose Ethernet header type was set to 0900H RAS CNT 3 Short packet packet length under 60 bytes reception count RAS CNT 4 Alignment error The number of bits in the received data was not divisible by 8 count RAS CNT 5 CRC error received packet CRC check error count RAS CNT 6 Overflow Incoming packets discarded due to full receive buffer count RAS CNT 7 Remaining registers unused RAS CNT 8 e RAS CNT 127 2 MIB information MIB IF LAN controller interface information Reads out 13 words of data using RAS information readout Table7 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 int
37. to determine the separation distance However since transmitted signals are weak signals restrict induction sources to no more than 440 volts and 100 amperes Table 9 2 Recommended Minimum Separation Distance Induction source Minimum separation for parallel lines mm Voltage current Over100A Upto 100A Upto50A Upto 10A Over 440 V 2000 Up to 440 V 600 Up to 220 V 500 Up to 110 V 300 Up to 60 V 150 165 TOSHIBA 6F3B0362 Considering resistance to noise we recommend using either covered metal cable ducts or protective steel pipe Table 9 3 lists the recommended minimum separations for parallel lines in this case Table 9 3 Recommended Minimum Separation Distance Covered metal ducts and metal pipe Units mm Cable installation method Covered metal ducts or metal pipe Up to Up to Up to Up to Up to 501 meters 10 meters 25 meters 100 meters 200 meters 500 meters or over Power Up to 125 V up to 10 A 10 10 50 100 cable Up to 250 V up to 50 A 10 50 150 200 Up to 400 V up to 100 A 50 100 200 250 Up to 500 V up to 200 A 100 200 250 250 Levels exceeding the above At least 500 Parallel separation 200 250 250 250 When using cable ducts install steel separators to separate power cables from coaxial cables as shown in the figure below Metal duct Separator Power cable Instrumentation power lines Solenoid and other control signals Figure 9
38. transfer data using UDP UDP ports are managed using port numbers In the same manner TCP uses TCP ports The combination of a port number and an IP address is called a socket The Ethernet Port transmits data to or from other ports using these sockets in the computer link protocol the PC link protocol and in socket 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 request using the SEND instruction a Function This is a request from a user program that sets up the Ethernet Port parameters in an Ethernet Port in standby mode b Transfer parameters A 3100H Module designation A 1 CMD 0012H CMD number A 2 Local port IP address for the A 3 Ethernet Port A 4 UDP port number for message UDP port number used for computer link or PC link protocol transmission e IP address setup procedure For the address 133 113 90 10 L 85H 71H SAH OAH F 87 0 A 2 85H A 3 OAH 5AH eo TOSHIBA 6F3B0362 e Message transmission UDP port number As described in chapter 1 UDP IP is used for both computer link and PC link protocol transmission which are collectively referred to a
39. up by a user program running on the T2N For details on these setup operations see section 4 4 Parameter Setup Request Nor Set up the Ethernet Port parameters from the T2N I 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 other ports Vv C The Ethernet Port operating mode is set by user programs running on the T2N For details on these operations see section 4 5 Operating Mode Control Requests Specify the Ethernet Port operating mode from the In this state the PC link and computer link protocol transmission slave port functions are operating Assuming that they have not been explicitly disabled by the operating mode settings Figure 4 1 Ethernet Port Setup Flowchart Software Usage Recommendations Before performing the settings described in this chapter register the PU235N 245N as T2N 1 0 The I O type is ETHER orE S er eS TOSHIBA 6F3B0362 4 2 Ethernet Port Instruction Specifications Before discussing the software side of the Ethernet Port setup procedure this section presents an overview of the SEND and RECV instructions which are the instructions that are used to control the Ethernet Port from T2N user programs Ethernet Port control and transmission control PC link protocol transmission and socket interface transmissi
40. verifying the reception of transmitted data and retransmission b It is possible to broadcast to all ports on the network using UDP sockets Send side Set the transmission destination address to 255 255 255 255 This is FF FF FF FF in hexadecimal The 0 0 0 0 used by some UNIX versions in particular 4 2 BSD cannot be used Set the UDP port number for the socket to which you want to issue a broadcast as the transmission destination object socket UDP port number It is convenient to prepare a dedicated socket in advance if broadcast transmission is to be used Receive side Specify 0 0 0 0 as the transmission source IP address Specify the UDP port number for the broadcast transmitting socket as the transmission source UDP port number c Data transmission between sockets on the same port is not supported by UDP d When PC link transmission or the UDP socket interface is used if an application transmits to a nonexistent remote port an transmission error TermSTS OBH detailed information 0020H occurs 79 TOSHIBA 6F3B0362 6 TCP socket interface notes a When a passive open is executed the specified socket is put in the active open wait state If the remote IP address DIPAddress and the remote port object socket TCP port number DTCP_PORTNO values are set to 0 the socket will be able to handle active opens from any remote port b A connection is established by an active open from another socke
41. will be returned if a value outside that range is specified Status Transmission error TermSTS OBH Detailed information Port number error 0071H e An error will be returned if a value of 0 words or 1001 or more words is specified as the transmission data size Status Transmission word count error TermSTS 09H e The T2N performs an area check for the register area based on the transmission data storage register type and number and if an error is found it returns an error Status Boundary error TermSTS OAH e Ifthe 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 perform the required error handling the send request etc e The Ethernet Port uses a priority ordering in processing sockets I through 8 Therefore systems constructed so that socket 1 is activated frequently 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 least 50 ms times the n
42. 0 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 transmitted data as a single unit of data on the receiving side as well at the system design stage users must analyze both the data format head tail delimiting codes data sequencing and the amount of data to be transmitted and provide routines to decode the transmitted data in the receiving T2N user software e Allocate an area one word larger than the transmitted data size as the T2N register area that will hold the received data As the result of a receive request information 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 Ethernet Port TCP socket interface T2N Consecutive data up to 4380 bytes gt Receive request Data received up to this time Max 2000 bytes i l Data received b Transmitted data og the T2N 2 Receive response Transferred data Figure 6 6 Handling of Transmitted Data in the TCP Socket Interface 74 TOSHIBA 6F3B0362 f When the TCP socket interface is used transmitted data is divided fragmented into units of a size determined when the connection between the two sockets was established Th
43. 00 S RWO10 RST R0503 Sets the request AG TOSHIBA 6F3B0362 5 Computer Link Protocol and the PC Link Protocol Transmission 1 Chapter 5 presents information related to using the functions provided by the Ethernet Port from a T2N including the instruction request format important items that require attention and sample programs Make a point of understanding the content of chapter 4 thoroughly before writing programs 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 This chapter describes computer link protocol transmission from a host computer and PC link protocol transmission with the T2N 5 1 Computer Link Protocol Transmission The T series computer link protocol transmission was developed by Toshiba for use in controlling the PROSEC T Series programmable controllers A host computer can with respect to a T2N upload or download user programs issue control commands or read and write register data using the T series computer link protocol When 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 a
44. 0020H using an operating mode control request No Ne UDP ports on the local Is the remote port transmitting Yes Are the remote port IP address and UDP port number correct Is the error counter read out from the RAS information constant i e not being incremented Use RAS information readout to determine this N It is possible that there is an abnormality on the 9 gt network itself Check the network verification items RAS error counters Alignment error Short packet CRC error 157 TOSHIBA 6F3B0362 8 If Transmission Using TCP Sockets Fails When troubleshooting TCP sockets also refer to the section TCP socket interface notes in section 6 2 Ethernet Port Socket Interface Usage Notes a Open request Verify the status using the procedure described in the item 3 If a SEND or RECV instruction fails complete on page 148 Was the wait time set to unlimited 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 Did the instruction time out TermSTS 0BH Details 0020H Resolve the problem by referring to the status Is the program attempting to issue an active open to a socket in the passive open state No Decide which role each socket will play when establishing a connection between a pai
45. 1 If the Ethernet Port is in run mode set it to standby mode However if it is in standby mode there is no need to set it to standby mode again BAL 6F3B0362 TOSHIBA 6F3B0362 3 Status B The status during the execution of a SEND or RECV instruction and after that instruction terminates is stored in the register shown at B When TermSTS OBH the detailed information Ethernet Port error information will be loaded into the registers indicated at location B 1 Figure 4 3 shows the structure of the status information Tables 4 3 and 4 4 list the TermSTS values and table 4 5 and 4 6 lists the contents of the detailed information B Status B 1 Detailed information FED CBA 98 7 6 5 4 3 2 1 0 TermSTS Only on an error 0 Error occurred at local station 1 Error occurred at remote station Socket identifier Only valid for socket interface transmission instructions 0 for other instructions Sport NO S status 0 Initial state 0 Initial state 1 Whil d t 1 Transmission port busy Le Send ENE zi 2 Send complete and while waiting abn 0 Normal complete response 1 Error complete 3 Complete Figure 4 3 Status Structure lt Important items gt h The user program must set bits C and D to 0 before first activating a SEND RECV instruction Failure to do so will cause the SEND RECV instruction to not complete Also do not write to the status during instruction execution T
46. 1 Duct Internal Layout Example Coaxial cable When laying cables in a pit use separators in the same manner as when ducts are used Separator steel Ground with a resistance to ground of 100Q or less Figure 9 2 Pit Internal Layout Example 166 TOSHIBA 6F3B0362 e Wiring routes The desirable routes for laying the transmission cable can be ordered as follows 1 Using a dedicated route 2 Using a route dedicated to computer system related lines 3 Using a route dedicated to general measurement equipment 4 Using a route dedicated to plant control related lines 2 Overview of panel internal wiring When 10BASE T is used with the Ethernet Port twisted pair cable is connected to the Ethernet Port Keep the following points in mind when wiring inside the control panel a Wiring path Use the weak signal route within the panel for wiring the coaxial cable In particular keep the coaxial cable at least 50 cm away from power supply cables b Securing coaxial cable Secure the coaxial cable with clamp materials so that the weight of the cable is not applied to the cable s connectors Remember that the cable not must be bent beyond its minimum bending 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 LOBASE2 and 10BASE5 c
47. 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 gt Number of sockets used x 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 gt Number of remote ports x 50 ms 106 TOSHIBA 6F3B0362 f TCP reception processing example Socket status monitoring type Ladder program flowchart Error result TCP reception processing start The processing in this section can be performed at this stage or at the point the instruction terminates abnormally Socket status read verify Are bits B and F both 1 Is a connection established Yes Is bit 9 set to 0 In the state other than RCLOSE Yes Is bit A set to 1 The specified TCP socket has not received Reception text present data Yes A connection has not been established with the specified TCP socket Open processing is required The specified TCP socket is e Closed by the remote port The socket must be closed by the local port Execute a TCP receive request CMD 0038H Hold the input of function block in the on state until the RECV instruction completes Instruction completion Verify the status An er
48. B 1 Detailed information Only valid when TermSTS OBH d Important items e This request can be executed in run or standby mode e The time set here is updated by the Ethernet Port internal timer and thus may get out of synchronization with the T2N time We recommend setting the Ethernet Port time once a day 130 TOSHIBA 6F3B0362 e Sample program This sample ladder program issues a time set request to the Ethernet Port This program is executed by turning on the R0508 A point Parameters 12544 3100H 00024 0018H 01942 0796H 05124 1404H 00048 0030H Time set request 12544 MOV RWO00 00024 MOV RW001 Designates the module and sets the CMD number 01942 MOV RWO02 05124 MOV RWO03 00048 MOV RWO04 Sets the year month day hour minute and seconds RWO00 SEND RWO10 RST R0508 Sets the request ee 0 TOSHIBA 6F3B0362 7 6 RAS Information Readout This request reads out the Ethernet Port RAS information internal error information and phenomenon history from a user program RAS information readout request using the RECV instruction a Function This request reads out the Ethernet Port RAS information from a user program b Transfer parameters A 3100H Module designation A 1 CMD 0015H CMD number A 2 RAS information storage register type RI A 3 RAS information storage register start address A 4 RAS request type A 5 Start posi
49. C Link Protocol Transmission Data Write Lummdvessuanesapnmniiviresn 57 5 4 PC Link Protocol Transmission Data read arararornnnonananarernavaverennnnnner 61 5 5 sample PC Link Protocol Transmission Progra M scicscssaccassesacearcceseccncssncoans 64 12 TOSHIBA 6F3B0362 6 Socket Interface Communication 0 cece cece cee ee eee aerer eeeeeeeneaeaee ees 68 SEE EEE EEA OR 68 6 2 Ethernet Port Socket Interface Usage Notes cccccccecececseneeeeeeeeeeneneneaes 72 ek CAEN SE EL SER 82 6 4 Using the Ethernet Port Socket Interface ararararnonnnanarannrnrnananenennnnnnenene 84 Me 10 010 1 ERE 112 7 RAS Information Ss sidisexsiircoedes dosnecroesnventetyeouansexansctoiireenteinavearssdupoerorteess 122 Fol TRE EIS a acascctuenssevindnswnevacasnenaesoouinaterees 123 HO REESE RR 125 7 3 Remote Port Venficaton NR 126 7 4 Remote Port Loopback for an Ethernet Port oo eee ee eecececeeeeeeeeeeeeeen ensues 128 PE REE TREN 130 He GE 0 RR 132 6 Enor Ronding RER EE 140 CEED DISHON RS Ea 140 SEE OR NE ER 143 8 3 T2N Special Relays and Registers rararanaranrarnnararanerennnnnasnenenenenenenene 146 EE AE G EL EN 147 Aes RS NE TT 148 SL Ea EEE aera eanenanbeaseands 163 9 1 Installation Environment and Base Unit Mounting cccceeeeeeeeeeeeenenenes 163 ES 4 ERE T ETT T A 164 Appendix Appendix I Maintenanceand INSpOCUON sciisvscissvecniestexsvevedhisscauhsiconeaseseeo
50. M error 0260 DPRAM error 0360 0002H Program address Request code 0005H Mode prior to change Mode prior to change 0007H Task ID Memory pool number 0008H Task ID Station status 0100H CMD number 0011 CMD number 0012 CMD number 0013 0200H Task ID 0300H Task ID See table 7 7 Table 7 7 Event Trace Items NMI 0000 Read port contents TRAP 0001 None Watchdog timer check Watchdog timer flag 0002 Watchdog timer check 0003 Station status Mode after change Mode after change Error code Error code Watchdog timer flag Write port contents Error code Station status Write port contents UDP port number Station status Mode after change Task completion status IP setting flag length 0004 Error code Length recvfrom 0005 Error code Request code 138 6F3B0362 Content Initialization error NMI occurrence factor Start type Mode change station status Instruction storage buffer allocation error Transmission prohibit T2N driver reception or response code error T2N Ethemet Port interface completion error Message transmission completion error Socket transmission completion error TOSHIBA Packets AT traveling on the transmission path 72 to 1526 IP datagram bytes 46 to 1500 bytes I Data fields in the packets traveling on the transmission path IP data field up to 1480 bytes
51. O for F 10 HUB I 1 10BASET PU235N PU245N 2 T 1 en NiH jo TE S ay DAT 2 Ri N H O ae TOSLINE F10 R I O R 1 0 PU 245N 0 T slol T E S 1 0 T S 1 01 O 3 2 2 T2 3 2 Ho N H O H lo L EL L P ROP P Figure 1 1 System Configuration Examples SD EE TOSHIBA 6F3B0362 1 2 LAN Standards and Terminology The LANs commonly referred to as Ethernet LANs are defined by two standards the Ethernet version 2 0 standard DIX developed by DEC Intel and Xerox and the ISO 8802 3 standard IEEE 802 3 which is an international version of the DIX standard Since the ISO 8802 3 includes the DIX standard network equipment built to those standards will be basically compatible Since the Ethernet Port physical layer has a structure that conforms to the ISO 8802 3 standard 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 Ethernet 10BASE5 Cheapernet 10BASE2 Coaxial cable Coaxial cable Transceiver cable AUI attachment unit in
52. Operations Environment in which cable is laid Major categories Locations where cables will not be damaged Location where cables could be damaged Locations where there is a likelihood of electromagnetic interference Minor categories P P b P S heavy physical loads may be placed on the cables The term installation with protective pipes means that either metal or PVC pipes may be used aces where there is normally motion of people and objects y humidity chemicals oils or heat y rats mice or other animals aces where cables may receive trong mechanical shocks or where 164 aces where cables may be influenced Inst aces where cables may be damaged Ins Work operations 4 Installation w 4 Installation w 4 Installation w kal kal w onw Installation w i i on wi i i i hout pro h pro h pro th pro h pro h pro E ec eC tec eC eC F F F F F ective pipes ive pipes ive pipes ive metal pipes ive pipes ive metal pipes Protective installation and separation of cables Installation with protective metal pipes TOSHIBA 6F3B0362 b Overview of wiring without protective pipes 1 To protect the cables cables should be passed through flooring ducts or wire protecting cable covers shoul
53. P address 133 113 98 200 133 113 98 10 e Remote UDP port number 3001 f KRKKKKKK RA RA I A AAA A AAA A I A AAA I A A A A I AI oe f Write and read requests can be issued to other T2N units Xy Ef r x xf Kf xf A E Kf EM JAAK kkk kkk kkk KK KK KKK KKK KK KK kkk kkk kkk kkk kkk kk kkk kkk kkk kkk A A kk kkk kkk f Register type AR SAMPLE H by modifying this definition file je C Copyright TOSHIBA Corporation 1995 asi All Rights Reserved EEE a SSE SS SS SSS SSE Definition declarations EEE EEE SESS SSS SE SS define Y PORT 3001 define DST_PORT 3001 define DST_IP P33 113 08 10 define LOOP 10 define DATASIZ 32 define RECVTOUT 30 define REG TYPE D define REG_ADR 0000 Register start address Local port number Remote port number Remote IP address Ky Data transmission execution count Data length Computer link function word units RECVFROM timeout time TOSHIBA 6F3B0362 f KRKKKKKK KR A RA I AAA kkk AAA A I kkk AAA A A A A k I AI kkk f Ae He Jo Sample program implementing register read and write processing Ve using the computer link protocol pE kg la This program is a sample program designed to verify the T2N Kf Ethernet port computer link function JE This program issues read and write reque
54. P port number for this socket e e e e Socket status Table 8 7 lists the structure of the socket interface information and the extended memory area addresses Table 8 7 Socket Interface Information Socket identifier Poa ot 2 3 4 5 6 7 OF4DH OF55H OF5DH 0F65H OF6DH OF75H OF7DH For UDP sockets the remote port number and IP address data are invalid Remote port number TCP only Remote port IP address TCP only OF 83H OF 84H OF 85H OF 86H OF 87H Local port TCP UDP port number Socket status The socket status has the following structure F E D C BA 9 8 7 6 5 4 3 2 1 0 TCP AOPEN CONN RCLOSE UDP POPEN RCV NOACK Bit no Bit Condition under which the bitis setto1 Condition under which the bit is reset to 0 The socket closed in response to a close request The socket closed in response to a close request The socket closed in response to a close request POPEN TCP socket in passive open state or UDP The socket closed in response to a close request socket in open state B CONN TCP connection established Disconnected by the local port with a close request Disconnected by the remote port Received text present No received text RCLOS An established TCP connection disconnected The socket closed in response to a close request E by the remote port 8 NOACK No response received from the remote port for The socket closed in response to a close request
55. SEND 0014H 1 network Reads out the Ethernet Port RAS information RECV 0015H 1 Sets the Ethernet Port internal clock SEND 00 Time information for event trace Reads register data from remote T2N into registers RECV 0021H 2 in the local T2N Sets the operating mode SEND 18H ee in remote T2N Port on the network 0031H 003243 0033418 00348 003541 003748 RECV 0036H 3 Closes terminates an open TCP socket SEND 0039H 3 The request code CMD types 1 to 3 have the following meanings Reference Section 4 3 Section 4 4 Section 4 5 Section 7 3 Section 7 6 Section 7 5 Section 5 4 Section 5 3 Section 7 4 Section 6 4 Section 6 4 Section 6 4 Section 6 4 Section 6 4 Section 6 4 Section 6 4 Section 6 4 1 2 3 4 5 6 7 8 Class 1 is module control 2 is PC link protocol transmission and 3 is socket interface transmission For a single Ethernet Port it is not possible to request another class 1 CMD while a class 1 CMD is executing This is also true for class 2 CMDs If such a request is issued the status will be transmission port busy and the request will go to the wait state For a single Ethernet Port when requesting a class 3 CMD it is not possible to request another class 3 command for a socket for which an instruction is executing If such a request is issued the status will be transmission port busy and the request will
56. SHIBA 6F3B0362 Set the data count Ay idat DATASIZ Register read data length sprintf amp csnd strlen csnd 02d idat sprintf amp csnd strlen csnd r isndsiz strlen csnd Set up the data transmission length map Send the register read command ists sendto Isdp csnd isndsiz 0 struct sockaddr amp Snd sizeof Snd if ists isndsiz Set the BIT initial value memset amp ibits 0x00 sizeof fd_set timeout tv_sec RECVTOUT Set the timeout time BIT setup FD SET Isdp amp ibits ists select 1 amp ibits 0 0 struct timeval amp timeout if ists lt 0 If timeout and error return 1 recvfrom timed out EN Register read response reception Ewe ists recvfrom Isdp crev sizeof crcev 0 Struct sockaddr amp Rcv amp ircvsiz Lf NM dsts 35 J1 if crev 6 C amp amp crev 7 E iret 1 Register read response error Kl else Register read response was normal iret 07 return iret TOSHIBA 6F3B0362 5 3 PC Link Protocol Transmission Data write The T series PC link protocol allows one T2N on a network to write register data to another T2N or T3H As is the case with the computer link protocol the PC link protocol uses UDP IP as its transmission protocol The PC link main port uses a UDP socket for message t
57. TOSHIBA 6F3B0362 T2N Ethernet Port Instruction Manual REQUIREMENTS e Keep this instruction manual where it can be easily referred to by users and those responsible for the equipment e Read this instruction manual carefully before using the equipment e After this instruction manual has been read keep it beside the equipment Main Menu Contents July 1998 TOSHIBA CORPORATION UM TS02N E006 TOSHIBA 6F3B0362 Copyright 1998 by Toshiba Corporation Tokyo Japan 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 except as noted in this publication This publication is copyrighted and contains proprietary material No part of this book may be reproduced stored in a retrieval system or transmitted in any form or by any means electrical mechanical 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 liable for either indirect or consequential damage or injury that may result from the use of this equipment No patent liability is
58. UN ET R EACC Ethernet Port LED Display O O O SRUN SONL SACC O O O a sis S TOSLINE S20LP Port parts OTR1 PU245N only 10BASE T Ethernet Port 10BASE T connector for connecting transmission cable Figure 2 1 PU235N 245N External Dimensions A TOSHIBA 6F3B0362 2 2 Component Functions 1 LED Display Indicators that display the Ethernet Port operating state ERUN ET R EACC LED display O O O All LED s color is green Figure 2 2 LED s display and name Content Displayed Table 2 1 LED Display Content LED Content ERUN Indicates whether or not the Ethernet Port is operating normally Ether Run On The Ethernet Portis operating normally Off The Ethernet Port error occurred ET R Indicates whether or not the Ethernet Port is transmitting data or receiving data Ether Transmis On Data transmission or receipt in progress Off Data is not being transmitted or received sion Receive EACC Indicates whether or not the T2N is accessing the Ethernet P ort On The T2N is accessing the Ethemet Port EEA Off The T2N is not accessing the Ethernet P ort 2 10BASE T connecting connector This connector is used for connecting 10BASE T twisted pair cable and Ethernet Port See section 3 1 Connecting to the Network for detailed information on connection er TOSHIBA 6F3B0362 3 Preparing for Operation Hardware This section presents the E
59. Yes The specified TCP socket is either e Closed by the remote port or Are bits 8 and 9 both 0 In neither the RCLOSE nor NOACK Not responding state The socket must be closed by the local port Execute a TCP send request CMD 0037H Hold the input of function block in the on state until the SEND instruction completes Instruction completion Verify the status An error occurred in transmission processing Transmission from the specified socket is not possible Handle the error according to the completion and socket status Normal complete Terminate TCP transmission processing 103 TOSHIBA 6F3B0362 7 TCP receive request using the RECV instruction a Function If an opened TCP socket receives data read the received data into registers on the local T2N If no data has been received wait until data arrives the wait time can be set and then after reception read the received data into the local T2N registers Reception data size 1000 words fixed b Transfer parameters A Module designation net Command number A 2 Socket identifier 1 to 8 A 3 Reception data length 1000 words A 4 Reception data storage register type code A 5 DregNO Reception data storage register number A 6 TimeCNT Reception wait timeout time Reception data length This parameter must be set to 1000 words Reception data storage register type code Type code for the
60. al 3 Preparing for Operation Hardware TOSHIBA 6F3B0362 Safety Precautions continued e Mounting in the base unit The Ethernet Portis built in the PU235N 245N Do not remove the Ethernet Port from a PU235N 245N The PU235N 245N itself should only be mounted or removed when all power is turned off Similarly connections to the terminal block should only be made or removed when all power is turned off Not observing this precaution could result in electrical shocks malfunctions or damage to the PU235N 245N or other equipment Do not allow foreign objects such as wire shreds to get into the PU235N 245N This could result in fire breakdown or malfunction 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 lf any of these parts is inadequately secured breakdown or malfunction could occur as the result of vibration 3 3 Mounting in the Base Unit e Connecting to the network Do not connect or disconnect cables when either the T2N or HUB power supply is turned on This can damage the PU235N 245N or cause it to malfunction When installing a 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 ISO IEC 8802 3 standard for install
61. arrived at the receive side Ethernet Port when the receive request is issued A data item consisting of A and B will be passed to the requester If B was not received another receive request can be issued from the T2N to acquire B 75 TOSHIBA 6F3B0362 Send side TAN Ethernet Port Ethernet Port Send side T2N Send request Network First receive i request copays 1460 bytes 1460bytes 2000 bytes A on en a en 1460 bytes Be Second receive request 2000 bytes 540 bytes 540 bytes 540 bytes Figure 6 7 Transmission Data Fragmentation in the TCP Socket Interface g When the transmission data is fragmented as discussed above the amount of data transferred to the T2N in a TCP socket interface receive request differs depending both on the timing with which the T2N issues the receive request and the timing with which the data arrives at the Ethernet Port h 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 i User programs must store all incoming data so that the register area used to transfer data to the T2N i
62. assumed by Toshiba Corporation with respect to the use of information illustration circuits equipment or application examples in this publication TOSHIBA 6F3B0362 Safety Precautions Thank you for purchasing the Toshiba PU235N 245N CPU module which is for use with the T2N programmable controller This document describes the usage and handling of the PU235N 245N built in Ethernet Port and presents important cautionary items To use the PU235N 245N Ethernet Port safely please read this document and all other related documentation thoroughly and acquire thorough knowledge of the equipment and points that require care before installing operating maintaining or inspecting the PU235N 245N Concerning Important Points 1 The PU235N 245N is designed and manufactured for use with general industrial equipment including all types of production line control and manufacturing equipment The PU235N 245N is not designed or manufactured for use in equipment or systems on which human lives depend Consult with your Toshiba sales representative in advance if you need to use an PU235N 245N in a equipment or systems that are used in transportation 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
63. ata present bit and issue receive requests when necessary 581 TOSHIBA 6F3B0362 6 3 Socket Interface Information The information for the eight socket interface sockets held by the Ethernet Port can be read out with the T2N READ instruction The Ethernet Port holds five words of socket status information for each socket User programs should access this information as necessary when using socket interface transmission e Remote port TCP UDP port number e Remote port IP address e TCP UDP port number for this socket e Socket status Table 6 1 lists the structure of the socket interface information and the extended memory area addresses Table 6 1 Socket Interface Information Socket identifier FEE ENER Remote port number TCP only OF7BH 0F83H Remote port IP address TCP only OF 84H OF4DH OF55H OF5DH OF65H 0F6DH OF75H OF7DH OF85H Local port TCP UDP port number OF7EH OF 86H Socket status OFTFH OF87H For UDP sockets the remote port number and IP address data are invalid The socket status has the following structure F E D C BA 9 8 7 6 5 4 3 2 1 0 TCP AOPEN I CONN IRCLOSE UDP POPEN RCV NOACK 82 TOSHIBA 6F3B0362 Bit e Condition under which the bitis setto 1 Condition under which the bitis resetto 0 no F TCP used by the socket The socket closed in response to a close request E mes DP used by the socket The socket closed in response to a close request D AOPEN TCP socke
64. ata storage register number Transmission data storage register type code Type code for the register that holds the transmission data See Figure 5 1 Transmission data storage register number Starting number of the registers that hold the c d transmission data Status See figure 4 3 for details on bits C D E and F F E D C BA 9 8 7 6 5 4 3 2 1 0 B Sporto TemsTs B 1 Detailed information Only valid when TermSTS OBH SportNO Socket identifier 1 to 8 TermSTS See tables 4 3 and 4 4 Detail information See table 4 5 Important items e The T C register flag data is not transmitted if the T C registers are not specified as storage registers for transmitted data e Anerror is returned if a send request is issued for a socket that is not yet opened Status Transmission error TermSTS OBH Detailed information Unopened 0081H e An error is returned if a value other than 1 to 8 is specified as the socket identifier Status Transmission error TermSTS OBH Detailed information Illegal socket identifier 0082H e If the IP address of the local port is specified as the transmission destination IP address it will be possible to send data but it will not be possible to receive that data with a receive request 87 TOSHIBA 6F3B0362 e Values in the range 1024 to 65535 can be specified as the object socket UDP port number for the transmission destination An error
65. ated by the ERUN LED LED display ERUN Run Indicates the Ethernet P ort normal error down mode status Litt Ethernet P ort normal Off ug Ethernet P ort error down 140 TOSHIBA 6F3B0362 Table 8 2 Ethernet Port Down States Indicated by ERUN ET R LED Combinations LED combination displayed State ERUN lit Ethernet P ort operating normally in standby mode parameter setup wait state The Ethernet Port goes to this state after power is first applied and after a reset Ethernet P ort operating normally in run mode transmission possible The Ethernet P ort switches to this mode in response to an operating mode control request Parameter setup is required to switch the Ethernet Port to run mode ERUN off An error occurred during operation and the Ethernet 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 J abbering 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 queue 0506 Acquired buffer was in use 0507 Initial buffer acquisition error 0508 Down mode due to the occurrence of an error during self diagnostics at power on Possible causes of the Ethernet Port going down Down information error code LAN controller
66. ation environment standards 3 1 Connecting to the Network TOSHIBA 6F3B0362 Safety Precautions continued Concerning Preparing for operation software Computer link protocol and the PC link protocol transmission Socket interface communication RAS information Chapters 4 7 present information related to using the functions provided by the Ethernet P ort from a T2N including the instruction request format important items that require attention and sample programs That chapter also presents items considered necessary when using the Ethernet P ort Make a point of understanding the content of chapter 4 thoroughly before writing programs 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 4 Preparing for operation software 5 Computer link protocol and the PC Link protocol transmission 6 Socket interface communication 7 RAS information e Installation environment and base unit mounting 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 Mount this equipment according to the mounting method specified in the T2N User s Manual Hardware Mounting in any direction other than the specified direction or defective or inadequate mounting can result in the equipment falling fi
67. ations and usage and presents sample programs for the Ethernet Port used with the PROSEC T2N The PU235N has Ethernet Port and the PU245N has Ethernet and TOSLINE S20LP Port The T2N Ethernet Port is built in a T2N and the T3H Ethernet module is independent module It is called port with this manual and called station with Ethernet Module EN311 for T3H Instruction Manual are same meaning This manual describes port When using this product use the product correctly based on a thorough reading of this manual When using a T3H Ethernet module see Ethernet Module EN311 for T3H Instruction Manual This document is organized as follows Chapter 1 Ethernet Port Overview Presents an overview of the PU235N 245N Ethernet Port including its functions specifications and systems in which it can be used Refer to this chapter to understand the basic performance of the Ethernet Port Chapter 2 Ethemet Port Parts and Functions Describes 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 Preparing for Operation Software Describes the software settings required to operate the Etherne
68. blems 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 Status Transmission error TermSTS OBH Detailed information Timeout 0020H e The T C register flag data is not transmitted if the T C registers are not specified as storage registers for transmitted data e An error is returned if a send request is issued for a socket that is not yet opened Status Transmission error TermSTS OBH Detailed information Unopened 0081H e An error is returned if a value other than 1 to 8 is specified as the socket identifier Status Transmission error TermSTS OBH Detailed information Illegal socket identifier 0082H 100 TOSHIBA 6F3B0362 e An error will be returned if a value of 0 words or 1001 or more words is specified as the transmission data size Status Transmission word count error TermSTS 09H e The T2N performs an area check for the register area based on the transmission data storage register type and number and if an error is found it returns an error Status Boundary error TermSTS 0AH e Ifa close request from the remote port TCP socket has arrived while a connection is established and the user program issues a send request the Ethernet Port returns the following error Status Transmission error TermSTS OBH Detailed information Unopened 0081H Verify the socket status see sectio
69. cal shock Do not continue to use the module if it emits smoke or unusual odors or if itis in an abnormal state of any type Using the module in an abnormal state can lead to malfunctions breakdowns and electrical shock In such cases immediately turn of all power and contact your local Toshiba dealer or service representative Customers should never attempt repairs or modifications to this equipment themselves repair and modification operations are extremely dangerous ST Op TOSHIBA Appendix 2 Request Code Table 6F3B0362 This table lists the request codes CMD used with SEND RECV instructions sent to the Ethernet Port Refer to the section item indicated in the reference column in the table for detailed explanations of the request codes Request Reset request Parameter setup request Sets up the Ethernet P ort parameters SEND Operating mode control request Remote port verification request RAS information readout request Time set request Register read request PC link function Register write request PC link function Remote port loopback request UDP open request UDP send request UDP receive request UDP close request TCP open request TCP send request TCP receive request TCP close request Table A 2 Instructions Requests to the Ethernet Port Function Instruction CMD Class Resets the Ethernet Port SEND 0011H 1 0013H 1 Verifies the existence of another port on the
70. ception data word count setup 00004 MOV RW007 02500 MOV RW008 18000 MOV RW009 Reception data storage register type storage register number timeout time setup RW000 RECV RW010 RST R0621 Turn R0621 off after request setup and completion 115 TOSHIBA 6F3B0362 TCP sockets This is a sample program that issues the requests used with TCP sockets It assumes that the parameter set up and operating mode control requests run mode socket interface transmission enable have already completed a TCP open request passive This program issues a TCP open request passive for socket number 8 on the Ethernet Port This ladder program is executed by turning on the A contact on the R0630 Parameters 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 12544 MOV RWO00 00053 MOV RW001 Module designation CMD number setup 00008 MOV RW002 00002 MOV RW003 Socket identifier open type setup 0341995909 DMOV RWO05eRW004 04000 MOV RWOO06 Remote port IP address and port number setup 04000 MOV RW007 18000 MOV RW008 Local port number timeout time setup RW000 SEND RW010 RST R0630 Tur
71. check error 0050 ROM BCC check found a discrepancy 0160 System RAM area check error 0260 T2N interface buffer check error 0360 nr f TOSHIBA 6F3B0362 The EACC LED indicates when the T2N is accessing the Ethernet Port LED display EACC Access Table 8 3 States Indicated by the EACC LED State Indicates whether or not the T2N is accessing the Ethernet P ort e Lit nn The T2N is accessing the Ethernet Port e Off The T2N is not accessing the Ethernet P ort e Lights after Ethernet P ort 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 determine the location of the fault using and to minimize the time required for recovery 142 TOSHIBA 6F3B0362 8 2 Status error status The status indicates the status during SEND RECV instruction execution or after execution completes If a SEND RECV instruction does not complete normally refer to the detailed information Ethernet Port error response and the status and review the instruction word format at the T2N and Ethernet Port states operating modes The detailed information is stored in the register following the completion status when the completion s
72. cified 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 than 3 is specified for the module ID e Occurs if a value other than 1 2 3 or 4 is specified for the channel number Occurs if a command number other than one of the following is specified for a SEND instruction 000FH 0011H 0014H 0018H 0021H 0031H 0032H 0034H 0035H 0037H 0039H Occurs ifa command number other than one of the following is specified for a RECV instruction 0015H 0021H 0033H 0038H Occurs if a value other than 1 to 8 is specified for the socket identifier See section 6 4 Using the Ethernet P ort Socket Interface e Occurs if an incorrect parameter is specified in a RAS information readout request See section 7 6 RAS Information Readout 172 TOSHIBA 6F3B0362 Table A 4 TermSTS Part 2 04H Memory write protect Occurs if an attempt to write is made when the remote registers were write protected e Occurs if an attempt to read is made when the local registers were write protected 05H Reserved 06H e Occurs if the Ethernet Portis down e Occurs if the Ethernet Port is initializing Transmission complete e Occurs if a T2N internal timer times out Request
73. cute a UDP send request CMD 0032H Hold the input of function block in the on state until the SEND instruction completes Instruction completion Verify the status An error occurred in transmission processing Transmission from the specified socket is not possible Handle the error according to the completion and socket status Normal complete Terminate UDP transmission processing 89 TOSHIBA 6F3B0362 UDP receive request broadcast receive request using the RECV instruction a Function If an opened UDP socket receives data read the received data into registers on the local port If no data has been received wait until data arrives the wait time can be set and then after reception read the received data into the local port registers Reception data size 1 to 1000 words b Transfer parameters A Module designation A 1 Command number A 2 Socket identifier 1 to 8 A 3 Transmission destination IP address A 4 The input format is the same as that for the parameter Setup request A 5 Transmission source object socket UDP port number A 6 Reception data length 1 to 1000 words A 7 DRID Reception data storage register type code A 8 Reception data storage register number A 9 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 i
74. d The data is not retained in the Ethernet Port either e Important items e An error is returned if a receive request is issued for a socket that is not yet opened Status Transmission error TermSTS OBH Detailed information Unopened 0081H e An error is returned if a value other than 1 to 8 is specified as the socket identifier Status Transmission error TermSTS OBH Detailed information Illegal socket identifier 0082H e 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 e Values in the range 1024 to 65535 can be specified as the object socket UDP port number for the transmission source An error will be returned if a value outside that range is specified Status Transmission error TermSTS OBH Detailed information Port number error 0071H e An error will be returned if a value of 0 words or 1001 or more words is specified as the reception data size Status Transmission word count error TermSTS 09H e An error will be returned if the reception timeout time is exceeded Status Transmission error TermSTS OBH Detailed information Timeout 0020H e Allocate a reception data storage register area with a size equal to the size of the transmission data plus one word The size of the transmission data for the single operation and the size of reception data will be stored in this area 9 TOSHIBA 6F3B0362
75. d be used Note that these cables should not be laid adjacent to cables carrying high currents 2 Lay cables in gaps in the walls so that they will not be damaged and run cables under the flooring under equipment so that electromagnetic interference will not occur 3 Observe the applicable cable separation standards when running cables in parallel with when crossing or when approaching low voltage indoor power lines 4 Fasten cables every 3 meters so that the cables are not damaged when attaching cables to walls to position the away from the floor or when running cables vertically 5 When bending cables be sure that the radius of curvature of the bend does not exceed the bending limit for the cable used c Notes on piped cabling 1 Do not run coaxial cable 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 coaxial cable should be separated by at least 2 meters from power lines and equipment that generates electric or magnetic fields If it is difficult to achieve a separation of 2 meters look up the actual voltage and current of the induction source in the table below
76. d information Only valid when TermSTS OBH d Important items e 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 TermSTS 06H e An error occurs if a UDP port number is set to a value outside the range 1024 to 65535 Status Transmission error TermSTS OBH Detailed information Port number error 0071H e Sample program This sample ladder program issues a parameter setup request to the channel 1 Ethernet Port eV TOSHIBA 6F3B0362 This program is executed by turning on the R0502 A contact Parameters 12544 3100H 00018 0012H 29061 7185H 02658 0A62H Parameter setup request 12544 MOV RWO00 00018 MOV RW001 Designates the module and sets the CMD number 29061 MOV RWO002 02658 MOV RWOO3 01025 MOV RWO04 Sets the IP address Port number RWO00 SEND RWO10 RST R0502 Sets the request eS TOSHIBA 6F3B0362 4 5 Operating Mode Control Requests This section describes the Ethernet Port operating modes and the procedures for controlling the Ethernet Port operating mode from user programs on the T2N The Ethernet Port has the following operating modes 1 Initialization mode e This mode indicates that the Ethernet Port is executing reset processing e If reset processing completes normally the Ethernet Port sw
77. d then perform the required error handling 101 TOSHIBA 6F3B0362 e The Ethernet Port uses a priority ordering in processing sockets 1 through 8 Therefore systems constructed so that socket 1 is activated frequently 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 least 50 ms times the number of sockets used between each request Interval between requests to the same socket gt Number of sockets used x 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 gt Number of remote ports x 50 ms 102 TOSHIBA 6F3B0362 e TCP transmission processing example Ladder program flowchart Error result TCP transmission processing start The processing in this section can be Socket status read verify performed at this stage or at the point the instruction terminates abnormally A connection has not been established with Are bits B and F both 1 the specified TCP socket Open processing Is a connection established is required
78. d with the remote destination can be specified for each socket User programs on the T2N use the SEND and RECV instructions to use the socket interface TCP IP Transmission Control Protocol Internet Protocol UDP IP User Datagram Protocol Internet Protocol Figure 6 1 shows the positioning of the socket interface EWS T2N T2N user program ae System T SEND and RECV calls f instructions BKT T2N firmware Socket interface UDP TCP UDP TCP l CSMA CD CSMA CD Data communication TCP or UDP Figure 6 1 Positioning of the Socket Interface TOSHIBA 6F3B0362 2 Differences between the UDP socket interface and the TCP socket interface a UDP socket interface See figure 6 2 e Provides an in out port socket for data communication between a transmission source port and a transmission destination port e Data for the transmission source and transmission destination IP addresses and port numbers is specified in the send receive data e Since the transmission source and transmission destination are specified in each data item a UDP socket can communicate with multiple remote UDP sockets e 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 implemented by user programs Transmis
79. designation The Ethernet Port must specify HOOFE RWO10 Specifies the start address of the socket status information If 03907 OF4BH is specified the socket status information for socket 1 will be read out RWO11 Specifies the number of words 00005 to be read out D1000 Specifies the starting address of the area to hold the read out socket status information In this case the read out downloaded information is stored at locations D1000 to D1004 Setting R0000 to 1 will store the socket status information for socket 1 at locations D1000 to D1004 TOSHIBA 6F3B0362 6 4 Using the Ethernet Port Socket Interface This section describes the requests used by T2N user programs to use UDP and TCP sockets There are eight types of request as listed below e UDP socket open request send request receive request close request e TCP socket open request send request receive request close request UDP open request using the SEND instruction a Function This request opens any of the eight sockets Transmission protocol UDP IP b Transfer parameters A 3100H Module designation A 1 CMD 0031H Command number A 2 SportNO Socket identifier 1 to 8 A 3 UDP_PORTNO Local port specified socket UDP port number 1024 to 65535 c Status See figure 4 3 for details on bits C D E and F F E D C BA 9 8 7 6 5 4 3 2 1 0 B Sporto TemsTs B 1 Detailed information Only valid w
80. e 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 12544 MOV RW000 00049 MOV RW001 Module designation CMD number setup 00002 MOV RW002 04000 MOV RW003 Socket identifier UDP port number setup RW000 SEND RW010 RST R0620 Turn R0620 off after request setup and completion ee TOSHIBA 6F3B0362 b UDP close request This program issues a UDP close request for socket number 2 on the Ethernet Port This ladder 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 12544 MOV RWO00 00052 MOV RW001 Module designation CMD number setup 00002 MOV RW002 Socket identifier setup RW000 RECV RWO10 RST R0623 Turn R0623 off after request setup and completion ug TOSHIBA 6F3B0362 c UDP send request This program issues a UDP send request for socket number 2 on the Ethernet Port This ladder program is executed by turning on the A contact on the R0622 Parameters 12544 3100H 00050 0032H 0341995909 14627185H Transmission destination IP address 133 113 98 20 Transmission destination object socket UDP port number 3000 Transmission data word count 1000 Transmi
81. e are separate send and Yes receive ports that each have their own message transmission UDP port number Is the transmission destination IP address set to that of the slave Ethernet Port 1 Recheck the slave port IP address and message Does a response come back if a transmission UDP port numbers ping is issued Dae slave Ethernet 2 Verify that there is no router on the network i 3 Check the network verification items Is the error counter read out from the RAS information constant i e It is possible that there is an abnormality on the not being incremented network itself Check the network verification items Use RAS information readout to determine this RAS error counters Alignment error Short packet CRC error 153 TOSHIBA 6F3B0362 b Ethernet Port side slave port Is the station status such that run Set the Ethernet Port to run message message transmission is enabled transmission enabled using an operating mode control request Does a response come back if a 1 Check the main port side IP address ping is issued to the main Ethernet 2 Verify that there is no router on the network Port 3 Check the network verification items Is the error counter read out from the RAS information constant i e It is possible that there is an abnormality on the not being incremented network itself Check the network verification Use RAS information readout to
82. e read out RAS information is stored in the specified register area as shown below RAS information lt Specified register start address word count RAS information A register area whose size is the size of the read out RAS information plus one word must be allocated e A boundary error TermSTS OAH 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 e A parameter error TermSTS 03H occurs on any of the following transfer parameter settings e Ifthe RAS request type Kind is out of range a value other than 1 to 5 e Ifthe start position Start is out of range a value of 4 or larger for MIB information e Ifthe start position Start is out of range a value of 161 or larger for event trace information e Ifthe read count ReadCnt is out of range a value of 31 or larger for event trace information 133 TOSHIBA 6F3B0362 e Sample program This sample ladder program issues a RAS information readout to the Ethernet Port This program is executed by turning on the R0505 A contact Parameters 12544 3100H 00021 0015H RAS storage registers Starting at D0000 RAS request type 12544 00004 recent data RAS information readout OV RWO00 00021 MOV RW001 Designates the module and sets the CMD number OV RWO02 00000 MOV RWO003 Sets the RAS
83. e request first the Ethernet Port waits 10 seconds If the T2N using the same port number reopen request during waiting for 10 seconds the T2N becomes LAN controller driver error h Ifa close request comes from the remote port TCP socket while a connection is established the local port must also close the socket As a technique for checking for the reception of close requests from the remote TCP socket user programs should monitor the RCLOSE and CONN bits in the socket status See section 6 3 RCLOSE is set to 1 and CONN is set to 0 when a close request is received from the remote TCP socket The Ethernet Port will return an error if send or receive requests are issued in this state receive request in the receive wait state also returns an error i The Ethernet Port in the current state does not support a keep alive function for TCP connections Verification from the Ethernet Port side to other ports is not performed However the Ethernet Port does respond to verifications from other ports Responding to verifications from other ports is performed independently of user programs Therefore the disappearance of remote ports cannot be detected at the TCP level We recommend using the detection techniques described in items j and k below to detect this condition Keep alive function A function that checks at the TCP protocol level whether or not the connection is operating normally if there has been no activity over the connecti
84. e socket interface transmission prohibited state Occurs when there is a format error in the request text Port number error Request ime setting Year ime setting Month ime setting Day ime setting Hour ime setting Minute ime setting Second code error FEE Occurs if an open request is issued for an already open socket Occurs if send receive or close request is issued for an unopened socket Occurs if the socket identifier is out of range 1 to 8 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 standby request is issued in standby mode Occurs if a run request and a standby request are issued at the same time Occurs if the setting of the local port IP address and port number in the area reserved for transmission fails Error in the TCP or UDP protocol such as a transmission phase error Occurs if the setting of the remote port IP address in the remote port information area the NETDATA table fails Occurs if the remote port IP address network address differs from the local port IP address network address Occurs if the Ethernet Port internal OS fails to allocate memory Occurs if computer link or PC link socket identifier acquisition fails If the remote destination was specified to be broadcast in a remote port verification request BCC error Occurs if an error occurs after addr
85. e upper limit of the fragment size is 1460 bytes This is the limit of the length of packets data units flowing on the network transmitted over the network 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 7 can occur The largest segment size that can be received in this case is 1460 bytes The sending T2N user program requests a transmission of 2000 bytes The transmitted data is divided into two units called segments A with 1460 bytes and B with 540 bytes by the send side Ethernet Port A and 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 arrives at the Ethernet Port e If data has not yet arrived at the receive side Ethernet Port when the receive request is issued When segment A arrives at the Ethernet Port only segment A will be passed to the requester e If only segment A has arrived at the receive side Ethernet Port when the receive request is issued Only segment A will be passed to the requester e If segments A and B have
86. ed the specified socket goes to the active open wait state If the DIPAddress and DTCP PORTNO values are set to 0 the socket is set to the state in which a particular remote port is not specified In this state the socket can handle an active open from any other i e any remote port on the network e A connection is established by an active open from another socket applied to a socket in the passive open state A connection cannot be established by a passive open from another socket applied to a socket in the passive open state Similarly a connection cannot be established by an active open from another socket applied to a socket in the active open state e Fora socket in the passive open state it is not possible to open multiple connections from other ports by issuing multiple active opens TOSHIBA 6F3B0362 e TCP open processing example Ladder program flowchart Error result TCP open processing start Socket status read verify Are bits C and D both 0 Closed state Yes The specified socket is already open active or passive Execute a TCP open request CMD 0035H Active or passive open Hold the input of function block in the on state until the SEND instruction completes Instruction completion Verify the status Did the operation complete before being timed out Connection could not be established within the time limit An error occurred during open p
87. ed data A and B recovering the original data 5 The data is accepted by a receive request from the receive side T2N for 2000 bytes of data and the data is stored in the specified register See section 6 4 3 In the UDP socket interface after the transmitted data is reassembled to the original data it is passed to the user program and stored in the specified register The fragments A and B are reassembled to the original data by UDP IP processing O Send request 2000 bytes 6F3B0362 Send side T2N Ethernet Port Network Ethernet Port Receive side T2N 1472 bytes Receive request A lt lt 2000 bytes Sag byos ecsive _responsef Figure 6 5 Transmission Data Fragmentation in the UDP Socket Interface TOSHIBA 6F3B0362 e The T2N receives the data which specifies the size of reception data in the transfer parameter from the Ethernet Port f Allocate an area one word larger than the transmitted data size as the T2N register area that will hold the received data As the result of a receive request information 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 opera
88. en close send or receive request is issued by the T2N in run mode in the socket interface transmission prohibited state Format error 0070H Occurs when there is a format error in the request text 071H Port number error E 0072H Request code error Time setting Y ear Time setting Month 0075H Time setting Day Time setting Hour Time setting Minute 0078H Time setting Second Opened 080H Occurs if an open request is issued for an already open socket Unopened Occurs if send receive or close request is issued for an unopened socket e Occurs if send receive request is issued for TCP socket during receiving CLOSE request RCLOSE bitis 1 Incorrect socket identifier 0082H Occurs if the socket identifier is out of range 1 to 8 Incorrect control request Occurs if a request that was prohibited by an operating mode control request is Specification issued Occurs if a run request is issued in run mode Occurs ifa standby request is issued in standby mode Occurs if a run request and a standby request are issued at the same time LAN controller driver error 0090H Occurs if the setting of the local port IP address and port number in the area reserved for transmission fails Error in the TCP or UDP protocol such as a transmission phase error e Occurs if send request is issued for TCP socket that remote port is down and NOACK bitis 1 0092H Occurs if the setting of the remote port IP addre
89. ense eeeeeeeeneaeaeeeaeaes 10 EEE EEE tre enters 14 1 1 System Configuration Using the Ethernet Port arrrorarannrnrvanarerennnnrnrnene 14 1 2 LAN Standards and Terminology cccccecececeececeeeeeeeeeeeeeeeeeeeneeeaee ees 15 ge Sel Oo tein cena utr RE OTEA 16 Eee a css ee ae ee 21 15 Sotware ER pebeeiawnsiieeesapendananauen 22 2 PU235N 245N Parts and Functions cjisiicsisceenssvecsanvequseedesandesdbixinaedeicebonsnees 24 RN ENE aon ete 24 2 2 GO Se RER NENE S EERE R EEE 25 3 Preparing for Operation Hardware ccccececeee ce ee sees eee ee eeeeeeeenens 26 3 1 Connecting to the Network 0 00 0 cece cece ec ee ec ee cece ee ea eee eeeceeaesenenenenenenaes 27 E S ean 28 4 Preparing for Operation Software rarraravararnrnrnrnenanarernevevenersnsnnnn 31 4 J cthemer Port SOP Flowchart SoftWare nccsncancssienesgeanddepecesucadacgaenasouescaanes 31 2 Ehemet Port InSuucuon SPECNCSUDNS xc5ccvsussscaeve sears desdcewveervecasbeacoaeicensin 32 FEE OV EEE EE RASENE 39 4 4 Parameter Setup Request rarananaranrnnnrannvenaranennnrsnnnenenenesennsrnnnnene 41 15 Operating Moce GRASS aici stecsacen cose enavardecsunncnnnonensvesasaterasinns 46 5 Computer Link Protocol and the PC Link Protocol Transmission 42 50 51 Computer AN acccccinvinanveasnisvasiennsneeneaveesasarncesecneds 50 5 2 Sample Computer Link Protocol Progra uu uvvsrseneuesremiusrrarrnserves 51 5 3 P
90. eption data is no limit So if the T2N does not receive the reception data in the socket the common transfer reception buffer may become full In this case new incoming data will be discarded and the T2N can not transmit data either the send request is insufficient resources error To avoid this state user programs should either continuously issue receive requests and readout any data in the reception buffer or else monitor the socket status See section 6 3 for the presence of reception data and perform reception processing as required If the insufficient resources error to not receive data occurs it is possible to cancel that the socket the reception data becomes full is closed f Since Ethernet Port receive requests both TCP and UDP put the object socket in a wait state waiting for data from the remote port transmission over that socket is not possible If full duplex communication with the remote port is required set up two sockets one for transmission and one for reception g There are a total of eight requests used for socket interface transmission Of those the T2N waits internally for completion for the timeout time for five requests namely e UDP open send and close requests e TCP send and close requests JB TOSHIBA 6F3B0362 If the timeout time expires the transmission complete timeout no instruction response error is issued Since this error has the same code as module failure errors first check whethe
91. er sockets unless that connection is first released e Since sockets are connected by connections there is no need to specify the transmission source or transmission destination with every data item transmitted Transmission source port Transmission destination port TCP socket TCP socket Connection A Transmission data i Client side gt Server side Active open Passive open Reception verification Figure 6 3 TCP Socket Connection 70 TOSHIBA 6F3B0362 Client side Server side Active open Passive open Closed state Closed state Connection establishment request Active open Connection established Connection established Data transmission Data transmission Acknowledge response ACK Next data transmission Data reception n Next data transmission Data transmission Data transmission Acknowledge response ACK Data reception Data transmission Next data transmission Acknowledge response ACK Data reception Next data transmission Close request Close request Close request Close request Gl sed state u scasesucdcaee pana tebe EAP SOEP Closed state Figure 6 4 TCP Connection Communication Procedure Overview 71 TOSHIBA 6 2 Ethernet Port Socket Interface Usage Notes This section presents points that require attention when using the socket in
92. erface 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 broadcast non multicast packets transferred upstream MIB_IF 6 Number of broadcast multicast packets transferred upstream MIB_IF 7 Number of packets discarded due to reception resource limitation MIB_IF 8 Number of packets discarded due to format errors MIB_IF 9 Number of packets sent to an undefined protocol MIB_IF 10 Total number of octets sent by the interface MIB_IF 11 Number of packets from upstream that were not broadcast or multicast packets MIB_IF 12 Number of packets from upstream that were broadcast or multicast packets Packet A unit of data flowing on the transmission path See figure 7 1 135 TOSHIBA 6F3B0362 3 MIB information MIB IP IP protocol information Symbol MIB IP 0 MIB IP 1 MIB IP 2 MIB_IP 3 MIB IP 4 MIB IP 5 MIB IP 6 MIB IP 7 MIB IP 8 MIB IP 9 MIB IP 10 MIB IP 11 MIB IP 12 MIB IP 13 MIB IP 14 MIB IP 15 MIB IP 16 IP datagram IP fragment Reassembly Reads out 17 words of data using RAS information readout Table 7 4 MIB IP Description Indicate IP gateway in action or not action Default TTL Time to Live of IP packet Total number of IP datagrams received from the interface Number of IP datagrams discarded due to format errors
93. eset the system from a user program after resolving the error in the down Ethernet P ort b Special registers T2N read 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 CBA 9 8 7 6 5 4 3 2 1 0 DOWN STBY MTEN TEST INZ RUN STEN Bit F DOWN down rernnrenrvrrnrnvrennvrenrererensernen Down mode 0 Other than down mode e Bit E INZ initialization sorrrrronrrrrronnrrrrrennnnnn Initialization in progress 0 Initialization completed e Bit D STBY standby oronornrrvrnvnnrnrrrrvrnnvrenernn Standby mode 0 Other than standby mode Run mode 0 Other than run mode Enabled 0 Prohibited BE Ce RUN Gu Re ERR Sees e Bit 5 MTEN Message transmission e Bit 4 STEN socket interface transmission 1 Enabled 0 Prohibited Bit O TEST test rone iea eE Test function execution in progress up TOSHIBA 6F3B0362 d Operation mode and station status of Ethernet Port Each bit of station status has the following mean If you want to judge the mode initialize mode 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 comple
94. ess saving on a MAC setup request Occurs if there are insufficient resources for UDP send or PC link transmission ee ee TOSHIBA 6F3B0362 Appendix 4 Limitations on the T2N SEND and RECV Instructions When transmissions using the Ethernet Port occur with high frequency the T2N internal processing load increases and it is possible for this to interfere with the T2N periodic interrupts and other internal operations For example the T2N processing load increase greatly when requests from other ports and requests from the local port occur at the same time in a single Ethernet Port Therefore the Ethernet Port must be used with the following limitations enforced Usage Recommendations When using the SEND and RECV instructions there are limitations on the interrupt periods that can be Set the fixed period interrupt programs 1 When using the PC link protocol with the Ethernet Port The number of words that can be set for the SEND and RECV instructions is stipulated to be either e The number of words that the local port transmitted with the SEND instruction or e 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 other number of words are transmitted due to a RECV instruction request from a remote we focus on the larger of the two word counts when t
95. ess that specifies a particular port on that network The same network address must be assigned to all ports on the same i e any given network An IP address is a 32 bit data 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 not support them Figure 4 4 shows the classes A though C 0 8 16 24 31 Classa o Network 7 Hosti 24bits T 127 values networks T 16 777 214 values hosts ClassB 4 0 Network 14 bits Host 16 bits T 16384 values networks T 65534 values hosts Classc 1 1 0 Network 21 bits Host 8 bits T 2 097 152 values networks T 254 values hosts Figure 4 4 IP Address Class Divisions In this system networks with a large number of connected ports use class A addresses and networks with s small number of connected ports use class C addresses Class B addresses are used for networks that fall between classes A and C Expressed in decimal the first byte of the class A through C networks will be 0 to 127 for class A 128 to 191 for class B and 192 to 223 for class C b IP address acquisition Taking future uses into account we strongly recommend acq
96. from a T2N including the instruction request format important items that require attention and sample programs That chapter also presents items considered necessary when using the Ethernet Port Make a point of understanding the content of chapter 4 thoroughly before writing programs 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 This chapter describes the functions and positioning of the socket interface and the differences between the UDP socket interface and the TCP socket interface Next this chapter presents notes on using the Ethernet Port socket interface and describes the procedures for using this functionality 6 1 Overview This section describes the functions and positioning of the socket interface and the differences between the UDP socket interface and the TCP socket interface 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 interface can be used for communication between host application programs and user programs running on the T2N The Ethernet Port socket interface provides eight sockets and the communication protocol TCP IP or UDP IP use
97. general specifications of the Ethernet Port conform to those of the T2N main unit Table 1 2 Functional Specifications Item Specification Module type PU235N 245N Ethernet Portis builtin Transmission NM 10BASE T specifications CSMA CD Modulation Baseband Transmission topology Bus type 10 Mbps Maximum distance between 200 m Case of single HUB 1700 m Case of four HUB 100 m Between port and HUB single port per segment None 8 pin modular connector RJ 45 Connecting cable Unshield twisted pair Transmission services 1 T series computer link protocol slave port T series PC link protocol Socket interface 8 sockets PC gateway function currently unsupported Self diagnostics at power on ROM RAM LAN controller EEPROM T2N interface buffer memory MAC address 2 Test functions accessible from user programs e Remote port verification request e Remote port loopback test Between T2N and T2N T3H systems 3 Data provided by RAS data readout e Event trace LAN controller network information Protocol state 4 Time date setup function 5 Station status in the T2N special registers SW 6 Socket information in the T2N interface buffer Re e Ww Pp RAS functions Consumed current A 0 6A 5V DC External dimensions mm 99 0 W x122 H Weight grams 200 Mounting method Built in T2N Number of modules mountable 1 modules per T2N Access method SEND RECV instructions module control and transmis
98. gister data from the local T2N to registers in remote SEND PC link function T2N Remote port loopback Performs a loopback operation with another Ethernet Porton the SEND request network UDP open request Opens a socket interface UDP un lt J IJ m m UDP send request Sends data from a socket interface in the UDP open state UDP receive request Reads data received by a socket interface in the UDP open state REC UDP close request Closes terminates a socket interface in the UDP open state E wn J CMD command number Indicates the request type to the Ethernet Port CMD 0011H 0012H 0013H 0014H 0015H 0018H 0021H 0021H 000FH 0031H 0032H 0033H 0034H 6F3B0362 JE JIN TOSHIBA Table 4 2 Instructions Requests to the Ethernet Port Part 2 Request TCP open request Opens a socket interface TCP SEND TCP send request Sends data from a socket interface in the TCP open state SEND TCP receive request Reads data received by a socket interface in the TCP open RECV State TCP close request Closes terminates a socket interface in the TCP open state SEND CMD command number Indicates the request type to the Ethernet Port lt Important items gt f Items O to Q are CMD classes Class O is Ethernet Port control is PC link protocol transmission and is socket interface transmission e Fora single Ethernet Port it is not possible to request a
99. go to the wait state a r ee There are eight sockets and each can independently accept and execute a class 3 instruction TOSHIBA 6F3B0362 Appendix 3 Status Table Figure a 1 lists the completion status and detailed information stored in the specified registers during SEND RECV instruction execution or at instruction completion Tables A 3 and A 4 list the contents of the TermSTS completion status and table A 5 lists the contents of the detailed information the Ethernet Port error response loaded into the next register after the register used for the completion status F ED CBA 98 7 6 5 4 3 2 1 0 Sport NO TermSTS Only on an error 0 Error occurred at local port 1 Error occurred at remote port Socket identifier Only valid for socket interface transmission instructions 0 for other instructions status 0 Initial state busy 0 Initial state 1 While send requesting 1 Transmission port busy 2 Send complete and while abn 0 Normal complete waiting response 1 Error complete 3 Complete Figure A 1 Status Structure Table A 3 TermSTS Part 1 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 e Ina register read or write request the request spe
100. han 1 to 8 is specified for the socket identifier See section 6 4 Using the Ethernet Port Socket Interface e Occurs if an incorrect parameter is specified in a RAS information readout request See section 7 6 RAS Information Readout 04H Memory write protect Occurs if an attempt to write is made when the remote registers were write protected Occurs if an attempt to read is made when the local registers were write protected 05H Reserved 06H Module error e Occurs if the Ethernet Port is down Initialization in progress Occurs if the Ethernet Port is initializing Transmission complete Occurs ifa T2N internal timer times out timeout 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 e 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 Occurs if either 0 words or 486 or more words were specified for either a count register read write or a remote port loopback request Occurs if either 0 words or 1001 or more words were specified fora UDC TCP send receive request OAH 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
101. han a stipulated value is specified for the register type codes SRID DRID e A register specification error TermSTS 01H occurs if 0007H the T register is specified for the send data storage register type code and a register other than the T register is specified for the loopback data storage register type code This also holds for the C register e A boundary error TermSTS OAH occurs if a range spanning both the base T registers 0 to 511 and the expansion T registers 512 to 999 is specified for the T register 4128 TOSHIBA 6F3B0362 e For data storage registers a boundary error TermSTS OAH occurs if the specified area start register register range does not exist in the local port e A response timeout error TermSTS 02H occurs if the loopback response time exceeds the time specified by the timer counter value e Ifthe local port registers are write protected by setting the special coil the memory write protected status TermSTS 04H is returned F 9 8 7 6 5 4 3 2 1 0 JTT bwet F p kwew pwr Write protected Special registers DE E Input output registers Counter registers Link registers Timer registers Link relay registers PC internal file registers Auxiliary registers Expansion file registers IC card Data registers e Sample program This sample ladder program issues a remote port loopback request to the Ethernet Port This program is executed by turning on the R0092 A point A use
102. hat transmission is being performed correctly by receiving that data looped back from the remote port The T2N OS creates the test data b Transfer parameters A Module designation A CMD number A 2 Loopback data length 1 to 485 words A 3 Send data storage register type code A 4 Send data storage register number A 5 Loopback data storage register type code PRI E A 6 Loopback data storage register number A 7 Timer count A 8 D IPAddress Loopback destination IP address A 9 The input procedure is the same as that for the parameter setup request A 10 D UDP PortNO Loopback destination message transmission UDP port number c Status See figure 4 3 for details on bits C D E and F E D C B A 9 6 5 4 3 2 1 0 B i ooo e B 1 Detailed information Only valid when TermSTS OBH d Important items e This request cannot be executed unless message transmission is enabled with an operating mode control request e In response to a request from a user program the T2N OS performs the processing using the Ethernet Port PC link protocol e User programs on the loopback destination do not take part in this operation e A user program must compare the transmitted and loopback data for equivalence e A transfer word count error TermSTS 09H occurs if the loopback data length exceeds the range 1 to 485 words or 1 to 323 words for the T and C registers e A register specification error TermSTS 01H occurs if a value other t
103. he Ethernet Port can be increased over the values listed in table A 7 If the number of words for S20LP PC link protocol transmission on the PU245N decreased on one word the number of words for Socket transmission on the Ethernet Port can increase in one word However the maximum number of words that can be specified during PC link transmission on the Ethernet Port is 1000 words With the computer link and loader not connected main base unit Figure A 4 T2N Configuration when Using the Socket Interface 177 TOSHIBA 6F3B0362 3 When using the PC link protocol and socket transmission TCP or UDP with the Ethernet Port Table A 8 Number of Words that can be Transmitted Using PC Link Protocol and TCP UDP Socket Transmission with the Ethernet Port with Ethernet Port When PC link transmission and TCP UDP socket transmission is used either Module classification Maximum specifiable number of transmission words instructions for local T2N SEND instructions remote T2N RECV instructions or socket transmission PU235N 1073 words maximum 858 words maximum 643 words maximum 728 vors rex 23 vors max PU245N 1038 words maximu nln an 3 Jaja 3 3 wn 3 3 823 words maximu G07 words maxinu 302 wards maxinu 177 word maxim Conditions for the above table wn 3 3 3 3 3 3 3 3 3 3 an 3 an 3 a For the T2N configuration this table assumes the configuration
104. he local port and writes it to the remote port s registers Next it reads out the same area and compares it with the data within the local port to check that the function succeeded This program assumes that the parameter setup request and the operating mode control request message transmission permission have already completed Local port IP address 133 113 98 10 85H 71H 62H OAH Local port message transmission UDP port number 2000 RW090 Execution count specification 1 to 32767 RWO0O91 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 Write time transfer destination register start number read time readout source register start number RW097 Read time storage register type RW098 Read time storage register start number W0991 W0990 Remote destination IP address 133 113 98 20 85H 71H 62H 14H W0992 Remote destination message transmission UDP port number 1025 This ladder program is executed by turn on the R0520 A contact ET TOSHIBA 6F3B0362 PC link preparation R0520 01000 MOV RW090 00000 MOV RW091 00400 MOV RW092 Number of executions Operation on error occurrence Transfer data length
105. hen TermSTS OBH SportNO Socket identifier 1 to 8 TermSTS See tables 4 3 and 4 4 Detail information See table 4 5 d Important items e After this request completes normally UDP send receive or close requests can be sent to the socket e An error is returned if an open request is issued for an already open socket Status Transmission error TermSTS OBH Detailed information Already open 0080H e An error is returned if a value other than 1 to 8 is specified as the socket identifier Status Transmission error TermSTS OBH Detailed information Illegal socket identifier 0082H e An error is returned if a value other than a local port specified socket UDP port number is specified Status Transmission error TermSTS OBH Detailed information Port number error 0071H 84 TOSHIBA 6F3B0362 Not only must the specified socket UDP port number on the local port not overlap with UDP port numbers used for message transmission and previously used UDP port numbers but it also must not overlap with any TCP port number An error will occur if the port number overlaps Status Transmission error TermSTS OBH 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
106. his will cause the SEND RECYV instruction to not complete When the number of SEND RECV instructions are used in the user program and their instructions are executed simultaneously separate the status and detailed information register every instruction Table 4 3 TermSTS Part 1 00H 01H 02H Normal complete 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 e Ina 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 Response timeout Occurs if a response is not received within the specified time for a remote port loopback or register read write request TOSHIBA 6F3B0362 Table 4 4 TermSTS Part 2 03H Parameter error Occurs if a value other than 3 is specified for the module ID Occurs if a value other than 1 is specified for the channel number Occurs if a command number other than one of the following is specified for a SEND instruction 000FH 0011H 0014H 0018H 0021H 0031H 0032H 0034H 0035H 0037H 0039H e Occurs if a command number other than one of the following is specified for a RECV instruction 0015H 0021H 0033H 0038H e Occurs if a value other t
107. iew of the structure of the transfer parameters Tables 4 1 and 4 2 list the requests that can be issued to an Ethernet Port A 3100H Module designation A 1 Command number Indicates the request type to the Ethernet Port A 2 Parameters Parameters This data differs depending on the type of A 3 the request to the Ethernet Port Module designation Designates the Ethernet Port mounted in the T2N 3 Module ID Must be set to 3 for an Ethernet Port 1 channel number Must be set to 1 for an Ethernet Port 00 station number This two digit field must be set to 00 lt Important items gt e Do not modify the contents of the transfer parameters while an instruction execution is in progress The SEND or RECV instruction may not complete Table 4 1 Instructions Requests to the Ethernet Port Part 1 Request Reset request Resets the Ethernet Port SEND Parameter setup Sets up the Ethernet P ort parameters SEND request Operating mode Sets the operating mode SEND control request Remote port Verifies the existence of another port on the network SEND verification request RAS information Reads out the Ethernet Port RAS information RECV readout request Time set request Sets the Ethernet Port internal clock SEND Time information for event trace RAS information Register read request Reads register data from remote T2N into registers in the local RECV PC link function T2N Register write request Writes re
108. if a standby request is issued in standby mode Occurs if a run request and a standby request are issued at the same time LAN controller driver error 0090H Occurs if the setting of the local port IP address and port number in the area reserved for transmission fails 0091H Error in the TCP or UDP protocol such as a transmission phase error 0092H Occurs if the setting of the remote port IP address in the remote port information area the NETDATA table fails Occurs if the remote port IP address network address differs from the local port IP address network address Memory pool allocation failure QOAOH Occurs if the Ethernet Port internal OS fails to allocate memory Port 2 task start failure 00A1H Occurs if computer link or PC link socket identifier acquisition fails Broadcast specification error 00A2H Occurs if the remote IP address is broadcast on a remote port verification request MAC address specification error 00BOH BCC error OB1H Occurs if an error occurs after address saving on a MAC setup request Insufficient resources error QOCOH Occurs if there are insufficient resources for UDP send or PC link transmission HE 145 TOSHIBA 6F3B0362 8 3 T2N Special Relays and Registers The Ethernet Port status information is reflected in the T2N special relays and special registers 1 Special relays Special relay Function S000B Ethernet P ort error 1 The installed Ethernet P ort unit is dow
109. ils complete Recovery 1 Verify that the inputs of function block are held in the on state until the instruction completes procedure 2 Determine whether the user program is writing to the status register while the instruction is executing 148 TOSHIBA 6F3B0362 4 Ifthe Ethernet Port fails to enter run mode This section assumes that the Ethernet Port has come up normally up to this point Note that the parameters must be set up with a parameter setup request before issuing the operating mode control request used to switch the Ethernet Port from standby mode to run mode a Parameter setup request Execute a parameter setup request that sets up Is the parameter setup request the IP address and the message transmission executed UDP port number Yes Verify the status using the procedure described in Does th SEND uden the item 3 If a SEND or RECV instruction fails complete complete on page 148 Yes Check the status and resolve the error To the operating mode control request flowchart 149 TOSHIBA 6F3B0362 b Operating mode control request START Is an operating mode control No request executed Yes Does the SEND instruction No complete Yes Have the parameters not been No set up yet Yes Check the status and resolve the error END Set up correct specification information and issue an operating mode control request Verify the
110. ing 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 such a location provide a MAU enclosure box and mount the MAU inside the box insulated from that box Be sure to ground the MAU enclosure box e Avoid locations with high temperature high humidity dust or oil mist when installing MAU cable 168 TOSHIBA 6F3B0362 Appendix 1 Maintenance and Inspection Periodic Inspection Check the following items periodically once every six months Also check these points if any surrounding conditions or any aspect of the environmental changes Inspection item Power supply systems T2N power supply MAU power supply Installation state Transmission cable connections Transmission cable wiring See section 9 4 Network Wiring Ambient conditions Table A 1 Periodic Inspection Items Measure the power supply voltage at the power supply terminals Check for loose screws at the power supply terminals Check for damage to the power supply cables Is the module firmly locked in There must be no place looseness or play 10BASE5 Are the AUI cables firmly locked in place 10BASE2 Are the coaxial cables firmly locked in place 10BASE T Are the
111. ions and in accordance with all applicable standards Installation and wiring should be performed by a qualified professional See the ISO IEC8802 3 standard for installation environment standards Usage Recommendations Do not exceed the maximum cable length 100 m in systems using 10BASE T A HUB and a twisted pair cable are required in systems configured using a 10BASE T network See section 3 2 Network Wiring Equipment These parts must be ordered separately if required er eee TOSHIBA 6F3B0362 3 2 Network Wiring Equipment This section describes the wiring and related equipment that makes up the network to which the Ethernet Port is connected Since the Ethernet Port conforms to the ISO 8802 3 IEEE 802 3 standard users should select equipment to be used in the network that 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 e Twisted pair cable Catalog no ECM 04 OC0OM Non Length 1 to 100 Manufacturer Showa Electric Wire amp Cable Co Ltd Enable cross cable ge Catalog no ETH 807B 8 ports ETH 707A 16 ports Manufacturer Showa Electric Wire amp Cable Co Ltd Enable cross cable TOSHIBA 6F3B0362 2 10BASE5 Ge Catalog no EEA 9202 CIM4TMJ x2 0
112. is performed by anyone other than an authorized Toshiba service representative 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 Do not continue to use the module if it emits smoke or unusual odors or if it is in an abnormal state of any type Using the module in an abnormal state can lead to malfunctions breakdowns and electrical shock In such cases immediately turn of all power and contact your local Toshiba dealer or service representative Customers should never attempt repairs or modifications to this equipment themselves repair and modification operations are extremely dangerous Appendix 1 Maintenance and Inspection TOSHIBA 6F3B0362 Usage Recommendations This section collects the knowledge and operations that should be known by all users of this equipment Read this section carefully in conjunction with the safety precautions thoroughly master knowledge of the equipment safety information and the items that require attention and use the equipment correctly e Support for 10BASE T network Usage Recommendations 1 Do not exceed the maximum cable length 100 m in systems using 10BASE T 1 3 Basic Functionality e Ethernet Port registration Usage Recommendations 1 Before performing the settings described in this chapter register the Ethernet Port as T2N 1 0 The I O type is ETHER PU235N
113. itches to standby mode e Ifreset processing exits with an error e g if a self test error occurs the Ethernet Port switches to down mode e During initialization the Ethernet Port cannot execute requests from T2N user programs 2 Standby mode e In this mode Ethernet Port parameter can set up e Ethernet Port parameters cannot be set up in any mode other than standby mode e 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 e In this mode the Ethernet Port can communicate with other ports e The Ethernet Port can be switched to standby mode by T2N user program instructions e Inrun mode transfers using computer link PC link protocol and transfers using the socket interface can be independently enabled or disabled 4 Down mode e This mode indicates that the Ethernet Port is in an unrecoverable error state e Once the Ethernet Port enters the down state it can only be restored by turning the power off power cycling and then on again e The details of the down mode state can be verified by reading the data in the T2N interface buffer memory See chapter 7 RAS Information Goa TOSHIBA 6F3B0362 Figure 4 6 shows the Ethernet Port mode transitions Power down Power applied Self check completes normally Initialization LL o Standby Reset request Power on off on cycle Standby request
114. items determine this Yes RAS error counters Alignment error Short packet CRC error END 154 TOSHIBA 6F3B0362 7 If transmission using UDP sockets fails a Open and close requests 7 7 Verify the status using the procedure described in Baie SEND stucen the item 3 If a SEND or RECV instruction fails complete complete on page 148 Yes Is th i hth Set the Ethernet Port to run socket Si ne status sient re transmission enabled using an operating mode socket transmission is enabled control request Yes Check the status and resolve the error 155 TOSHIBA 6F3B0362 b Send request START Does the SEND instruction No complete Yes Is the station status such that run No socket transmission is enabled Yes Is the transmission destination IP address set to that of the remote Ethernet Port No Yes Are the UDP ports on the local and No remote ports opened Yes Does the status indicate normal No completion Yes Does a response come back if a ping is issued to the remote No Ethernet Port Yes Is the error counter read out from the RAS information constant i e No not being incremented Use RAS information readout to determine this Yes END Verify the status using the procedure described in the item 3 If a SEND or RECV instruction fails complete on page 148 Set the Ethernet Port to run socket trans
115. k transmission refer to the value listed in table A 6 and if the PU245N is used only socket transmission on the Ethernet Port refer to the value listed table A 7 With the computer link and loader not connected main base unit Figure A 5 T2N Configuration when Using the PC Link Protocol 4178
116. le A 5 Detailed Information Ethernet Port Error Responses Error Code Normal complete 0001H Local port fault 0002H Local port standby 0003H Timeout 0020H Length error 0030H Port mode error 0040H MAC IP not set up 0050H Transmission prohibited state 0060H Format error 0070H 1 72 nN o o ojo I I o o ojo uj N A I I o o ojo AM UT I I 4 4 4 0077H Opened Unopened 0081H Incorrect socket identifier Incorrect control request 0083H specification LAN controller driver error 0091H 0092H E Memory pool allocation failure 00A0 Port 2 task start failure 00A1H Broadcast specification error 00A2H MAC address specification error 00BOH 0B1 Insufficient resources error 00C 0H o so I Description Request completed normally The local port is in down mode Data transmission in standby mode socket interface transmission or PC link protocol transmission was requested Timeout occurred during TCP open processing or receive processing or during UDP receive processing Incorrect send data length One of the following requests was issued in a mode other than standby mode a Parameter setup b MAC address setup c Reset Occurs if the MAC address or IP address is not set up Occurs ifa PC link request was issued from the T2N in run mode in the message transmission prohibited state Occurs if a socket open close send or receive request is issued by the T2N in run mode in th
117. lives could be endangered or in which large losses could occur should the PU235N 245N fail install safety equipment so that such catastrophes cannot occur 3 The PU235N 245N should only be installed wired used or maintained by persons who have a general knowledge of the handling of control equipment Electrical shock fires failures and malfunctions can occur if an PU235N 245N is handled incorrectly Persons whose knowledge of control and electrical equipment is inadequate should avoid installing wiring using or maintaining this equipment and should instead employ persons with the requisite specialized knowledge 4 This document and the related separate documentation is written for persons with a general knowledge of programmable controllers and control equipment If you have any questions about the contents of this documentation please feel free to contact you Toshiba representative TOSHIBA 6F3B0362 Safety Precautions continued Warning indications This instruction manual provides important information to allow these products to be used safely and correctly to prevent in advance dangers to people managing or using this equipment or other persons and to prevent in advance losses to property Be sure you thoroughly understand the displays and symbols described below and follow the cautionary items and warnings included in this document carefully Store this document carefully so that you can refer to it at any ti
118. mask the network address field and the subnetwork address field are set to 1 and the remaining field the subnet host address field is set to 0 Example When a subnetwork address field of 12 bits is used in a class A IP address 1111 1111 1111 1111 1111 0000 0000 0000 FFFFF000 N JN AIN J Network Subnetwork Host address address field address field field When a subnet mask is used all ports on the subnetwork must use the same subnet mask In the Ethernet Port the subnet mask cannot be set by the user The subnet masks with the network address field filled with ones for each class are generated automatically as shown in table 4 7 from the specified IP address Table 4 7 Relationship between the Local IP Address and the Generated Subnet Mask on the Ethernet Port class A 255 0 0 0 FF000000 class B 255 255 0 0 FFFF0000 class C 255 255 255 0 FFFFFF00 Usage Recommendations 1 The PU235N 245N does not allow the user to set the subnet mask Therefore the Ethernet P ort cannot be used in systems that operate a subnetwork D 9 TOSHIBA 6F3B0362 3 Portnumber An IP address identifies a particular port on a network However since on any given port there will be multiple applications using TCP IP or UDC IP to communicate with applications on other ports the question of to which application the data should be passed arises UDP ports have the role of acting as the point of contact between UDP and applications that
119. me even after you have read it Description of Safety Signs Safety sign A WARNING AX CAUTION Explanations of Safety Symbols Safety symbol Meaning Indicates a potentially hazardous situation which could result in death or serious injury if you do not follow the instructions Indicates a potentially hazardous situation which may result in minor or moderate injury and or property damage if you do not follow the instructions Meaning This means Hazard Alert or Beware of Hazard The exact nature of the hazard is shown in the triangle or described in text near the triangle This is a safety alert symbol indicating a potential hazard This symbol is used together with a signal word TOSHIBA 6F3B0362 Safety Precautions continued e Precautions for operation 1 Build emergency stop interlock and similar circuits outside the PU235N 245N Ifa breakdown or malfunction occurs 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 T2N User s Manual Hardware 3 Preparing for Operation Hardware 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 User s Manual Hardware Program Operation Manu
120. mission enabled using an operating mode control request Verify the remote Ethernet Port transmission destination IP address Open UDP ports on the local port and remote ports Resolve the problem by referring to the status 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 It is possible that there is an abnormality on the network itself Check the network verification items RAS error counters Alignment error Short packet CRC error 156 TOSHIBA 6F3B0362 c Receive request Verify the status using the No procedure described in the item gt 3 If a SEND or RECV instruction fails complete on Was the wait time set to unlimited page 148 Set the Ethernet Port to run i h th Syd ls tne Station AEE No gt socket transmission enabled run socket transmission is enabled Is the local port open Yes Resolve the problem by referring to the status No 3 Transmit a message at the remote port Verify the remote port IP address and UDP port number 1 Recheck the remote port IP address and Does a response come back message transmission UDP port numbers ifa pingis er the 2 Verify that there is no router on the network pe 3 Check the network verification items Did the instruction time out TermSTS 0BH Details
121. mp Cable Co Ltd Catalog no EE 8191 Manufacturer Showa Electric Wire amp Cable Co Ltd When installing a LOBASE5 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 ISO IEC 8802 3 standard for installation environment standards 30 TOSHIBA 6F3B0362 4 Preparing for Operation Software This section describes setting up the Ethernet Port software for operation 1 Chapter 4 presents information related to using the functions provided by the Ethernet Port from a T2N including the instruction request format important items that require attention and sample programs Make a point of understanding the content of chapter 4 thoroughly before writing programs 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 4 1 Ethernet Port Setup Flowchart Software This section presents the flowchart for Ethernet Port setup Start There are two ways to reset the Ethernet Port e Turn on the T2N power Reset the Ethernet Port e Apply the reset operation from a user program on the T2N For details on these reset operations see section 4 3 Ethernet Port C Reset The Ethernet Port parameters required for network transmission are set
122. n warning The T2N continues to operate 0 Reset the system from a user program after resolving the error in the down Ethernet P ort 2 Special registers Special registers Name SW063 CH1 station status 3 Station status format F E D C BA 9 8 7 6 5 4 3 2 1 0 DOWN STBY MTEN TEST INZ RUN STEN Bit F DOWN down errorenrrrrernrrenrvrenserrrennernee Down mode 0 Other than down mode e Bit E INZ initialization sorrrrronrrrrronnrrrrrrnnnnnn Initialization in progress 0 Initialization completed Standby mode 0 Other than standby mode e Bit D STBY standby eoronornrrvrnvnnrnrrvrrvrvrvrnrnenn Run mode 0 Other than run mode Enabled 0 Prohibited Bit C RUN run sssssereserrverevvrrvsvrrseserese e Bit 5 MTEN Message transmission e Bit 4 STEN socket interface transmission 1 Enabled 0 Prohibited Bit O TEST test 0 cece ccescceeseeeseeeceeteeeeseeeaes Test function execution in progress 146 TOSHIBA 6F3B0362 8 4 Socket Interface Information The information for the eight socket interface sockets held by the Ethernet Port can be read out with the T2N READ instruction See Section 6 3 Socket Interface Information The Ethernet Port holds five words of socket status information for each socket Remote port TCP UDP port number Remote port IP address TCP UD
123. n 6 3 RCLOSE and CONN bits and close the socket e With a connection established if a no response state from the remote port continues when data is sent and the Ethernet Port internal resend processing times out the timeout time is about 1 minute the NOACK bit in the socket status will 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 OBH 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 Ethernet Port When the number of send requests that can be stored is exceeded errors will be returned for that and all following send requests Status Transmission error TermSTS OBH Detailed information Timeout 0020H e One of the following problems may have occurred when there is no response from the remote port e The remote port may have gone down e Power may have been lost e The remote ports and or local port may have become disconnected from the network e Ifthe 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 an
124. n R0630 off after request setup and completion i TOSHIBA 6F3B0362 b TCP open request active This program issues a TCP open request active for socket number 8 on the Ethernet Port This ladder program is executed by turning on the A contact on the R0640 Parameters 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 active open request executed when R0640 is set on R0640 12544 MOV RWO00 00053 MOV RW001 Module designation CMD number setup 00002 MOV RW002 00001 MOV RW003 Socket identifier open type setup RW106 RW105 DMOV RWOO5SRWO04 RW107 MOV RW006 Remote port IP address and port number setup RW107 MOV RW007 18000 MOV RW008 Local port number timeout time setup RW000 SEND RW010 RST R0640 Turn R0640 off after request setup and completion ee FE TOSHIBA 6F3B0362 c TCP close request This program issues a TCP close request for socket number 8 on the Ethernet Port This ladder 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 12544 MOV RW000 00057 MOV RW001 Module designation CMD number setup 00008 MOV RW002
125. n a single operation Reception data storage register type code Type code for the register that stores the received data See Figure 5 1 Reception data storage register number Starting number of the registers that store the received Reception wait timeout time B 1 data Specified in 0 1 second units 1 to 65535 If zero is specified the system is set to an unlimited infinite wait state Status See figure 4 3 for details on bits C D E and F F E D C BA 9 8 7 6 5 4 3 2 1 0 Sporto TemsTs Detailed information Only valid when TermSTS OBH SportNO Socket identifier 1 to 8 TermSTS See tables 4 3 and 4 4 Detail information See table 4 5 TOSHIBA 6F3B0362 d Methods for storing reception data e Allocate a reception data storage register area with a size equal to the size of the reception data plus one word The reception data count the size of the transmission data for a single operation and the transmission data for a single operation will be stored in this area as shown in the figure Reception data count bytes Start of the specified register area Reception data storage register area Reception data e The T2N checks for register area allocation of the reception data size plus one word and returns an error if the register area does not exist Status Boundary error TermSTS 0AH In this case data is not transferred to the register area and the data is discarde
126. nabled using an operating mode control request Is the station status such that run socket transmission is enabled Was a TCP connection established Is the socket status RCLOSE bit Status Unopened TermSTS OBH details 0081H El sd Close the socket Status Protocol error TermSTS OBH details 0091H Does the status indicate a timeout error TermSTS 0BH Details 0020H No Check the status and resolve the error e Requests cannot be accepted due to network congestion Redesign the user program Transmission becomes impossible when the receive side user program accumulates data Check the receive side processing 1 Recheck the remote port IP address and message Does a response come back transmission TCP port numbers if a ping is issued to the 2 Verify that there is no router on the network remote port Tr lt 3 Check the network verification items Is the error counter read out from the RAS information constant i e not being incremented Use RAS information readout to determine this N It is possible that there is an abnormality on the 9 gt network itself Check the network verification items RAS error counters Alignment error Short packet CRC error 160 TOSHIBA 6F3B0362 d Receive request Verify the status using the procedure described in the item 3 If a SEND or RECV instruction fails
127. nd data from its own UDP socket to the Ethernet Port message transmission UDP socket When the T2N uses computer link protocol transmission it simply performs the e Parameter setup IP address and the UDP port number for message transmission and e Operating mode control message transmission permission that were described in an earlier chapter There is no need to create any special user programs on the T2N See the T Series Computer Link Operation Manual UM TS03 E008 for details on the functions specifications and usage of T series computer link protocol transmission Usage Recommendations Since UDP IP does not provide control functions to guaranteed communication reliability higher level protocols such as retry are required No processing is performed if a computer link protocol transmission message is received at any point other than a message transmission UDP socket TOSHIBA 5 2 Sample Computer Link Protocol Program 6F3B0362 This section presents a sample program that runs on the host computer a personal computer or workstation and that uses computer link protocol transmission This program issues a read write request for 32 words from the start of the T2N D registers Operating environment e Hardware Toshiba J 3100PV e Software 3Com Etherlink III 3C509 B PC NFS Pro 1 1 1 0 Microsoft VisualC 1 0 Transfer parameters e Local IP address e Local UDP port number 3001 e Remote I
128. ndsiz strlen csnd Set the send data length Snd sin_family AF_INET Snd sin_addr s_addr inet_addr DST_IP Set the remote IP address igs Snd sin_port htons DST_PORT Set the remote port number ta Send a register write request Br ists sendto Isdp csnd isndsiz 0 struct sockaddr amp Snd sizeof Snd if ists isndsiz If the send length was OK Set the SELECT argument memset amp ibits 0x00 sizeof fd_set Set the BIT initial value timeout tv_sec RECVTOUT Set the timeout time FD SET Isdp amp ibits BIT setup ists select 1 amp ibits 0 0 struct timeval amp timeout if ists gt 0 If normal return Register write response reception ists recvfrom Isdp crev sizeof crcv 0 Struct sockaddr amp Rcv amp ircvsiz Gh Casts SJ if crev 4 C amp amp crev 5 E crev 4 E amp amp crev 5 E return 1 Register write response error Register read request creation memset csnd 0x00 sizeof csnd memset crev 0x00 sizeof crev sprintf amp csnd 0 AOIDR Register read command setup Kl Set up the starting reg no Bip sprintf amp csnd strlen csnd s REG TYPE sprintf amp csnd strlen csnd J 04s REG ADR sprintf amp csnd strlen csnd I 55 TO
129. nother class CMD while a class CMD is executing This is also true for class CMDs If such a request is issued the status described in the following status information will be transmission port busy and the request will go to the wait state For a single Ethernet Port when requesting a class CMD it is not possible to request another class amp 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 Ifthe T2N switches from the run to the halt state and then back to the run state while an instruction is executing it is possible that the Ethernet Port could execute the request issued immediately prior to the halt state This section describes the handling required after returning to the run state e The T2N should always set the Ethernet Port to standby mode after the T2N returns to run mode See 4 5 Setting the Ethernet Port to standby mode causes all the requests issued to the Ethernet Port to be discarded computer link and PC link protocol transmissions to be stopped and the socket interface to be initialized i e set to the closed state Before setting the Ethernet Port to standby mode verify the operating mode See 4 5 with the Ethernet Port station status See section 7
130. oaxial cable a Only use this coaxial cable indoors Consult with a specialist contractor if coaxial cable must be routed outdoors b Connect terminators to both ends of the coaxial cable c Insulate all exposed metal parts other than the coaxial cable installation point from ground and other metal parts 10BASES Plugs adapters terminators 10BASE2 BNC plugs adapters terminators T connectors d For safety ground at a single point the coaxial cable s external conductor to a point with a resistance to ground of 100 or less Also prepare a dedicated network system ground that is not shared with other equipment e Contact the manufacturer of the cable with regard to the physical characteristics value of the coaxial cable allowable minimum bending radius f Avoid locations with high temperature high humidity dust or oil mist when installing coaxial cable P TOSHIBA 6F3B0362 5 Notes on laying and wiring AUI cable a When connecting the AUI cable to the MAU connectors use the slide latches to secure the connectors firmly b Contact the manufacturer of the cable with regard to the physical characteristics value of the AUI cable allowable minimum bending radius c Avoid locations with high temperature high humidity dust or oil mist when installing AUI cable Notes on MAU 10BASE5 installation a Attach MAUs at the 2 5 meter separated marks on the coaxial cable b Since the procedure for attach
131. of figure A 5 in which T2N PU235N 245N is mounted in the main base unit b Refer to the T2N User s Manual Hardware for the processing times for the instructions 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 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 words and during socket transmission on Ethernet Port is 1000 words e 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 8 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 transmission or Socket transmission on the Ethernet Port can increase in one word However the maximum number of words that can be specified during PC link transmission on the Ethernet Port is 485 words and during socket transmission on the Ethernet Port is 1000 words f If the PU245N is used only Ethernet or S20LP PC lin
132. on R0631 12544 RW000 00056 MOV RW001 Module designation CMD number setup RW002 RW103 MOV RW003 timeout time setup 00004 MOV RW021 04001 MOV RW022 00001 MOV RW025 Data transfer count setup 00004 MOV RW023 01001 MOV RW024 Data transfer destination register type RW103 01000 gt RW008 Transmission event count setup SET _ R0635 RST R0631 120 Socket identifier reception data word count setup 00004 MOV RW004 04000 MOV RW005 18000 MOV RW006 Data transfer source register type number setup Reception data storage register type register number number setup TOSHIBA 6F3B0362 TCP fragmented data reception processing R0635 RO63D RWO00 RECV RW010 SET RO63D Request setup RO63D RTR1D4000 Reception data count conversion bytes to words RO63E RWO021 XFER RWO25 gt RWO23 Reception data transfer D4001 1 RWO09 1 RWO22 1 RWO24 Increment address and pointer RWO09 gt D4000 Reception data size check RO63E RWO08 gt RWO24 RST RO63D MOV RWO009 MOV RWO22 Processing for data less than the reception data size RW008 lt RWO24 RST RO63D 00000 MOV RWO09 RST R0635 Processing for data greater than the reception data size
133. on are performed solely using the SEND and RECYV instructions See the individual items for details on the actual requests sent to the Ethernet Port 1 Instruction format Figure 4 2 shows the formats of the SEND and RECV instructions Input Output A SEND B Input Output A RECV B Operand Register B Input Operation Mom OFF No execution OFF OFF ON Execution Transmission port instruction busy instruction execution in OFF progress response wait Response reception complete normal complete uam OFF ON Figure 4 2 SEND RECV Instruction Formats lt Important items gt a ERF is the S0051 special relay See the T series Instruction Set for information on ERF usage b For these instructions instruction execution starts at the point the input changes state from off to on Since these instructions span multiple scans applications must hold the input in the on state until the output goes to the on state If the input is turned off before the output goes on the system will not be able to execute the following instruction processing normally After instruction execution terminates it is possible to start execution again by applying a new input ey n TOSHIBA 2 Transfer parameters A The data required for a request to the Ethernet Port is set up in an area that starts in the register indicated by A Then the application executes a SEND or RECV instruction Here we present an overv
134. on for a certain fixed period TOSHIBA 6F3B0362 j Fora TCP receive request the Ethernet Port simply waits for data from the remote port In situations where data is sent periodically from the remote port reception wait timeouts i e no response from the remote port states can be detected by setting a reception wait time limit The following techniques among others can be used to detect no response states when data is sent with no fixed period e Periodic execution of existence verification requests See section 7 3 e The techniques described in the next section which use a separate TCP connection One of the following problems may have occurred when there is no response from the remote port e The remote port may have gone down e Power may have been lost e The remote ports and or local port may have become disconnected from the network k With a connection established if the no response state from the remote port continues when data is sent and the Ethernet Port internal resend processing times out the timeout time is about I minute the NOACK bit in the socket status See section 6 3 will be set to 1 User programs should close such sockets Also note that the Ethernet Port will return an error if send or receive requests are issued in this state User program send requests are seen as completing as soon as they are received by the Ethernet Port This means that even if the remote port goes to the no response state
135. out time Open type 1 or 2 1 Active open client side 2 Passive open server side Open wait timeout time c specified in 0 1 second units 1 to 65535 If zero is specified the system is set to an unlimited infinite wait state 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 Sporto TemsTs B 1 Detailed information Only valid when TermSTS OBH SportNO Socket identifier 1 to 8 TermSTS See tables 4 3 and 4 4 Detail information See table 4 5 Important items e After this request completes normally TCP send receive or close requests can be sent to the socket e Anerror is returned if an open request is issued for an already open socket Status Transmission error TermSTS OBH Detailed information Already open 0080H e An error is returned if a value other than 1 to 8 is specified as the socket identifier Status Transmission error TermSTS OBH Detailed information Illegal socket identifier 0082H e An error will be returned if a value outside the range 1024 to 65535 is specified for the local port specified socket TCP port number Status Transmission error TermSTS OBH Detailed information Port number error 0071H NQF TOSHIBA 6F3B0362 e Not only must the specified socket TCP port number on the local port not overlap with any TCP port number already in use in a local port socket but it also mus
136. r or not the Ethernet Port has failed before attempting to recover from the error h User programs specify the time limit until completion for the following three requests used in socket interface transmission e UDP receive request e TCP open request e TCP receive request If this time limit is exceeded a timeout error is issued In particular the Ethernet Port reports the timeout error to the T2N i The Ethernet Port uses a priority ordering in processing sockets 1 through 8 Therefore systems constructed so that socket 1 is activated frequently may not be able to process socket 8 resulting in Transmission completion timeout errors occurring 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 requests to the same socket gt Number of sockets used x 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 gt Number of remote ports x 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 such as
137. r of sockets No Verify the remote port IP address and TCP port 1 Recheck the remote port IP address and Does a response come back message transmission TCP port numbers if a ping is issued to the 2 Verify that there is no router on the network remote port nt 3 Check the network verification items Are the remote port IP address and TCP port number correct Is the error counter read out from the RAS information constant i e not being incremented Use RAS information readout to determine this N It is possible that there is an abnormality on the 9 gt network itself Check the network verification items RAS error counters Alignment error Short packet CRC error 158 TOSHIBA 6F3B0362 b Close request Verify the status using the procedure described in the Be eR E item 3 If a SEND or RECV instruction fails sp complete on page 148 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 Resolve the problem by referring to the status 159 TOSHIBA 6F3B0362 c Send request START Does the SEND instruction complete No Verify the status using the procedure described in the s item 3 If a SEND or RECV instruction fails complete on page 148 No Set the Ethernet Port to run socket transmission e
138. r of segments received Number of segments sent Number of segments resent Number of segments discarded due to format errors Number of generated resets Segment The TCP header and TCP data block in an IP datagram See figure 7 1 136 TOSHIBA 6F3B0362 5 MIB information MIB UDP UDP protocol information Reads out 4 words of data using RAS information readout Table 7 6 MIB_UDP Symbol Description MIB_UDP 0 Number of UDP datagrams transferred upstream MIB_UDP 1 Number of datagrams addressed to unused ports MIB_UDP 2 Number of datagrams discarded due to format errors MIB_UDP 3 Number of datagrams transferred from upstream UDP datagrams The UDP header and UDP data block in an IP datagram See figure 7 1 6 Event trace information e Record size 16 bytes e Number of records 160 e Operation on overflow Old information is updated This means that it is always possible to verify the 160 most recent event trace records e Format Since this format is for Ethernet Port internal data it is binary codes However the time is expressed in BCD F 0 Detailed information 1 Detailed information 2 Detailed information 3 Detailed information 4 Month Year Hour Day Time information BCD Seconds Minute Su faga TOSHIBA e Event trace item Event Detail information 1 H Detail information 2 H Detail information 3 H Detail information 4 H code 0001H ROM error 0160 RA
139. r program must compare the transmitted and loopback data for equivalence Parameters 12544 3100H 00015 000FH OV WO0903 00015 MOV WO904 Designates the module and sets the CMD number OV WO905 ets the loopback data length OV W0906 00000 MOV WO907 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 WO910 Sets the response time limit 10 seconds 341995909 DMOV WO0912ew0911 01025 MOV WO913 Loopback destination IP address message transmission UDP port number W0903 SEND WO914 RST R0092 Sets the request 7 5 Time Setting The Ethernet Port internal time is set from the T2N This information is used as the time information in the Ethernet Port event trace Su i gt TOSHIBA 6F3B0362 Time set request using the SEND instruction a Function This request sets the Ethernet Port internal time from a user program b Transfer parameters A 3100H Module designation A 1 CMD 0018H CMD number A 2 A 3 A 4 e Enter the year month day hour minute and seconds as BCD codes The date July 20 1996 14 30 00 would be entered as A 12544 A 1 00024 A 2 01942 A 3 05124 A 4 00048 c Status See figure 4 3 for details on bits C D E and F F E D C BA 9 8 7 6 5 4 3 2 1 0 B I lo o ojo em
140. r word count error 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 e A register specification error TermSTS 01H occurs if a value other than a stipulated value is specified for the register type codes SRID DRID e A register specification error TermSTS 01H occurs if 0007H the T register is specified for the local port register type code and a register other than the T register is specified for the remote port register type code This also holds for the C register e A boundary error TermSTS OAH occurs if a range spanning both the base T registers 0 to 511 and the expansion T registers 512 to 999 is specified for the T register e For data storage registers a boundary error occurs if the specified area start register register range does not exist in either the local or remote ports Local port TermSTS OAH remote port TermSTS 8AH e A response timeout error TermSTS 02H occurs if the response time from the remote port exceeds the time specified by the timer counter value TOSHIBA 6F3B0362 e Write protection can be specified for each register type on the local T2N by using the special coil settings described below In this case a memory write protect error TermSTS 04H will occur 9 8 7 6 5 4 3 2 1 0 F 0 Write enabled swoe7 _ swic fr F gt Rwhw lw xww 1 write protected Special registe
141. ransmission and transmits to the slave Ethernet Port message transmission UDP socket The user program that runs on the T2N of the main port is discussed later When this function is used on the PC link slave port the T2N simply performs the e Parameter setup and e Operating mode control message transmission permission that were described in an earlier chapter There is no need to create any special user programs on the T2N Usage Recommendations Since UDP IP does not provide control functions to guarantee communication reliability higher level protocols such as retry are required 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 port T2N or T3H b Transfer parameters A Module designation A Command number A 2 1 Transfer register data length 1 to 485 words A 3 Local port register type code A 4 Local port register number A 5 Remote port register type code A 6 DRegNO Remote port register number A 7 6 Timer count A 8 D IPAddress Remote port IP address The input format is the A 9 same as that for parameter setup requests A 10 D UDP PortNO Remote port message transmission UDP port number Oe ONS o 1 Transferred
142. ransmission is through the same transmission Ethernet Port PU235N 245N In the figure to the left the number of words CH1 transmitted in CH1 is 5 nr if ns lt nr and ns if ns gt nr Receive request due to a remote T2N RECV instruction Response transmission for the RECV instruction word count nr gt Transmission path Transmission to a remote T2N due to a T2N SEND instruction word count ns gt Figure A 2 Word Counts Considered with the PC Link Protocol ee TOSHIBA 6F3B0362 Table A 6 Number of Words that can be Transmitted Using PC Link Protocol with the Ethernet Module classification Port PU235N PU245N When TCP UDP socket transmission is not used Processing time for function instructions 4 ms maximum 5 ms maximum Conditions for the above table 5 ms maximum 3 ms maximum 4 ms maximum Maximum specifiable number of transmission words for local T2N SEND instructions or remote T2N RECV instructions 485 words 295 words 485 words 346 words 131 words maximum maximum maximum maximum maximum a For the T2N configuration this table assumes the configuration of figure A 3 in which T2N PU235N 245N is mounted in the main base unit b 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 transmi
143. receive TCP send receive register read write OBH Transmission error Occurs if the Ethernet P ort returns an error response Detailed information the Ethernet Port response status is stored at B 1 OCH No I O response Occurs if the T2N cannot access the Ethernet P ort ODH Reserved OEH Send data capacity Occurs ifa request is discarded when a T2N internal resource insufficiency exceeded occurs due to increasing amounts of transfer data Occurs ifa T2N retransmission times out OFH Reserved Boe TOSHIBA 6F3B0362 Table 4 5 Detailed Information Ethernet Port Error Responses PART1 Error Description Normal complete 0001H Request completed normally Local port fault 0002H The local portis in down mode Local port standby 0003H In standby mode data transmission socket interface transmission or PC link protocol transmission was requested Timeout 0020H Timeout occurred during TCP open processing or receive processing or during UDP receive processing Length error 0030H Incorrect send data length Port mode error 0040H One of the following requests was issued in a mode other than standby mode a Parameter setup b MAC address setup c Reset MAC IP not set up 0050H Occurs ifthe MAC address or IP address is not set up Transmission prohibited state 0060H Occurs ifa PC link request was issued from the T2N in run mode in the message transmission prohibited state Occurs if a socket op
144. register data length Specifies the transmission data length in word units 1 to 485 words rik TOSHIBA 6F3B0362 For the T C registers the data length will be between 1 and 323 words 2 Local port register type code This code indicates the type of register in which the local port transmission source data is stored See figure 5 1 for the codes that can be specified 3 Local port register number Specifies the starting number of the register specified by the local port register type code 4 Remote port register type code This code specifies the type of the register at the remote port to which the transmitted data will be written See figure 5 1 for the codes that can be specified 5 Remote port register number Specifies the starting number 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 FE 0 0 0 1 to 3276 7 seconds Use the user specified value 1 Use the default value of 30 seconds 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 Q5H Fregister 0 8191 1 0001H W register 06H F register 0 65535 2 0002H LW register 0007H T register 3 0003H RW register 0008H C register 3 0004H D register 0009H SW
145. res failures and malfunctions 9 1 Installation Environment and Base Unit Mounting TOSHIBA 6F3B0362 Safety Precautions continued e Basic points in laying outa network When laying network cable take adequate safety measures and perform all operations in accordance with the relevant standards See the ISO IEC 8802 3 standard for details on laying networks We strongly recommend hiring a qualified contractor who has specialized knowledge about safety precautions and standards Avoid installing 10BASE5 10BASE2 or 10BASE T networks in environments that have high noise levels If itis necessary to install network cables in an environment subject to noise electromagnetic interference use the noise reduction measures described elsewhere in this document 9 2 Network Wiring e Maintenance Always turn off the power before attaching or removing modules or cables Electrical shock malfunctions and breakdowns are possible if these operations are performed with the power on To keep the system operating normally at all times and to prevent trouble in advance perform daily inspections periodic inspections and cleaning 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 if service
146. rmation Only valid when TermSTS OBH SportNO Socket identifier 1 to 8 TermSTS See tables 4 3 and 4 4 Detail information See table 4 5 d Important items e UDP close requests are processed with the highest priority and other executing requests are discarded even if the object socket is executing a UDP open send or receive request Other requests during the execution of this request will be discarded e The next open request for the object socket can be executed as soon as the close request completes normally e An error is returned if a close request is issued for a socket that is not yet opened Status Transmission error TermSTS OBH Detailed information Unopened 0081H e An error is returned if a value other than 1 to 8 is specified as the socket identifier Status Transmission error TermSTS OBH Detailed information Illegal socket identifier 0082H e 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 Supplement The T2N sees its requests module control and socket interface transmission to the Ethernet Port as being transmission requests As a result when a request is forcibly terminated and a response is not received from the Ethernet Port the result is a send request timeout even if the instruction was a RECV instruction e Ifthe T2N internal completion wai
147. rocessing and the connection could not be Normal complete established Handle the error according to the completion and socket status Terminate TCP open processing Connection established 99 TOSHIBA 6F3B0362 TCP send request using the SEND instruction a Function This request sends local port register data using an open TCP socket Amount of data sent b A A 1 A 2 A 3 A 4 A 5 Transfer parameters 1 to 1000 words Module designation Command number Socket identifier 1 to 8 Transmission data length 1 to 1000 words Transmission data storage register type code StreqNOD Transmission data storage register number Transmission data storage register type code Type code for the register that holds the transmission data See Figure 5 1 Transmission data storage register number Starting number of the registers that hold the c transmission data 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 Sporto TemsTs B 1 Detailed information Only valid when TermSTS OBH SportNO Socket identifier 1 to 8 TermSTS See tables 4 3 and 4 4 Detail information See table 4 5 Important items e 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 pro
148. ror occurred in reception processing The specified socket coule not receive the Normal complete data Handle the error according to the completion and socket status Terminate TCP reception processing aaa 17 eae TOSHIBA 6F3B0362 g TCP reception processing example Receive request issued first type Ladder program flowchart Error result TCP reception processing start The processing in this section can be Socket status read verify performed at this stage or at the point the instruction terminates abnormally Are bits B and F both 1 connection has not been established with Is a connection established the specified TCP socket Open processing is required Yes The specified TCP socket is Is bit 9 set to 0 No ee baat i In the state other than RCLOSE Jade Jed ge The socket must be closed by the local Yes port Execute a TCP receive request CMD 0038H Hold the input of function block in the on state until the RECV instruction completes Instruction completion Verify the status Did the operation complete before being timed out Text was not received within the time limit An error occurred in reception processing The specified socket could not receive the Normal complete data Handle the error according to the completion and socket status Terminate TCP reception processing 108 TOSHIBA 6F3B0362 8 TCP close req
149. rs ar L Input output registers Counter registers Link registers Timer registers Link relay registers PC internal file registers Auxiliary registers Expansion file registers IC card Data registers e When PC link transmission or the UDP socket interface is used if an application transmits to a nonexistent remote port an transmission error TermSTS OBH detailed information 0020H occurs TOSHIBA 6F3B0362 5 4 PC Link Protocol Transmission Data read The T series PC link protocol allows a T2N on the network to read register data from another T2N or T3H port s registers into its own registers As is the case with the computer link protocol the PC link protocol uses UDP IP as its transmission protocol The PC link main port uses a UDP socket for message transmission and transmits to the slave Ethernet Port message transmission UDP socket The user program that runs on the main port is discussed later When this function is used on the PC link slave port the T2N simply performs the e Parameter setup and e Operating mode control message transmission permission that were described in an earlier chapter There is no need to create any special user programs on the T2N Usage Recommendations Since UDP IP does not provide control functions to guarantee communication reliability higher level protocols such as retry are required No processing is performed if a PC link protocol transmission message is received at any
150. rs if a range spanning both the base T registers 0 to 511 and the expansion T registers 512 to 999 is specified for the T register aa 69 TOSHIBA 6F3B0362 e For data storage registers a boundary error occurs if the specified area start register register range does not exist in either the local or remote ports Local port TermSTS OAH remote port TermSTS 8AH e A response timeout error TermSTS 02H occurs if the response time from the remote port exceeds the time specified by the timer counter value e Read protection can be specified for each register type on the local T2N by using the special coil settings described below In this case a memory write protect error TermSTS 04H will occur 9 8 7 6 5 4 3 2 1 0 F 0 Write enabled swoe7 swie fr F p frwlew w xwyw write protected Special registers E Input output registers Counter registers Link registers Timer registers Link relay registers PC internal file registers Auxiliary registers Expansion file registers IC card Data registers e When PC link transmission or the UDP socket interface is used if an application transmits to a nonexistent remote port an transmission error TermSTS OBH detailed information 0020H occurs TOSHIBA 6F3B0362 5 5 Sample PC Link Protocol Transmission Program This section presents a sample program that uses PC link protocol transmission This program creates increment data within t
151. s UDP open UDP send UDP close TCP send TCP close 07H Occurs if the corresponding Ethernet P ort 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 Occurs if either 0 words or 486 or more words were specified for either a count register read write or a remote port loopback request Occurs if either 0 words or 1001 or more words were specified fora UDC TCP send receive request OAH Boundary error e 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 receive TCP send receive register read write OBH Transmission error Occurs if the Ethernet Port returns an error response Detailed information the Ethernet Port response status is stored at B 1 OCH No I O response Occurs if the T2N cannot access the Ethernet P ort ODH Reserved OEH Send data capacity Occurs ifa request is discarded when a T2N internal resource insufficiency exceeded occurs due to increasing amounts of transfer data e Occurs ifa T2N retransmission times out OFH Reserved Details on the Ethernet Port error response when a transmission error OBh occurs are stored in the register following the status See table A5 ee se TOSHIBA 6F3B0362 Tab
152. s message transmission These techniques use dedicated UDP sockets that are separate from those used by socket interface transmission Set the port number to a value in the range 1024 to 65535 UNIX allocates port numbers 1 to 1023 for standard services The UDP port number specified at A 4 is the UDP port number allocated for message transmission receive The two port numbers following that port number are automatically allocated for message transmission send If computer link protocol PC link protocol reception is performed directed at the message transmission UDP port number specified at A 4 the Ethernet Port T2N will process the received data in the order received and send the result from one of the message transmission send ports See figure 4 5 Ethernet Port Message transmission receive port E 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 gt 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 port numbers used for message transmission must not duplicate UDP socket port numbers or TCP socket port numbers c Status 5 figure 4 3 for details on bits C D E and F E D C B A 9 6 5 4 3 2 1 0 B FS rems E B 1 Detaile
153. s not overwritten when using iterated receive requests 7 TOSHIBA 6F3B0362 Preamble 7 bytes Signal used to synchronize reception SFD Start Frame Delimiter 1 byte Remote port address 6 bytes Local port address 6 bytes Ethernet type 2 bytes 0800H IP O806H ARP T IP header 20 bytes FACKEN F UDP header TOP header traveling on the 8 bytes 20 bytes transmission path 72 to 1526 IP datagram UDP data field bytes 46 to 1500 up to 1472 bytes bytes II Data fields in the packets traveling on the transmission path TCP data field up to 1460 bytes IP data field up to 1480 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 TOSHIBA 6F3B0362 Socket interface port numbers a Set the port numbers for local TCP and UDP sockets to values in the range 1024 to 65535 The Ethernet Port will issue an error if any other values are used This is because the port numbers from 1 to 1023 are allocated for UNIX workstation standard services b There are cases where there are reserved ports with numbers outside the 1 to 1023 range on specific workstations Verify this on the workstations actually being used and be sure that these reserved port numbers are not duplicated on the Ethernet Port c The
154. same port number cannot be assigned to multiple sockets for TCP and UDP sockets Be especially careful not to duplicate UDP port numbers used for message transmission computer link protocol and PC link protocol transmission d When TCP sockets and UDP sockets are used together in the same Ethernet Port the same port number cannot be used for both TCP and UDP sockets Notes that apply to both the UDP and the TCP socket interface a Careful attention to changes in bits in the socket status is required when using socket interface send receive requests b When using multiple Ethernet Port functions at the same time communication processing may become slower depending on the details of the user programs executing c Communication efficiency may degrade if the network to which the Ethernet Port is connected is heavily loaded d Since processing a close request requires processing the send and receive requests issued to that socket before the 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 sockets this buffer of about 60k bytes do not become full In the case of UDP socket the amount of rec
155. sion functions Segment A network unit formed from a single transmission medium twisted pair cable TOSHIBA 6F3B0362 1 5 Software Organization The Ethernet Port transmission functions computer link protocol transmission PC link protocol transmission and socket interface transmission are implemented with the software organization shown in the figure T2N user program SEND RECYV instruction T2N Upper Protocol software T2N firmware Computer link PC link socket interface T2N internal bus Ethernet Port interface IP ICMP Ethernet Port CSMA CD 10BASE T Figure 1 7 Software Organization TCP 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 Window flow control Segment division Reporting of the maximum receivable segment length The Ethernet Port does not support the reset bit RST TOSHIBA 6F3B0362 UDP User datagram protocol Transfers data with the remote port in datagram units Provides high speed transfers since a connection is not used but does not have control functions that assure reliability as does TCP Thus
156. sion source port Transmission destination port UDP socket UDP socket Transmission data re ee ee ee ee ee ee ee ee ee ee Reception verification only if implemented by user programs Figure 6 2 UDP Sockets TOSHIBA 6F3B0362 b TCP socket interface See figures 6 3 and 6 4 e In TCP communication a pipe like virtual communications line connection is established between sockets on two ports that are communicating sending and receiving and since the protocol handles control of reception verification and retransmission processing it provides a highly reliable communication e There are two methods for establishing a connection passive open and active open In passive open the local socket is put into a state in which it is waiting for a request to establish a connection from another port In active open a request is issued for the establishment of a connection with a socket in the passive open state e When establishing 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 e Since the passive open socket port provides data transmission and other services it is called the server e Since the active open socket port requests services it is called the client e A socket for which a connection has been established is unable to transfer data with any oth
157. smission is enabled transmission enabled using an operating mode control request Does a response come back if a 1 Check the main port side IP address ping is issued to the host 2 Verify that there is no router on the network computer 3 Check the network verification items Is the error counter read out from the RAS information constant i e No It is possible that there is an abnormality on the not being incremented gt network itself Check the network verification Use RAS information readout to items determine this RAS error counters Alignment error Short packet CRC error Yes END 152 TOSHIBA 6F3B0362 6 If PC link protocol transmission fails a Main port side Ethernet Port Verify the status using the procedure described in the Does the SEND RECV instruction item 3 If a SEND or RECV instruction fails complete complete on page 148 Yes Was there a response timeout TermSTS 02H Yes Is the station status such that run message transmission is enabled Check the status and Set the Ethernet Port to run message resolve the error transmission enabled using an operating mode control request Verify the slave Ethernet Port transmission destination IP address Verify the slave Ethernet Port message transmission UDP port number Is the slave port message Supplement transmission UDP port correct Remember that ther
158. ss in the remote port information area the NETDATA table fails Occurs if the remote port IP address network address differs from the local port IP address network address oj o co jai I o co w I oS So W I TOSHIBA 6F3B0362 Table 4 6 Detailed Information Ethernet Port Error Responses PART2 Error Description Memory pool allocation failure QOAOH Occurs if the Ethernet Port internal OS fails to allocate memory Port 2 task start failure Occurs if computer link or PC link socket identifier acquisition fails Broadcast specification error 00A2H Occurs if the remote IP address is broadcast on a remote port verification request 00BOH BCC error 00B1H Occurs if an error occurs after address saving on a MAC setup request Resource shortage error OCOH Occurs if send request is issued for the Ethernet P ort internal buffer fill Receive request from the T2N 00C1H The specifiable size from user program lt The Ethernet Port is receiving data size 00C2H The specifiable size of user program beyond the limits from 1 to 1000 MAC address specification error E Sees TOSHIBA 6F3B0362 4 3 Ethernet Port Reset This section describes the Ethernet Port reset procedures There are two ways to reset an Ethernet Port as follows 1 T2N power on 2 Reset by a user program running on the T2N In Ethernet Port reset processing when one of the above resets occurs the Ethernet Port first
159. ssion 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 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 transmission on the Ethernet Port can increase in one word However the maximum number of words that can be specified during PC link transmission on the Ethernet Port is 485 words Example In case of the transmission with 1024 words in the TMOV instruction is executed With the computer link and loader not connected main base unit Figure A 3 T2N Configuration when Using the PC Link Protocol Execution time required 206 3 5 n the number of transmission words 1024 3790 In this case the execution time required is under 4ms Therefore the maximum specifiable number of transmission words are 485 words for PU235N 346 words for PU245N Attention In case of using the instruction below be careful to use the maximum specifiable number of transmission In the case of using another instruction be careful too TMOV TNOT TCMP XFER READ WRITE
160. ssion data storage registers D1000 and above UDP send request executed when R0622 is set on R0622 12544 MOV RWO00 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 01000 MOV RW008 Transmission data storage register type storage register number setup RW000 SEND RW010 RST R0622 Turn R0622 off after request setup and completion es TOSHIBA 6F3B0362 d UDP receive request This program issues a UDP send request for socket number 2 on the Ethernet Port This ladder program is executed by turning on the A contact on the R0621 Parameters 12544 3100H 00051 0033H 0341995909 14627185H Transmission source IP address 133 113 98 20 Transmission source object socket UDP port number 3000 Reception data word count 1000 Reception data storage registers D2500 and above Reception timeout time 1800 seconds UDP receive request executed when R0621 is set on R0621 12544 MOV RWO00 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 Re
161. ssoees 169 Append FS ER RR 171 ME 3 Status TADE naiice desacaboadnetashiacenarianseenstnrannebeiaentrGs qeneersaiaseuel 172 Appendix 4 Limitations on the T2N SEND and RECV Instructions cccceeeee ees 175 13 TOSHIBA 6F3B0362 1 Ethernet Port Overview 1 1 System Configuration Using the Ethernet Port This section describes the systems that can be configured using the PU235N 245N Ethernet Port for the PROSEC T2N programmable controller The remainder of this document refers to the PROSEC T2N programmable controller as the T2N and the Ethernet Port as the PU235N 245N Ethernet Port The Ethernet Port is a communication port for connecting a T2N system to a I0BASE T Twisted pair Ethernet LAN local area network It is operated a T2N option module The T2N connects to the above mentioned LAN through the Ethernet Port 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 control LAN Host machine Personal computer T3H PROSEC T3H T2N PROSEC T2N Workstation TOSLINE S20LP T F I OL O 2 1 T2 PROSEC T2 S20LP TOSLINE 20LP F10 TOSLINE F 10 R 1 O Remote I
162. status using the procedure described in the item 3 If a SEND or RECV instruction fails complete on page 148 The Ethernet Port internal MAC address has been corrupted Replace the PU235N 245N 150 TOSHIBA 6F3B0362 5 If computer link protocol transmission fails a Hostcomputer side main port START Is the transmission destination IP address set to that of the slave Ethernet Port No Yes Is the transmission destination message transmission UDP port number correct No Yes Did the computer link protocol No return without errors Yes Does a response come back if a ping is issued to the slave Ethernet Port Yes Check the network verification items i e the items unrelated to the Ethernet Port Verify the slave Ethernet Port transmission destination IP address 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 Check the computer link protocol format 1 Recheck the slave 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 151 TOSHIBA 6F3B0362 b Ethernet Port side slave port Is the station status such that run Set the Ethernet Port to run message message tran
163. sts to the specified T2N registers les Also note that registers in other ports can be accessed by modifying the SAMPLE H definition file KP JA A xf Ae a as C Copyright TOSHIBA Corporation 1995 All Rights Reserved xf 8K KA KR A RA I AAA I RA A A I kkk AAA A AA A I AI A oe f EE EE ENE RE EN ENE RA EE SER Include declarations Hy a EE EEE a ENE a AE define WIN31 This is a Windows 3 1 application define USECOMM The COMM API is required Kr include lt string h gt include lt stdio h gt include lt stdlib h gt include lt string h gt include lt memory h gt include lt sysYtypes h gt include lt fcntl h gt include lt errno h gt include lt sysYsocket h gt include lt sysYtimeb h gt include lt time h gt include lt sysYin h gt include lt sysYnetdb h gt include sample h Ej TOSHIBA 6F3B0362 Be SS Se Sh eS Se et ee Prototype declarations fe a SS a SS SS ee int cl_send int Register read write processing void main int iS Csi Return status El int isdp Socket identifier int a z Loop counter struct sockaddr in Soc WORD wVersionRequested 0 1 WINSOC version number specification WSADATA WsaDtata WINSOC data structure xf initialization ists 0 Initial value setting Windows socket initialization ists WSAStartup wVersionRequested amp
164. t Port normally and presents sample programs Chapter 5 Computer Link Protocol and the PC Link Protocol Transmission Describes the instruction format used with computer link protocol and PC link protocol transmission and presents sample programs Chapter 6 Socket Interface Communication Presents an overview of the socket interface cautionary items and the instruction format used on the Ethernet Port with the socket interface and presents sample programs Chapter 7 RAS Information Describes the instruction format and the format of the Ethernet Port RAS information including port status and down information and presents sample programs Chapter 8 Error Handling Describes techniques for determining the causes of errors when Ethernet Port operation is abnormal and procedures for recovering from those errors 10 TOSHIBA 6F3B0362 Chapter 9 Installation and Wiring Describes the procedures for installing the Ethernet Port and T2N procedures for laying transmission cable and the nature of the construction required Appendix Presents request code completion status value and error code tables and describes the minimum transmission delay times and execution times for each instruction Note that in addition to this manual Toshiba also provides a T2N User s Manual Basic Hardware and Function a T series Instruction Set and a T series Computer Link Operation Manual All these manuals should be read together
165. t applied to a socket in the passive open state A connection cannot be established by a passive open from another socket applied to a socket in the passive open state Similarly a connection cannot be established by an active open from another socket applied to a socket in the active open state That is the roles of two sockets for which a connection is to be established must be determined in advance c Fora socket in the passive open state it is not possible to open multiple connections from other ports by issuing multiple active opens d Connections cannot be established between sockets on the same port e If transmission is impossible due to network congestion or other reason when a send request is executed the send request is stored internally in the Ethernet Port so that it can be sent later The number of items that can be stored is three per socket If the Ethernet Port cannot store the request is returns an error f Ifa close request is issued first for a connection that is being established then it will be possible to execute the next open request for the object sockets at the point when the close request processing completes normally On engineering 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 clos
166. t in active open state The socket closed in response to a close request C KUE TCP socket in passive open state or UDP The socket closed in response to a close request socket in open state B CONN TCP connection established Disconnected by the local port with a close request Disconnected by the remote port A RCV Received text present No received text 9 RCLOSE An established TCP connection disconnected The socket closed in response to a close request by the remote port 8 NOACK No response received from the remote port for The socket closed in response to a close request a local port send operation in a state where a TCP connection was established and the TCP resend function resulted in a timeout because the remote port was down etc If the wait time exceeds the set value during WhenaTCP active open request is reissued TCP active open request This bit is not set to 1 fora TCP passive open request timeout A socket status in which neither AOPEN nor POPEN is set to 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 with the WRITE instruction It will no longer be possible to acquire correct data after such an operation Sample Socket interface information readout program ROOOO 1 03907 MOV RW010 00005 MOV RWO1l HOOFE READ RWO10 gt D1000 READ instruction description HOOFE Module
167. t must be set up e The Ethernet Port returns a response to this request in run and standby modes The IP address of the local port must be set up e If the remote port exists Normal return e If the remote port does not exist within 4 seconds Status Transmission error TermSTS OBH Detailed information Timeout occurred 0020H 126 TOSHIBA 6F3B0362 e Sample program This sample ladder program issues a remote port verification request to the Ethernet Port This program is executed by turning on the R0504 A point Parameters 12544 3100H 00020 0014H 341995909 14627185H L 85H 71H 62H 14H L 133 113 98 20 Remote port verification request 12544 MOV RWO00 00020 MOV RW001 341995909 DMOV RW003 RW002 Designates the module and sets the CMD number Sets remote port IP address RWO00 SEND RWO10 RST R0504 Sets the request 127 TOSHIBA 6F3B0362 7 4 Remote Port Loopback for an Ethernet Port This request sends test data to the specified remote Ethernet Port T2N T3H and verifies that transmission is being performed correctly by receiving that data looped back from the remote port A user program must compare the transmitted and received data for equivalence Remote port loopback request using the SEND instruction a Function This request sends test data to the specified remote Ethernet Port T2N T3H and verifies t
168. t not overlap with any UDP port numbers or UDP port numbers used for message transmission An error will occur if the port number overlaps Status Transmission error TermSTS OBH Detailed information Already open 0080H e A connection to the local port itself cannot be established even if the local port IP address is specified as the remote port IP address e Values in the range 1024 to 65535 can be specified as the object socket TCP port number for the remote port An error will be returned if a value outside that range is specified Status Transmission error TermSTS OBH Detailed information Port number error 0071H e An error will be returned if the open timeout time is exceeded OThe passive open timeout Status Transmission error TermSTS OBH Detailed information Timeout 0020H The active open timeout Status Transmission complete timeout TermSTS 06H e While the open wait timeout limit can be set to any value in the 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 will be in an idle state until the specified time has elapsed e When a passive open operation is execut
169. t 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 the open closed state of the socket in the socket status TOSHIBA 6F3B0362 e UDP close processing example Ladder program flowchart Error result UDP close processing start Socket status read verify Are bits C and E both 1 Opened state Yes Execute a UDP close request CMD 0034H Hold the input of function block in the on state until the SEND instruction completes The specified UDP socket is already in the closed state Instruction completion Verify the status An error occurred in the close processing and the specified socket could not be Normal complete closed Handle the error according to the completion and socket status Terminate UDP close processing 96 TOSHIBA 6F3B0362 TCP open request using the SEND instruction a Function This request opens active passive any of the eight sockets Transmission protocol TCP IP b Transfer parameters A Module designation Ne Command number A 2 Socket identifier 1 to 8 NE Open type A 4 DIPAddress Remote port IP address A 5 A 6 Remote port object socket TCP port number A 7 Local port specified socket TCP port number A 8 Open wait time
170. tatus TermSTS value indicates a transmission error OBH Figure 8 1 shows the structure of the status information Tables 8 4 and 8 5 list the TermSTS values and table 8 6 lists the contents of the detailed information The status error status has the following structure Detailed information F ED CBA 98 7 6 5 4 3 2 1 0 Sport NO TermSTS Only on an error 0 Error occurred at local station 1 Error occurred at remote station Socket identifier Only valid for socket interface transmission instructions 0 for other instructions status 0 Initial state busy 0 Initial state 1 While send requesting 1 Transmission port busy 2 Send complete and while aiting response aon 0 Normal complete 3 es Me 1 Error complete Figure 8 1 Status Structure Table 8 4 TermSTS Part 1 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 Ina 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 JG ee
171. te 2000H Run mode Allows the message transmission 1020H Run mode Allows the socket interface 1010H Run mode Allows the message transmission 1030H and socket interface ee en TOSHIBA 7 2 Down Information When an Ethernet Port goes to down mode the factor that caused that transition is stored in the T2N interface buffer as one word of data This data can be read by the T2N with the READ instruction Table 7 1 lists the down information error codes and the factors that caused the transition to down mode Table 7 1 Down Information Error code H Interpretation 0010 Watchdog timeout 0020 Memory bus stall 0030 A TRAP occurred 0040 J abbering timeout 0050 LAN controller check error 0160 ROM BCC check data match error 0260 System RAM area check error 0360 T2N interface buffer check error 0500 0501 Semaphore acquisition error 0502 0503 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 ROOOO 1 04081 MOV RWO10 00001 MOV RWO1l HOOFE READ RWO10 gt D1000 READ instruction description HOOFE Module designation Ethernet Port must specify HOOFE RW010 Specifies the 04081
172. ter number Specifies the starting number 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 FE 0 0 ifi 0 1 to 3276 7 seconds Use the user specified value 1 Use the default value of 30 seconds c Status See figure 4 3 for details on bits C D E and F E D C BA 9 7 6 5 4 3 2 1 0 B Er pop gt B 1 Detailed information Only valid when TermSTS OBH d Important items e 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 e The command number 0021H is the same as the Data Write e A transfer word count error 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 e A register specification error TermSTS 01H occurs if a value other than a stipulated value is specified for the register type codes SRID DRID e A register specification error TermSTS 01H occurs if 0007H the T register is specified for the local port register type code and a register other than the T register is specified for the remote port register type code This also holds for the C register e A boundary error TermSTS OAH occu
173. terface cable Transceiver MAU medium attachment unit Ethernet address MAC address Ethernet is a registered trademark of Xerox Corporation Cheapernet is not a registered trademark but rather is a common name TOSHIBA 6F3B0362 1 3 Basic Functionality The Ethernet Port has the following main features 1 T series computer link protocol transmission slave port The host machine can upload or download user programs execute control commands and read or write register data to a T2N on the 10BASE T LAN using the 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 Host machine Personal computer Workstation Response Application program 10BASE T Ethernet Port T2N operating system U ser program Figure 1 2 T Series Computer Link Protocol Transmission slave port 62 TOSHIBA 6F3B0362 2 T series PC link protocol transmission The T2N can use the T series PC link protocol to read or write register data on another T2N on the 10BASE T LAN While T2N user programs for reading and writing are necessary to use the host functions only the basic Ethernet Port settings performed from the T2N are required to use the sla
174. terface on the Ethernet Port for data transmission Data handling and data segmentation in UDP socket interface transmission and reception a In UDP socket interface transmission data sent in a single transmission is handled by the receiving Ethernet Port as a single data unit and that data is transmitted to the T2N in a batch operation by a receive request The size of data units that can be handled by the Ethernet Port socket interface in a single operation is limited to a maximum of 2000 bytes If the sending port sends a data unit larger than 2000 bytes the Ethernet Port UDP socket interface will not be able to receive that data Users should determine the maximum size of the data units to be sent or received at the system design stage Transmitted data that exceeds 1472 bytes is divided fragmented into units of 1472 bytes This is the limit of the length of packets 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 B with 528 bytes by the send side Ethernet Port 3 A and B are put onto the network in order 4 The receive side Ethernet Port connects the receiv
175. termined period the sending port may will decide that the TCP connection is abnormal and close the connection To prevent this from occurring the T2N software should monitor the RCV receive data present bit and issue receive requests when necessary e With TCP receive requests the amount of data transferred to the reception data storage register area will differ with both the timing with which the T2N issued the receive request and the timing with which the data arrives at the Ethernet Port 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 e User programs must save all incoming data so that the register area used to transfer data to the T2N is not overwritten when using iterated receive requests e The Ethernet Port uses a priority ordering in processing sockets 1 through 8 Therefore systems constructed so that socket 1 is activated frequently 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
176. thernet Port setup 1 Build emergency stop interlock and similar circuits outside the PU235N 245N If a breakdown or malfunction occurs 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 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 equipment incorrectly 0G TOSHIBA 6F3B0362 3 1 Connecting to the Network 1 The Ethernet Port supports 10BASE T network Connection to a LOBASE T Network This section describes the connection procedure starting from the state where the 1OBASE T twisted pair cable is already supplied and ready to be connected See section 9 2 Network Wiring for details on wiring the 10BASE T twisted pair cable dabbet 2 PU235N 245N I Ethernet Port To HUB l 10BASE T connection connector Twisted pair cable Figure 3 1 Connection to a twisted pair cable 1 Align the twisted pair cable with the 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 1 When installing a 10BASE5 10BASE2 or 10BASE T network the cabling must be laid with adequate safety precaut
177. tion If the size of reception data is smaller than the transmitted size of transfer data to socket the data that exceed the specified size of reception data is canceled Elk 9S TOSHIBA 6F3B0362 2 Data handling and data segmentation in TCP socket interface transmission and reception a When using the TCP socket interface for data transmission the data transmitted in a single operation is handled by the receive side Ethernet Port as one section of a continuous data stream that comes from the sender See figure 6 6 In this technique the data is not handled as a single unit as it is in UDP socket interface transmission b The amount of data transmitted to the T2N from the TCP socket interface due to a T2N receive request will vary depending on both the timing with which the T2N issues the receive request and the timing with which the data arrives at the TCP socket interface c Inthe Ethernet Port TCP socket interface up to 4380 bytes of received data can be stored per socket Also note that up to 2000 bytes of data can be transferred to the T2N for a single receive request from the T2N For example if the remote port sends 800 bytes at a time then the amount of received data per socket may be either 800 1600 2400 3200 or 4000 bytes If the amount of received data 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 320
178. tion Valid when Kind is 2 or 4 A 6 Number of items read out Valid when Kind is 4 1 RAS information storage register type code This code specifies the type of 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 information LAN controller interface IP TCP and UDP information See tables 7 3 to 7 6 3 Maintenance data Cannot be used 4 Event trace information See table 7 7 5 RAS information clear 4 Start position Only valid when the readout request type is 2 MIB information or 4 trace information MIB information 2 0 MIB_IF 1 MIB_IP 2 MIB_TCP 3 MIB_UDP Trace information 4 0 to 160 0 corresponds to the most recent information 5 Number of items read out Only valid when the readout request type is 4 trace information 1 to 30 items ae cv TOSHIBA 6F3B0362 c Status See figure 4 3 for details on bits C D E and F E D C B A 9 7 6 5 4 3 2 1 0 B SO eee B 1 Detailed information Only valid when TermSTS OBH d Important items e This request can be used in run and standby modes e Th
179. twisted pair There must be no cables firmly locked in place 10BASE5 2 T Check for damage to the cables Are the cables installed near any power or other cables Verify that temperature humidity vibration and dust levels are all within the Stipulated ranges Voltages must be within the Adjust the input voltages to be Stipulated ranges There must be no looseness the There must be no damage the the Firs Firs the the pos There must be no looseness or play The 10BASE5 connector Slide latches must be in their locked positions Firs firm eng There must be no looseness or play The T connector locks must be engaged Firs looseness or play cab The modular connector locks must be engaged There must be no damage There must be no power or other similar cables in the vicinity The values must be within the ranges from the general specifications for the module Imp that 169 within the stipulated ranges Tum off remove power from power supply and tighten down the screws with a screwdriver Tum off remove power from power supply and replace damaged cables press the module press the cable firmly into connector and then slide slide latch to the locked ition press the T connector y into position and then age the T connector lock t press the twisted pair le into modular connector Stop the system turn off
180. ued first type Ladder program flowchart Error result UDP reception processing start Socket status read verify Are bits C and E both 1 Opened state Yes The processing in this section can be performed at this stage or at the point the instruction terminates abnormally The specified UDP socket is in the closed state Open processing is required H latch Sh aati NE LA Sh att et Geet aati attri St ee ee ee ee ee a Execute a UDP receive request CMD 0033H Hold the input of function block in the on state until the RECV instruction completes Instruction completion Verify the status Did the operation complete before being timed out Text was not received within the time limit An error occurred in reception processing The specified socket could not receive the Normal complete data Handle the error according to the completion and socket status Terminate UDP reception processing 94 TOSHIBA 6F3B0362 4 UDP close request using the SEND instruction a Function Close the open UDP socket Release the unlimited wait state receive request and terminate the UDP socket b Transfer parameters A 3100H Module designation A 1 CMD 0034H Command number A 2 SportNO Socket identifier 1 to 8 c Status See figure 4 3 for details on bits C D E and F F E D C BA 9 8 7 6 5 4 3 2 1 0 B Sporto TemsTs B 1 Detailed info
181. uest using the SEND instruction a Function Close the open TCP socket Release the unlimited wait state receive request and terminate the TCP socket b Transfer parameters A 3100H Module designation A 1 CMD 0039H Command number A 2 SportNO Socket identifier 1 to 8 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 Sporto TemsTs B 1 Detailed information Only valid when TermSTS OBH SportNO Socket identifier 1 to 8 TermSTS See tables 4 3 and 4 4 Detail information See table 4 5 d Important items e TCP close requests are processed with the highest priority and other executing requests are discarded even if the object socket is executing a TCP open send or receive request Other requests during the execution of this request will be discarded e Anerror is returned if a close request is issued for a socket that is not yet opened Status Transmission error TermSTS OBH Detailed information Unopened 0081H e An error is returned if a value other than 1 to 8 is specified as the socket identifier Status Transmission error TermSTS OBH Detailed information Illegal socket identifier 0082H e 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 req
182. uested ojo ojo EE Timeout 0020H Timeout occurred during TCP open processing or receive processing or during UDP receive processing Length error 0030H Incorrect send data length Port mode error 0040H One of the following requests was issued in a mode other than standby mode a Parameter setup b MAC address setup c Reset MAC IP not set up 0050H Occurs if the MAC address or IP address is not set up Transmission prohibited state 0060H Occurs if aPC link request was issued from the T2N in run mode in the message transmission prohibited state Occurs if a socket open close send or receive requestis issued by the T2N in run mode in the socket interface transmission prohibited state Format error 0070H Occurs when there is a format error in the request text Port number error Request code error 0073H Time setting Year 0074H Time setting Month Time setting Day Time setting Hour 0077H Time setting Minute Time setting Second o o 4 co I Opened 080H 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 Incorrect socket identifier Occurs if the socket identifier is out of range 1 to 8 Incorrect control request 0083H Occurs if a request that was prohibited by an operating mode control request is Specification issued Occurs if a run request is issued in run mode Occurs
183. uests module control and socket interface transmission to the Ethernet Port as being transmission requests As a result when a request is forcibly terminated and a response is not received from the Ethernet Port the result is a send request timeout even if the instruction was a RECV instruction e Ifa close request is comes from the remote port TCP socket while a connection is established the local port must also close the socket As a technique for checking for the reception of close requests from the remote TCP socket user programs should monitor the RCLOSE and CONN bits in the socket status See section 6 3 109 TOSHIBA 6F3B0362 e Ifaclose request is sent from the Ethernet Port TCP socket while a connection is established The T2N cannot reopen request using the same port number of the closed port number for 10 seconds or more since the Ethernet Port is set the close request Supplement On engineering workstation and personal computer systems it may not be possible to reopen a TCP socket on the port that performed the close processing for a fixed period e 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 e Ifthe T2N executes a open request in the same port number while the Ethernet Port is waiting
184. uiring an official IP address A ESES TOSHIBA 6F3B0362 c Notes on IP addresses The following IP addresses cannot be used with the Ethernet Port both for the local port and for remote port addresses e Addresses starting with 127 7FH e Addresses in which the network address is all zeros or all ones e Addresses in which the host address is all zeros or all ones d Broadcastaddresses The only broadcast address that can be used with the Ethernet Port is 255 255 255 255 FF FF FF FF The broadcast address 0 0 0 0 used on some UNIX systems 4 2 BSD cannot be used UNIX is an operating system used on engineering workstations EWS and other computers There are several versions of UNIX including ones developed by AT amp T Bell Laboratories Inc and ones developed by the University of California at Berkeley In particular 4 2 BSD is a version developed at Berkeley 2 Subnets and the subnet mask One technique for managing a network with a large number of ports is to divide that network into multiple subnets A subnet operates by taking some number of bits in the host address of the IP address for each class and using those bits as a subnetwork address 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
185. umber of sockets used between each request Interval between requests to the same socket gt Number of sockets used x 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 gt Number of remote ports x 50 ms e When PC link transmission or the UDP socket interface is used if an application transmits to a nonexistent remote port an transmission error TermSTS OBH detailed information 0020H occurs e Broadcast transmission It is possible to broadcast to all ports on the network using UDP sockets Send side Set the transmission destination address to 255 255 255 255 FF FF FF FF in hexadecimal The 0 0 0 0 used by some UNIX versions in particular 4 2 BSD cannot be used Specify the UDP port number for the socket to which you want to issue a broadcast as the transmission destination object socket UDP port number TOSHIBA 6F3B0362 f UDP transmission processing example Ladder program flowchart Error result UDP transmission processing start Socket status read verify The processing in this section can be performed at this stage or at the point the instruction terminates abnormally Are bits C and E both 1 Opened state The specified UDP socket is in the closed state Open processing is required Yes REE LER at et RG PEPEE EAE Stet tt et A ee ee Exe
186. ve 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 PC link host station _ User program T2N operating system ae Ethernet Port Response Sah ele ue TEN 10BASET 0 n Request Ethernet Port T2N operating t System User program PC link slave station Figure 1 3 T Series PC Link Protocol Transmission TOSHIBA 6F3B0362 3 Socket interface support This is a standard communications technique used on engineering workstations and similar computers Transmission between user programs on the T2N and host machines is possible 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 Host machine Personal computer Workstation Application program Data transmission 10BASE T Ethernet i Port Socket User program Figure 1 4 Socket Interface a TOSHIBA 6F3B0362 4 PC programmable controller gateway function This function is under development but is currently not supported Toshiba plans to add support to the T2N for a gateway function between the Ethernet Port and the TOSLINE S20LP Port
187. ximum segment length for 10BASE T cabling is cable i e segment lengths 100 meters Network cable 1 Do all ports on the network respond to ping 1 Inspect the twisted pair cables for missing termination check correctly resistors and damage 2 Is the collision frequently happen 2 Since network loading is heavy a er comm the table indicating he Transmission efficiency can be degraded TCP and collision e 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 3 Check whether there are any defective or substandard RAS information increasing as time connections on the cables and HUB passes Check for the presence of noise sources in the vicinity of Error counters Alignment error Short the network cables packet CRC error 162 TOSHIBA 6F3B0362 9 Installation and Wiring 9 1 Installation Environment and Base Unit Mounting The PU235N 245N must be used in the installation environment described in section 4 1 Installation Environment of the T2N User s Manual Hardware Also the PU235N 245N panel must be installed in conformance with the notes and cautionary advice presented in section 4 1 Installation Environment 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

Download Pdf Manuals

image

Related Search

Related Contents

液晶プロジェクター 品番 LP  Manual for web application “ Incoming Students”  Manual de Usuario de ICARO - Sede electrónica del Ministerio  Rapport spécial, Avril 2015 : L`entretien des routes en hiver    User Manual V2.5, 2012-01-18  Miele S 4000 Series User's Manual  

Copyright © All rights reserved.
DMCA: DMCA_mwitty#outlook.com.