Manuale d’uso / di manutenzione del prodotto T2N del fabbricante Toshiba
Vai alla pagina of 179
6 F 3 B 0 3 6 2 UM-TS02N**-E006 T2N Ethernet Port Instruction Manual • Keep this instruction manual where it can be easily referred to by users and those responsible for the equipment. • Read this instruction manual carefully before using the equipment.
1 6 F 3 B 0 3 6 2 © 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.
2 6 F 3 B 0 3 6 2 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.
3 6 F 3 B 0 3 6 2 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.
4 6 F 3 B 0 3 6 2 Safety Precautions (continued) • Precautions for operation WARNING 1. Build emergency stop, interlock, and similar circuits outs ide 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.
5 6 F 3 B 0 3 6 2 Safety Precautions (continued) • Mounting in the base unit CAUTION 1. The Ethernet Port is built-in the PU23 5N/245N. Do not remove the Ethernet Port from a PU235N/245N. 2. The PU235N/245N itself should only be mounted or removed when all power is turned off.
6 6 F 3 B 0 3 6 2 Safety Precautions (continued) Concerning: • Preparing for operation (software) • Computer link protocol and the PC link protocol transmission • Socket interface communication • RAS information CAUTION 1.
7 6 F 3 B 0 3 6 2 Safety Precautions (continued) • Basic points in laying out a network CAUTION 1. When laying network cable, take adequate safety measures and perform all operations in accordance with the relevant standards. See the ISO/IEC8802-3 standard for details on laying networks.
8 6 F 3 B 0 3 6 2 Usage Recommendations This section collects the knowledge and operations that should be known by all users of this equipment.
9 6 F 3 B 0 3 6 2 Usage Recommendations (continued) • Computer link protocol transmission Usage Recommendations 1. Since UDP/IP does not provide control functions to guaranteed communication reliability, higher level protocols (such as retry) are required.
10 6 F 3 B 0 3 6 2 Before Reading This Document Thank you for purchasing a Toshiba PROSEC T2N multi-purpose programmable controller. This manual describes the T2N Ethernet Port specifications and usage, and presents sample programs for the Ethernet Port used with the PROSEC T2N.
11 6 F 3 B 0 3 6 2 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.
12 6 F 3 B 0 3 6 2 Contents Safety Precautions ………………………………………………………………………… 2 Usage Recommendations ………………………………………………………………… 8 Before Reading This Document …………………………………………………………… 10 1.
13 6 F 3 B 0 3 6 2 6. Socket Interface Communication ……………………………………………………… 68 6.1 Overview ………………………………………………………………………… 68 6.2 Ethernet Port Socket Interface Usage Notes ………………………………………… 72 6.
14 6 F 3 B 0 3 6 2 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.
15 6 F 3 B 0 3 6 2 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.
16 6 F 3 B 0 3 6 2 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.
17 6 F 3 B 0 3 6 2 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.
18 6 F 3 B 0 3 6 2 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.
19 6 F 3 B 0 3 6 2 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.
20 6 F 3 B 0 3 6 2 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.
21 6 F 3 B 0 3 6 2 1.4 Ethernet Port Specifications Table 1.2 lists the Ethernet Port specifications. The general specifications of the Ethernet Port conform to those of the T2N main unit.
22 6 F 3 B 0 3 6 2 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.
23 6 F 3 B 0 3 6 2 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 it requires support from a higher level protocol.
24 6 F 3 B 0 3 6 2 2. Ethernet Port Parts and Functions This chapter describes the sections of the Ethernet Port and their functions. 2.1 Front Panel ERUN ET/R EACC SRUN SONL SACC STNH STNL OT.
25 6 F 3 B 0 3 6 2 2.2 Component Functions (1) LED Display Indicators that display the Ethernet Port operating state. ERUN ET/R EACC LED display (All LED ’ s color is green) Figure 2.
26 6 F 3 B 0 3 6 2 3. Preparing for Operation (Hardware) This section presents the Ethernet Port setup. WARNING 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.
27 6 F 3 B 0 3 6 2 3.1 Connecting to the Network The Ethernet Port supports 10BASE-T network. (1) Connection to a 10BASE-T Network This section describes the connection procedure starting from the state where the 10BASE-T twisted pair cable is already supplied and ready to be connected.
28 6 F 3 B 0 3 6 2 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.
29 6 F 3 B 0 3 6 2 (2) 10BASE5 • Coaxial cable • Plugs • Terminators • Adapters • Grounding clamps • AUI cable • MAU Catalog no. EEA-9202- ¨ M+TMJ x 2 ¨ : Length Standard outside diameter 10.3 mm diameter, with terminators at both ends Manufacturer Showa Electric Wire & Cable Co.
30 6 F 3 B 0 3 6 2 (3) 10BASE2 • Coaxial cable • BNC plugs • T connectors • Adapters • Terminators CAUTION 1. When installing a 10BASE5, 10BASE2 or 10BASE-T network, the cabling must be laid with adequate safety precautions and in accordance with all applicable standards.
31 6 F 3 B 0 3 6 2 4. Pr eparing for Operation (Software) This section describes setting up the Ethernet Port software for operation. CAUTION 1.
32 6 F 3 B 0 3 6 2 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.
33 6 F 3 B 0 3 6 2 (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 overview of the structure of the transfer parameters.
34 6 F 3 B 0 3 6 2 Table 4.2 Instructions (Requests) to the Ethernet Port (Part 2) Request Function Instruction CMD TCP open request Opens a socket interface (TCP). SEND 0035H TCP send request Sends data from a socket interface in the TCP open state.
35 6 F 3 B 0 3 6 2 (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 = 0BH, the detailed information (Ethernet Port error information) will be loaded into the registers indicated at location B + 1.
36 6 F 3 B 0 3 6 2 Table 4.4 TermSTS (Part 2) TermSTS Status Meaning 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.
37 6 F 3 B 0 3 6 2 Table 4.5 Detailed Information (Ethernet Port Error Responses) PART1 Error Code Description Normal complete 0001H Request completed normally Local port fault 0002H The local.
38 6 F 3 B 0 3 6 2 Table 4.6 Detailed Information (Ethernet Port Error Responses) PART2 Error Code Description Memory pool allocation failure 00A0H 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.
39 6 F 3 B 0 3 6 2 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 u.
40 6 F 3 B 0 3 6 2 (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.
41 6 F 3 B 0 3 6 2 4.4 Parameter Setup Request This section describes the procedure for Ethernet Port parameter setup in the Ethernet Port from a T2N user program.
42 6 F 3 B 0 3 6 2 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. • Addresses starting with 12 7 (7FH). • Addresses in which the network address is all zeros or all ones.
43 6 F 3 B 0 3 6 2 (3) Port number 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.
44 6 F 3 B 0 3 6 2 • 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 as message transmission. These techniques use dedicated UDP sockets that are separate from those used by socket interface transmission.
45 6 F 3 B 0 3 6 2 This program is executed by turning on the R0502 A contact. Parameters: 12544:3100H, 00018:0012H 29061:7185H, 02658:0A62H |R0502 R0602 | 1|-| |------------------------------.
46 6 F 3 B 0 3 6 2 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.
47 6 F 3 B 0 3 6 2 Figure 4.6 shows the Ethernet Port mode transitions. Figure 4.6 Ethernet Port Mode Transitions Run request Self check completes normally Unrecoverable error Self check terminates in an error state.
48 6 F 3 B 0 3 6 2 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.
49 6 F 3 B 0 3 6 2 d. Important items • Values other than 1010H, 1020H, 1030H, and 2000H may not be specified for the specification information.
50 6 F 3 B 0 3 6 2 5. Com puter Link Protocol and the PC Link Protocol Transmission CAUTION 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.
51 6 F 3 B 0 3 6 2 5.2 Sample Com puter Link Protocol Program 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.
52 6 F 3 B 0 3 6 2 /**********************************************************************/ /* */ /* Sample program implementing register read and write processing */ /* using the computer link protocol. */ /* */ /* This program is a sample program designed to verify the T2N */ /* Ethernet port computer link function.
53 6 F 3 B 0 3 6 2 /*---------------------------*/ /* Prototype declarations */ /*---------------------------*/ int cl_send( int ); /* Register read/write processing */ void main() { int ists;.
54 6 F 3 B 0 3 6 2 /* SLW */ /**********************************************************************/ /* */ /* cl_send - Register read/write processing */ /* */ /******************************.
55 6 F 3 B 0 3 6 2 sprintf( &csnd[ strlen( csnd ) ], "%02d", idat ) ; sprintf( &csnd[ strlen( csnd) ], "," ) ; icunt = 0 ; /* Comparison data storage index. */ for( j = 0, k = 0; k < DATASIZ; k++ ){ /* Set register write data.
56 6 F 3 B 0 3 6 2 /* Set the data count. */ idat = DATASIZ ; /* Register read data length. */ sprintf( &csnd[ strlen( csnd ) ], "%02d", idat ) ; sprintf( &csnd[ strlen( csnd )], ")¥r" ) ; isndsiz = strlen(csnd) ;/* Set up the data transmission length.
57 6 F 3 B 0 3 6 2 5.3 PC Link Protocol Transmiss ion (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.
58 6 F 3 B 0 3 6 2 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.
59 6 F 3 B 0 3 6 2 *2 Includes the expansion F registers(Only T3H). One bank has 64K words (0 to 65535). F 7 0 06 *3 The T and C register s hold data that has flags attached. Supplement: The transfer data length has a maximum of 323 words when data is transferred over the Ethernet.
60 6 F 3 B 0 3 6 2 • Write protection can be specified for eac h register type on the local T2N by using the special coil settings described below.
61 6 F 3 B 0 3 6 2 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.
62 6 F 3 B 0 3 6 2 (1) Transferred register data length Specifies the trans mission 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.
63 6 F 3 B 0 3 6 2 • 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.
64 6 F 3 B 0 3 6 2 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 the local port and writes it to the remote port's registers.
65 6 F 3 B 0 3 6 2 | | |R0520 R0090 | 1|-| |------------------------------------------------------------( )--| | | |/* PC link preparation */ | |R0520 | 2|-| |---|^|-+[ 01000 MOV RW090][ 00000.
66 6 F 3 B 0 3 6 2 |/* Register write */ | |R0092 | 4|-| |-+[12544 MOV W0903][00033 MOV W0904]----------------------------| | | /* Designates the module and sets the CMD number. */ | | | | +[RW092 MOV W0905]--------------------------------------------| | | /* Sets the transfer register data length.
67 6 F 3 B 0 3 6 2 |/* Comparison check */ | |R0094 | 6|-| |-+[00001 MOV W0940]------+[00001 MOV W0941][00980 MOV W0942]-------| | | | | | | | | | | +[00001 MOV W0943][00981 MOV W0944]-------|.
68 6 F 3 B 0 3 6 2 6. Socket Interface Communication CAUTION 1. Chapter 6 presents information related to using the functions provided by the Et hernet Port from a T2N, including the instruction (request) format, important items that require attention, and sample programs.
69 6 F 3 B 0 3 6 2 2. Differences between the UDP socket interface and the TCP socket interface a. UDP socke t interface (See figure 6.2.) • Provides an in/out port (socket) for data communication between a transmission source port and a transmission destination port.
70 6 F 3 B 0 3 6 2 b. TCP socket interface (See figures 6.3 and 6.4.) • In TCP communication, a pipe-like virtual communications line (connection) is established between sockets on two ports.
71 6 F 3 B 0 3 6 2 Figure 6.4 TCP Connection Communication Procedure (Overview) Closed state Closed state Passive open Active open Connection established Connection established Data transmissi.
72 6 F 3 B 0 3 6 2 6.2 Ethernet Port Socket Interface Usage Notes This section presents points that require attention when using the socket interface on the Ethernet Port for data transmission. 1. Data handling and data segmentation in UDP socket interface transmission and reception a.
73 6 F 3 B 0 3 6 2 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.
74 6 F 3 B 0 3 6 2 2. Data handlin g 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.
75 6 F 3 B 0 3 6 2 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. The upper limit of the fragment size is 1460 bytes.
76 6 F 3 B 0 3 6 2 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 .
77 6 F 3 B 0 3 6 2 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 byte.
78 6 F 3 B 0 3 6 2 3. Socket interface p ort 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.
79 6 F 3 B 0 3 6 2 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 whether or not the Ethernet Port has failed before attempting to recover from the error.
80 6 F 3 B 0 3 6 2 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.
81 6 F 3 B 0 3 6 2 j. For a 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.
82 6 F 3 B 0 3 6 2 RCLOSE CONN 6.3 Socket Interface Infor mation 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.
83 6 F 3 B 0 3 6 2 Bit no. Bit Condition under which the bit is set to 1 Condition under which the bit is reset to 0 F TCP TCP used by the socket The socket closed in response to a close reque.
84 6 F 3 B 0 3 6 2 6.4 Using the Ethernet Port Socket Interface This section describes the requests used by T2N user programs to use UDP and TCP sockets.
85 6 F 3 B 0 3 6 2 • 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.
86 6 F 3 B 0 3 6 2 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.
87 6 F 3 B 0 3 6 2 2. UDP send request/br oadcast send request (using the SEND instruction) a. Function This request sends local port register data using an open UDP socket.
88 6 F 3 B 0 3 6 2 • Values in the range 1024 to 65535 can be specified as the object socket UDP port number for the transmission destination.
89 6 F 3 B 0 3 6 2 f. UDP transmission processing example Ladder program flowchart Error result UDP transmission processing start Socket status read/verify Are bits C and E both 1? (Opened state?) Yes Execute a UDP send request (CMD = 0032H). Hold the input of function block in the on state until the SEND instruction completes.
90 6 F 3 B 0 3 6 2 3. 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.
91 6 F 3 B 0 3 6 2 d. Methods for storing reception data • Allocate a reception data storage register area with a size equal to the size of the reception data plus one word.
92 6 F 3 B 0 3 6 2 • 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.
93 6 F 3 B 0 3 6 2 g. UDP reception processing example (Socket status monitoring type) Ladder program flowchart Error result UDP reception processing start Socket status read/verify Are bits C and E both 1? (Opened state?) Yes Is bit A set to 1? (Reception text present.
94 6 F 3 B 0 3 6 2 h. UDP reception processing example (Receive request issued 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 Execute a UDP receive request (CMD = 0033H).
95 6 F 3 B 0 3 6 2 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 p arameters A 3100H Module designation A+1 CMD = 0034H Command number A+2 SportNO Socket identifier (1 to 8) c.
96 6 F 3 B 0 3 6 2 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.
97 6 F 3 B 0 3 6 2 5. TCP open request (using the SEND instruction) a. Function This request opens (active/passive) any of the eight sockets. Transmission protocol: TCP/IP b.
98 6 F 3 B 0 3 6 2 • 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 must not overlap with any UDP port numbers or UDP port numbers used for message transmission.
99 6 F 3 B 0 3 6 2 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 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.
100 6 F 3 B 0 3 6 2 6. TCP send request (using the SEND instruction) a. Function This request sends local port register data using an open TCP socket.
101 6 F 3 B 0 3 6 2 • 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).
102 6 F 3 B 0 3 6 2 • The Ethernet Port uses a p riority ordering in processing sockets 1 through 8. Therefore, systems constructed so that socket 1 is activated frequently may not be able t.
103 6 F 3 B 0 3 6 2 e. TCP transmission processing example Ladder program flowchart Error result TCP transmission processing start Socket status read/verify Are bits B and F both 1? (Is a connection established?) Yes Are bits 8 and 9 both 0? (In neither the RCLOSE nor NOACK state?) Yes Execute a TCP send request (CMD = 0037H).
104 6 F 3 B 0 3 6 2 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.
105 6 F 3 B 0 3 6 2 • The T2 N 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 dis carded.
106 6 F 3 B 0 3 6 2 • One of the following problems may have occurred when there is no response from the remote port: • The remote port may have gone down. • Power may have been lost. • The remote ports and/or local port may have become disconnected fr om the network.
107 6 F 3 B 0 3 6 2 f. TCP reception processing example (Socket status monitoring type) Ladder program flowchart Error result TCP reception processing start Socket status read/verify Are bits .
108 6 F 3 B 0 3 6 2 g. TCP reception processing example (Receive request issued first type) Ladder program flowchart Error result TCP reception processing start Socket status read/verify Are b.
109 6 F 3 B 0 3 6 2 8. TCP close request (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.
110 6 F 3 B 0 3 6 2 • If a close request is se nt 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.
111 6 F 3 B 0 3 6 2 e. TCP close proc essing 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).
112 6 F 3 B 0 3 6 2 6.5 Sample Programs This section presents sample programs using UDP and TCP sockets. 1. 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.
113 6 F 3 B 0 3 6 2 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.
114 6 F 3 B 0 3 6 2 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.
115 6 F 3 B 0 3 6 2 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.
116 6 F 3 B 0 3 6 2 2. 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.
117 6 F 3 B 0 3 6 2 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.
118 6 F 3 B 0 3 6 2 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.
119 6 F 3 B 0 3 6 2 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.
120 6 F 3 B 0 3 6 2 e. TCP receive request 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.
121 6 F 3 B 0 3 6 2 | /* TCP fragmented data reception processing */ | | | |R0635 R063D | 2|-| |-+-|/|--[RW000 RECV RW010][SET R063D]----------------------------| | | /* Request setup */ | |R0.
122 6 F 3 B 0 3 6 2 7. RAS Information This chapter describes the following RAS functions provided by the Ethernet Port. CAUTION 1. Chapter 7 p resents 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.
123 6 F 3 B 0 3 6 2 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 Name Function S000B Ethernet Port error (warning) 1: The installed Ethernet Port unit is down.
124 6 F 3 B 0 3 6 2 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.
125 6 F 3 B 0 3 6 2 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.
126 6 F 3 B 0 3 6 2 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.
127 6 F 3 B 0 3 6 2 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 ↓ 85H.
128 6 F 3 B 0 3 6 2 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.
129 6 F 3 B 0 3 6 2 • For data storage registers, a boundary error ( TermSTS = 0AH) occurs if the specified area (start register + register range) does not exist in the local port. • A response timeout error ( TermSTS = 02H) occurs if the loopback response time exceeds the time specified by the timer counter value.
130 6 F 3 B 0 3 6 2 Time set request (using the SEND instruction) a. Function This request sets the Ethernet Port internal time from a user program.
131 6 F 3 B 0 3 6 2 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.
132 6 F 3 B 0 3 6 2 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.
133 6 F 3 B 0 3 6 2 c. Status (See figure 4.3 for details on bits C, D, E and F.) F E DC BA 9876543210 B 0000 TermSTS B+1 Detailed information (Only valid when TermSTS = 0BH.) d. Important items • This request can be used in run and standby modes.
134 6 F 3 B 0 3 6 2 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.
135 6 F 3 B 0 3 6 2 f. RAS information details (1) RAS counters ........................... LAN controller (line) information Reads out 128 words of data using RAS information readout.
136 6 F 3 B 0 3 6 2 (3) MIB information: MIB_IP ....... IP proto col information Reads out 17 words of data using RAS information readout. Table 7.
137 6 F 3 B 0 3 6 2 (5) MIB information: MIB_UDP ... UDP protocol information Reads out 4 words of data using RAS information readout. Table 7.
138 6 F 3 B 0 3 6 2 • Event trace item: See table 7.7 Table 7.7 Event Trace Items Event code Detail information 1 (H) Detail information 2 (H) Detail information 3 (H) Detail information 4 (.
139 6 F 3 B 0 3 6 2 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 byt.
140 6 F 3 B 0 3 6 2 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.
141 6 F 3 B 0 3 6 2 Table 8.2 Ethernet Port Down States Indicated by ERUN, ET/R LED Combinations LED combination displayed State ERUN lit Ethernet Port 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.
142 6 F 3 B 0 3 6 2 The EACC LED indicates when the T2N is accessing the Ethernet Port. Table 8.3 States Indicated by the EACC LED LED display State EACC (Access) Indicates whether or not the T2N is accessing the Ethernet Port. • Lit .......
143 6 F 3 B 0 3 6 2 8.2 Status (error status) The status indicates the status during SEND/RECV instruction execution or after execution completes.
144 6 F 3 B 0 3 6 2 Table 8.5 TermSTS (Part 2) TermSTS Status Meaning 03H Parameter error • Occurs if a value other than 3 is specifie d 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.
145 6 F 3 B 0 3 6 2 Table 8.6 Detailed Information (Ethernet Port Error Responses) Error Code Description Normal complete 0001H Request completed normally Local port fault 0002H The local port.
146 6 F 3 B 0 3 6 2 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 Name Function S000B Ethernet Port error (warning) 1: The installed Ethernet Port unit is down.
147 6 F 3 B 0 3 6 2 RCLOSE NOACK CONN RCV 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.
148 6 F 3 B 0 3 6 2 8.5 Troubleshoot ing 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.
149 6 F 3 B 0 3 6 2 4. If the 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.
150 6 F 3 B 0 3 6 2 b. Operating mode control request START Set up correct specification information and issue an operating mode control request. No Is an operating mode control request executed? Yes Verify the status using the procedure described in the item 3 " If a SEND or RECV instruction fails complete" on page 148 .
151 6 F 3 B 0 3 6 2 5. If computer link protocol transmission fails a. Host computer side (main port) START Verify the slave Ethernet Port transmission destination IP address. No Is the transmission destination IP address set to that of the slave Ethernet Port? Yes Check the network verification items, i.
152 6 F 3 B 0 3 6 2 b. Ethernet Port side (slave port) START Set the Ethernet Port to run + message transmission enabled using an operating mode control request.
153 6 F 3 B 0 3 6 2 6. If PC link protocol transmission fails a. Main port side Ethernet Port START Verify the status using the procedure described in the item 3 " If a SEND or RECV instruction fails complete" on page 148 .
154 6 F 3 B 0 3 6 2 b. Ethernet Port side (slave p ort) START Set the Ethernet Port to run + message transmission enabled using an operating mode control request. No Is the station status such that run + message transmission is enabled? Yes 1.
155 6 F 3 B 0 3 6 2 7. If transmission using UDP sockets fails a. Open and close requests START Verify the status using the procedure described in the item 3 " If a SEND or RECV instruction fails complete" on page 148 .
156 6 F 3 B 0 3 6 2 b. Send request START Verify the status using the procedure described in the item 3 " If a SEND or RECV instruction fails complete" on page 148 . No Yes Does the SEND instruction complete? Set the Ethernet Port to run + socket transmission enabled using an operating mode control request.
157 6 F 3 B 0 3 6 2 c. Receive request START Resolve the problem by referring to the status. Transmit a message at the remote port. Verify the status using the procedure described in the item 3 " If a SEND or RECV instruction fails complete" on page 148 .
158 6 F 3 B 0 3 6 2 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 START Resolve the problem by referring to the status.
159 6 F 3 B 0 3 6 2 b. Close request START Verify the status using the procedure described in the item 3 " If a SEND or RECV instruction fails complete" on page 148 . No Does the SEND instruction complete? Yes Set the Ethernet Port to run + socket transmission enabled using an operating mode control request.
160 6 F 3 B 0 3 6 2 c. Send request Close the socket. START Check the status and resolve the error. Is the socket status RCLOSE bit? No Does the status indicate a timeout error? TermSTS = 0BH Details = 0020H Status: Unopened ( TermSTS = 0BH, details = 0081H) Status: Protocol error ( TermSTS = 0BH, details = 0091H) Yes 1.
161 6 F 3 B 0 3 6 2 d. Receive request START Resolve the problem by referring to the status. Transmit a message at the remote port. Verify the status using the procedure described in the item 3 " If a SEND or RECV instruction fails complete" on page 148 .
162 6 F 3 B 0 3 6 2 9. Network check items (Ethernet Port) Check items Countermeasure 1. Is the twisted pair cable connected between the Ethernet Port and HUB? 1. Verify the twisted pair cable connections between the Ethernet Port and HUB. 2. How long (in meters) are the twisted pair cable (i.
163 6 F 3 B 0 3 6 2 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.
164 6 F 3 B 0 3 6 2 9.2 Network Wiring 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.
165 6 F 3 B 0 3 6 2 b . Overview of wiring without protective pipes (1) To protect the cables, cab les should be passed through flooring ducts or wire protecting cable covers should be used. Note that these cables should not be laid adjacent to cables carrying high currents.
166 6 F 3 B 0 3 6 2 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.
167 6 F 3 B 0 3 6 2 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) Usin g a route dedicated to plant control related lines 2.
168 6 F 3 B 0 3 6 2 5. Note s 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.
169 6 F 3 B 0 3 6 2 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. Table A.
170 6 F 3 B 0 3 6 2 CAUTION 1. 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.
171 6 F 3 B 0 3 6 2 Appendix 2 Request Code Table 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.
172 6 F 3 B 0 3 6 2 Socket identifier:Only valid for socket interface transmission instructions. ("0" for other instructions) status 0: Initial state 1: While send requesting 2: Send complete and while waiting response 3: Complete Appendix 3 Status Table Figure a.
173 6 F 3 B 0 3 6 2 Table A.4 TermSTS (Part 2) TermSTS Status Meaning 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.
174 6 F 3 B 0 3 6 2 Table A.5 Detailed Information (Ethernet Port Error Responses) Error Code Description Normal complete 0001H Request completed normally Local port fault 0002H The local port.
175 6 F 3 B 0 3 6 2 Appendix 4 Limitations on the T2N SEND and RECV Instruc tions 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.
176 6 F 3 B 0 3 6 2 Table A.6 Number of Words that can be Transmitted Using PC Link Protocol with the Ethernet Port [When TCP/UDP socket transmission is not used] Module classification Process.
177 6 F 3 B 0 3 6 2 (2) When using socket transmission (TCP or UD P) with the Ethernet Port Table A.7 Number of Words that can be Transmitted Using TCP/UDP Socket Transmission with the Etherne.
178 6 F 3 B 0 3 6 2 (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.
Un punto importante, dopo l’acquisto del dispositivo (o anche prima di acquisto) è quello di leggere il manuale. Dobbiamo farlo per diversi motivi semplici:
Se non hai ancora comprato il Toshiba T2N è un buon momento per familiarizzare con i dati di base del prodotto. Prime consultare le pagine iniziali del manuale d’uso, che si trova al di sopra. Dovresti trovare lì i dati tecnici più importanti del Toshiba T2N - in questo modo è possibile verificare se l’apparecchio soddisfa le tue esigenze. Esplorando le pagine segenti del manuali d’uso Toshiba T2N imparerai tutte le caratteristiche del prodotto e le informazioni sul suo funzionamento. Le informazioni sul Toshiba T2N ti aiuteranno sicuramente a prendere una decisione relativa all’acquisto.
In una situazione in cui hai già il Toshiba T2N, ma non hai ancora letto il manuale d’uso, dovresti farlo per le ragioni sopra descritte. Saprai quindi se hai correttamente usato le funzioni disponibili, e se hai commesso errori che possono ridurre la durata di vita del Toshiba T2N.
Tuttavia, uno dei ruoli più importanti per l’utente svolti dal manuale d’uso è quello di aiutare a risolvere i problemi con il Toshiba T2N. Quasi sempre, ci troverai Troubleshooting, cioè i guasti più frequenti e malfunzionamenti del dispositivo Toshiba T2N insieme con le istruzioni su come risolverli. Anche se non si riesci a risolvere il problema, il manuale d’uso ti mostrerà il percorso di ulteriori procedimenti – il contatto con il centro servizio clienti o il servizio più vicino.