HITACHI PROGRAMMABLE CONTROLLER APPLICATION MANUAL for NETWORK NJI-491A(X)
Revision History No. 1 2 Description of Revision Date of Revision Manual number The first edition 2006.04 - - Add explanation for EHV-CPU64 / 32 / 16. 2007.02 NJI-491A(X) - Add explanation for Communication function.
Table of Contents Chapter 1 1.1 1.2 Chapter 2 Network Configuration 1-1 to 1-9 Communication port for CPU module...................................................................................... 1-2 Network configuration for Communication module ................................................................ 1-5 Specification of Communication port for CPU module 2-1 to 2-52 2.1 2.2 Features............................................................................................................
MEMO
Chapter 1 Network Configuration EHV-CPU can configure various network systems depending on a combination of the communication port for CPU module and the communication module. Host Ethernet IEEE802.3 EH-150 H series EH-150 FL-net EH-150 PLC by other maker CPU link (Coaxial/Optical fiber) Positioning system Figure 1.
Chapter 1 1.1 Network Configuration Communication port for CPU module EHV-CPU is equipped with USB communication port, Serial communication port, and Ethernet communication port. The personal computer can be connected to every port, and you can create programs and monitor the system by using Control Editor which is a programming software. USB communication port It is a maintenance port for programming software.
Chapter 1 Network Configuration (1) Dedicated procedure communication (Task code communication) A dedicated procedure communication of Hitachi PLC is called a task code communication. CPU can be controlled from the host and I/O can be read and written. Each sales maker provides a driver for this task code communication such as a touch panel and HMI (Human Machine Interface) software. For compatible Hitachi PLCs, it is unnecessary to create a special program.
Chapter 1 Network Configuration Ethernet communication port ASR communication ASR communication function can be used for the event transmitting function which transmits data from the CPU to the host actively at the event occurrence, the cycle transmission which transmits data to the host at constant interval, and when receiving message data from the host at any timing. There are 6 connections and the communication method can be specified respectively.
Chapter 1 1.2 Network Configuration Network configuration for Communication module An example of a network configuration using the communication module is shown below. Refer to each instruction for detailed specification of each module. (1) Ethernet module (EH-ETH) If industrial equipments are connected to the information system network, it is useful for performing production control, system operation monitor, facilities monitor, and maintenance smoothly. 1.
Chapter 1 Network Configuration (2) DeviceNetTM Mater module (EH-RMD) / Slave controller (EH-IOCD) Since DeviceNetTM master module / Slave controller conform to DeviceNet which is a open filed network, not only our master/slave device but also master/slave device made in other maker can be connected. EH-150 DeviceNet Master device Inverter L100DN/SJ100DN AC servo AD series NX-SDC (Dispersion controller) Device made in other maker EH-150 DeviceNet Slave controller Figure 1.
Chapter 1 Network Configuration (3) Serial interface module (EH-SIO) 1. Communication with Serial communication equipments (General-purpose communication) User program performs communication with external equipments. “TRNS 9” which is a command for EH-SIO performs EH-SIO control by EHV-CPU and transmitting and receiving of data. Host RS-232C RS-422 Bar code reader Figure 1.9 System configuration at general-purpose communication 2.
Chapter 1 Network Configuration 3. Communication with Communication protocol (Hi-Protocol) support equipments for Hitachi H/EH series This can connect with HMI supporting Hi-Protocol. It can connect equipments supporting Hi-Protocol (HMI etc.), setting EH-SIO to Hi-Protocol mode. Figure 1.11 System configuration in connecting HMI 4. Simple data link function Simple data link is a function to exchange I/O information with a slave by communication, setting EH-SIO to a master.
Chapter 1 Network Configuration (4) CPU link module (Coaxial: EH-LNK, Optical: EH-OLNK) CPU link can be formed by using the CPU link module (coaxial and optical). And the entry into the existing H-series CPU link network is possible. Fig.1.13 shows an example of a system configuration using the CPU link module (coaxial and optical). ST0 ST61 EH-150 series Link system 2 ST1 ST0 ST62 ST63 ST : Station No.
MEMO
Chapter 2 2.1 Specification of Communication port for CPU module Features EHV-CPU has three communication ports as follows. (1) Ethernet communication port (2) Serial communication port (3) USB communication port USB communication port Serial communication port Ethernet communication port Figure 2.1 Communication port (1) Ethernet communication port EHV-CPU has 4 ports as a task code dedicated port for communicating by the dedicated protocol of H series.
Chapter 2 Specification of Communication port for CPU module (3) USB communication port USB communication port is a dedicated port to connect the Control Editor. Programming and monitoring are possible. Programming software ”Control Editor” Fig.2.2 Creation of program Monitoring EHV-CPU Programming software connection diagram HMI software Application EHV-CPU Touch pannel Figure 2.
Chapter 2 2.2 Specification of Communication port for CPU module Ethernet communication port 2.2.1 Task code communication port Task code communication can achieve the following functions by combining individual communication command on a host program. (1) CPU control (occupy / release, CPU status read, etc.) (2) I/O control (all kinds of monitors) (3) Memory write (all clear, batch transfer, etc.) (4) Memory read (read of program, etc.
Chapter 2 Specification of Communication port for CPU module 2.2.2 ASR communication port ASR communication function can be used when message data is transmitted from this unit to the host actively at the event occurrence, and message data is received from the host at any time. And communication procedures can be established according to the system.
Chapter 2 Specification of Communication port for CPU module Communication type You can specify the following 4 communication types. Table 2.3 Communication type for ASR communication Type Description 1 Not used Not perform the transmitting and receiving 2 Transmitting and receiving Performs the transmitting and receiving to the other station. 3 Only transmitting Performs the transmitting to the other station only. 4 Only receiving Performs the receiving only.
Chapter 2 Specification of Communication port for CPU module “Specified” and “Optional” for the other station Message communication can be achieved with any station if TCP/IP-Active open is specified or UDP/IP-receiving is specified. Transmitting Broadcast When “Transmitting and receiving”, or “Transmitting only” is specified using UDP/IP, message data can be exchanged between the logical ports which satisfy the following requirements.
Chapter 2 Specification of Communication port for CPU module Setup item Items need to be set up depending on the combination of the communication type, the connection type, and the transmitting type. Required items are shown below. ”3” is marked to the item which should be set the parameter specifying in the following table for the communication. * The Control Editor is used in setting up. When the port supply is turned on at next, the set information becomes effective. Table 2.
Chapter 2 Specification of Communication port for CPU module Transmitting area and receiving are information In ASR communication, areas for the I/O memory which store message data to transmit and which store message data received need to be specifies. Both the size which can be transmitted and received are 1 to 730 words. Table 2.
Chapter 2 Specification of Communication port for CPU module Number of retry times and Retry interval for Connection open When TCP/IP-active is specified, the number of retry times and the retry interval for the connection open when failing can be specified. When there is no response to the packet including the SYN flag*1 transmitted from the EHV-CPU, the retry is performed three times. And this process is repeated for the number of retry times.
Chapter 2 Specification of Communication port for CPU module Status Register, Control register, Transmitting counter, Receiving counter The status register, the control register, the transmitting counter, and the receiving counter for ASR communication are assigned to the special internal output WRF600 or later. Table 2.9 No.
Chapter 2 Specification of Communication port for CPU module Details of the status register, the control register, the transmitting counter, and the receiving counter are described below. b15 b8 b7 Status register [5] b0 [4] Control register [3] [2] [1] +00 [B] [A] +01 Transmitting counter +02 Receiving counter +03 Figure 2.
Chapter 2 Specification of Communication port for CPU module (1) ASR port status flag [1] and ASR port open request flag [A] [TCP/IP Active] If user turns on the ASR port open request flag [A], the system will open the connection with the communication other stations. If the other station is waiting for the connection open, the connection will be open normally and the ASR port status flag [1] will turn ON and it will be indicated that the connection is opening.
Chapter 2 Specification of Communication port for CPU module (*) In case where the connection is not closed normally. When the connection is not closed normally for reasons that the cable came off, etc., the process mentioned above is not performed. When the set of the transmitting and receiving is specified to “Transmitting” or “Transmitting and receiving”, it is detected by the transmitting timeout that the connection is not opened normally and the ASR port status flag [1] is turned ON.
Chapter 2 Specification of Communication port for CPU module [UDP/IP] If user turns on the ASR port open request flag [A], the ASR port is opened and it is that the ASR port is opening because the ASR port status flag [1] is turned off. In this status, message data can be transmitted and received. When UDP/IP other station is fixed, ARP packet is transmitted to communication destination when message data is transmitted for the first time.
Chapter 2 Specification of Communication port for CPU module (2) Event transmitting completion flag [2] and Event transmitting request flag [B] If user turns on the event transmitting request flag [B] when message data can be transmitted and received (the connection is established in TCP/IP, and ASR port is opened in UDP/IP), the system will transmit message data. If the transmitting of message data is completed, the system will turn on the event transmitting completion flag [2].
Chapter 2 Specification of Communication port for CPU module (4) Error flag [4] and Error code [5] The system will turn on the error flag [4] and store the error code [5] if factors of the error are found in the system. User must clear this flag and area if necessary because the system does not clear them. [B] Turn OFF the flag by user if necessary. (System does not turn OFF the flag.) Detection of error [4] [5] Error code set Error code reset : Operation by user Clear the code by user if necessary.
Chapter 2 Specification of Communication port for CPU module TCP/IP protocols When using TCP/IP to communicate, it is necessary to establish the connection between communication stations. Otherwise, message data cannot be sent and received. In order to establish the connection, set one side to the TCP/IP connection active open, and set the other side to the TCP/IP connection passive open.
Chapter 2 Specification of Communication port for CPU module UDP/IP protocols In the ASR communication port, when using UDP/IP to communication, it is necessary to open the ASR port. Message data can be sent and received after the ASR port is opened. Message data cannot be sent and received if the ASR port is closed. When receiving messages while the ASR port is closed, the receiving data is cancelled. In the ASR communication port, close the port to terminal the communication.
Chapter 2 Specification of Communication port for CPU module Sample program [Sample 1] Network consists of two EHV-CPUs as follows, and the Control Editor sets the ASR communication. The setting information for two EHV-CPUs is as follows. EHV-CPU2 (Passive, Receive) EHV-CPU1 (Active, Send) Data sending Figure 2.20 Table 2.10 Connection diagram of Sample 1 Setting information of Sample 1 Setting EHV-CPU1 EHV-CPU2 1 IP address 192.168.0.1 192.168.0.2 2 Port No.
Chapter 2 Specification of Communication port for CPU module [Sample program of EHV-CPU2] R7E3 Opens the connection just after the RUN start, or at the falling of OFF of the ASR open request flag after the connection of ASR port 1 is closed. WRF601 = H0001 WRF601.0 DFN WRF600.0 DFN When the connection of ASR port 1 is cut by other station and the cable is cut, the ASR port open request flag falls when the connection is closed.
Chapter 2 Specification of Communication port for CPU module [Sample program of EHV-CPU3] R0 WRF600.0 R1 DIF WRF601 = H0001 Opens the ASR port 1 at the rising edge of R0. WRF601 = H0000 The ASR port open request flag falls when the ASR port 1 is closed. DFN DIF WRF601.1 S WRF600.1 DIF WRF601.1 R WRF600.1 Performs the event transmitting at the rising edge of R1. The event transmitting completion flag, the event transmitting request flag, and R1 fall when the event transmitting is completed.
Chapter 2 Specification of Communication port for CPU module Tale 2.12 Setting information of Sample 3 Setting EHV-CPU4 Web controller 1 IP address 192.168.0.1 192.168.0.2 2 Port No. 4000 4000 3 Protocol TCP/IP-active, Specified TCP/IP-passive, Specified 4 Send / Receive Send / Receive Send / Receive 5 Access point – IP address 192.168.0.2 192.168.0.1 6 Access point – Port No.
Chapter 2 Specification of Communication port for CPU module [Sample 4] Network consists of two EHV-CPUs as follows, and the Control Editor sets the ASR communication. The setting information of two EHV-CPUs is as follows. 16-word data from WR0 to WRF of EHV-CPU5 is transmitted from EHV-CPU5 to EHV-CPU6. In EHV-CPU6, the received data is stored in WR0 to WRF. EHV-CPU6 (Passive, Receive) EHV-CPU5 (Active, Send) Data sending Figure 2.23 Table 2.
Chapter 2 Specification of Communication port for CPU module [Sample program of EHV-CPU5 and 6] R7E3 ASR port is closed immediately after RUN or in falling which ASR port status flag turns off after ASR port 1 is closed. WRF601 = H0000 R0 = 1 WRF600.0 DFN R0 TD0 TC TD0 WRF601 = H0000 2 – 24 1ms 2000 TD0 turns on in two seconds later after ASR port close. ASR port open request bit is turned on in two seconds later after ASR port close, and ASR port is opened.
Chapter 2 Specification of Communication port for CPU module Cautionary note In communication (Task code processing and ASR communication) of EHV-CPU series, the response may delay if CPU is loaded. We would explain a load of CPU below. Please utilize this as a standard in considering the responsibility of communications.
Chapter 2 Specification of Communication port for CPU module [Calculation method of communication processing time] Communication processing time can calculate using the following methods, and is calculated on the basis of the transmission interval of ASR.
Chapter 2 Specification of Communication port for CPU module [About Task code processing time] In EHV-CPU, Task code communication is executed when Control Editor is connected in Online mode and the indicator such as a touch panel is connected. Processing time of task code changes according to I/O points to be monitored. A relation between I/O points to be monitored and task code is shown below. (Task code transmission interval is 110ms according to an original measurement conditions.
Chapter 2 Specification of Communication port for CPU module [About Transmission interval design of ASR communication] ASR communication is set to the lower priority than Task code communication in communication processing. Therefore, the time which subtracts the task code processing time from the communication processing time is a time given to ASR communication.
Chapter 2 2.2.3 Specification of Communication port for CPU module Reset function for Ethernet communication port When communication using the Ethernet communication port cannot be performed by some factors, communication can be performed again by resetting the port. This port reset function can reset four task code ports and 6 ASR ports individually. Therefore, only a port to reset can be reset without stopping the port which is communicating normally.
Chapter 2 Specification of Communication port for CPU module OFF by system ON by user ON Reset request: R91x OFF Processing inside CPU Reset processing Figure 2.28 Reset function for Ethernet communication port ■ Cautionary note The above bit can return the Ethernet communication processing inside EHV-CPU to the initial status but cannot reset the hardware.
Chapter 2 2.2.4 Specification of Communication port for CPU module NTP client function EHV-CPU is equipped with the SNTP (Simple Network Time Protocol) client function which retrieves the current time from the NTP (Network Time Protocol) server and the SNTP server on the network. The interval of retrievals can be set by specifying time and minute. And this function can control when the current time is retrieved from a user program.
Chapter 2 Specification of Communication port for CPU module It is controllable using the bit special internal output from the user program when the NTP server is accessed. And the setup of the time zone and the current time retrieved from the NTP server are stored in the word special internal output. (1) Bit special internal output Table 2.17 Bit special internal output for NTP function No.
Chapter 2 Specification of Communication port for CPU module ■ Cautionary note When the NTP time retrieving request (R901) competes with the read (R7F8) and the write (R7F9) of the calendar clock, and the 30s adjust (R7FA), another processing is not performed until the processing to the first detected request is completed because the first request detected by system is processed first. (2) Word special internal output Table 2.18 No.
Chapter 2 Specification of Communication port for CPU module 2.2.5 Factory setting The factory setting of the Ethernet communication port is as following. Table 2.21 Factory setting for Ethernet communication port Item Setup IP address 192.168.0.1 Subnet mask 255.255.255.0 Default gateway 0.0.0.0 Ethernet communication speed (*) 10M half-duplex NTP setting Invalid Time zone GMT+09:00 Task code communication setting Port 1 Valid Port 1 Port No.
Chapter 2 2.3 Specification of Communication port for CPU module Serial communication port 2.3.1 Pin arrangement (1) RS-232C [1] SG1 CD1 [2] CD1 Microprocessor ER1 [5] SD1 RX1 RS1 [5] [6] RD1 [6] [7] DR1 [7] [8] Circuit diagram and pin numbers for Serial communication port RS-232C Table 2.21 [8] [4] [8] RS1 Figure 2.33 [1] [2] [3] [4] [5] [6] [7] [2] [3] TX1 RS1 Signal abbreviation SG1 CD1 ER1 ER2 SD1 RD1 DR1 [1] [4] ER2 DR1 Pin No.
Chapter 2 Specification of Communication port for CPU module (3) Pin arrangement for RS-422 / 485 EHV-CPU Serial port EHV-CPU Serial port SG1 [1] [1] SG1 N.C. [2] [2] N.C. N.C. N.C. [3] [3] TX [4] [4] TX TXN [5] [5] TXN RXN [6] [6] RXN RX [7] [7] RX N.C. [8] [8] N.C. Figure 2.35 Signal connection diagram for RS-422 EHV-CPU Serial port EHV-CPU Serial port SG1 [1] N.C. [2] N.C. [3] TX [4] TXN [5] RXN [6] RX [7] N.C. [8] Figure 2.
Chapter 2 2.3.2 Specification of Communication port for CPU module Dedicated port The specifications in setting the serial communication port as a dedicated port is shown in the table 2.21. In the dedicated port, a CPU program can be created or monitored from the programming device connected. Also, a monitoring system which uses a monitor available on the market can be constructed. Moreover, a variety of systems can be constructed by connecting a personal computer and creating software.
Chapter 2 Specification of Communication port for CPU module [Specifications of RS-422 and 485 of Serial communication] Serial communication system of EHV-CPU is Half duplex. Half duplex is a communication system which can transmit to only one direction of both directions communication. When the serial communication port for EHC=CPU is used as a dedicated port, EHV-CPU repeats an operation of responding the request transmitted from the peripheral device.
Chapter 2 2.3.3 Specification of Communication port for CPU module General-purpose port Serial communication port can be used as a general-purpose port. When it is specified as a general-purpose port, the transmitting and receiving operations are controlled by the user program. The specifications for the general-purpose port is shown in the table 2.24. For setup and setting of the connected cables, please check beforehand whether it is user as the purpose. Table 2.
Chapter 2 Specification of Communication port for CPU module (1) 1: N communication (RS-485) (A) Precautions When performing 1 to N communication using RS-485, communicate in polling/selecting mode. When creating a ladder program, note the following points. [1] Communicate by making sure the master station and slave station are using the same start code. [2] The master station should transmit a request by specifying the station number of the slave station.
Chapter 2 Specification of Communication port for CPU module (B) Sample program The following shows a simple program which communicates between one master station and three slave stations using RS-485. [1] Mounting the module (a) Master station side 1 Mounts the 16-point output module in the slot 1 of the basic base.
Chapter 2 Specification of Communication port for CPU module (b) Assignment internal output in the slave station I/O WM WR No.
Chapter 2 Specification of Communication port for CPU module [5] Program (a) Program on the master station side (with three slave stations) R7E3 WR4001 = 3 (00001) Sets the number of slave stations to 3.
Chapter 2 Specification of Communication port for CPU module (b) Program in the slave station side (slave station No.
Chapter 2 Specification of Communication port for CPU module R400 TD63 TD63 DIF R300 = 1 R400 = 0 WY10 = WY10 + 1 (00009) 1ms 20 (00010) Starts up TRNS 0 after 20 ms has been elapsed. (00011) END (00012) Subroutine 0 Turns on the receiving execution flag. Turns off the receiving normal completion flag.
Chapter 2 2.3.4 Specification of Communication port for CPU module Modem connection function EHV-CPU is equipped with a model connection function. The model connection function can be controlled using task codes. The setup on the Control Editor is needed to use this function. Refer to the following table for communication specifications. If a difference of communication speed between two operating modems, connecting between them may be difficult.
Chapter 2 Table 2.26 List of signals for Serial communication port at connecting modem Signal abbreviation SG1 CD1 ER1 ER2 SD1 RD1 DR1 RS1 Pin No. 1] 2] 3] 4] 5] 6] 7] 8] Specification of Communication port for CPU module Direction CPU Modem Meaning Grand for signal Notification signal during carrier received. Connects to CD in the modem. Communication enable signal of the terminal Unused Data transmitted by CPU. Connects to SD in the modem. Data received by CPU. Connects to RD in the modem.
Chapter 2 Specification of Communication port for CPU module (B) List of commands(extract) [1] AT command Command Function overview Example AT Automatically recognizes data format. - A/ Re-executes the response directly preceding. - ATA ATDmm ATEn ATHn Forced receiving Dial Command error (echo-back the input character string in the modem) Line ON/OFF ATPn Pulse setting (dial) ATQn Setting of result code excluding/including ATT ATSn=X ATVn Tone setting (push) Sets S register value.
Chapter 2 Specification of Communication port for CPU module (C) Sequence An example of a communication sequence using the Omron-made modem ME3314A is shown below.
Chapter 2 2.3.5 Specification of Communication port for CPU module Connection between Serial communication port and Peripheral device Table 2.27 shows cables to connect a peripheral unit to RS-232C interface for serial communication port of EHV-CPU. Table 2.
Chapter 2 2.3.6 Specification of Communication port for CPU module Connection method for RS-422 / 485 communication Serial communication port of EHV-CPU can communicate with an interface of RS-422 / 485. Communication of 1:N stations can be performed using H-series dedicated control procedure (high-protocol) or a general-purpose procedure with a general-purpose port command (TRNS 0, RECV 0). Figure 2.30 and 2.31 show examples when a connection is made for 1:N stations.
Chapter 2 2.4 Specification of Communication port for CPU module USB communication port USB communication port of EHV-CPU supports USB2.0. (Transfer speed is up to 12Mbps in FULL Speed.) The USB communication port is a dedicated port for connecting the Control Editor. It can be programmed and monitored. Table 2.28 shows specifications for the USB communication port. Table 2.
Appendix 1 Cable Connection Diagram A cable connection diagram in case of connecting peripheral devices with EHV-CPU with a RS-232C interface of a serial port is shown below. EHV-CPU Serial communication port SG CD ER1 ER2 SD RD DR RS EH-VCB02 [1] [2] [3] [4] [5] [6] [7] [8] [9] [1] [2] [3] [4] [5] [6] [7] [8] Figure A-1.