Omron NJ Series Network Connection Manual

Omron NJ Series Network Connection Manual

Hide thumbs Also See for NJ Series:

Advertisement

Quick Links

Machine Automation Controller NJ-series
General-purpose Ethernet
Connection Guide
(TCP/IP)
OMRON Corporation
V750 series RFID System
P543-E1-01

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the NJ Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Omron NJ Series

  • Page 1 Machine Automation Controller NJ-series General-purpose Ethernet Connection Guide (TCP/IP) OMRON Corporation V750 series RFID System P543-E1-01...
  • Page 2 About Intellectual Property Right and Trademarks Microsoft product screen shots reprinted with permission from Microsoft Corporation. Windows is a registered trademark of Microsoft Corporation in the USA and other countries. EtherCAT® is registered trademark and patented technology, licensed by Beckhoff Automation GmbH, Germany.
  • Page 3: Table Of Contents

    Table of Contents Related Manuals ..................1 Terms and Definition ................. 2 Remarks ..................... 3 Overview ....................5 Applicable Devices and Support Software..........6 5.1. Applicable Devices................6 5.2. Device Configuration................7 Ethernet Communications Settings............9 6.1. Ethernet Communications Settings............ 9 6.2.
  • Page 4: Related Manuals

    1. Related Manuals 1. Related Manuals The table below lists the manuals related to this document. To ensure system safety, make sure to always read and heed the information provided in all Safety Precautions, Precautions for Safe Use, and Precaution for Correct Use of manuals for each device which is used in the system.
  • Page 5: Terms And Definition

    2. Terms and Definition 2. Terms and Definition Terms Explanation and Definition IP address Ethernet uses an IP address to perform communications. The IP address (Internet Protocol address) is an address that is used to identify a node (host computer or controller, etc.) on Ethernet. IP addresses must be set and managed so they do not overlap.
  • Page 6: Remarks

    (4) It is prohibited to copy, to reproduce, and to distribute a part of or whole part of this document without the permission of OMRON Corporation. (5) This document provides the latest information as of April 2013. The information on this...
  • Page 7 3. Remarks The following notation is used in this document. Precautions for Safe Use Indicates precautions on what to do and what not to do to ensure using the product safely. Precautions for Correct Use Indicates precautions on what to do and what not to do to ensure proper operation and performance.
  • Page 8: Overview

    4. Overview This document describes the procedure for connecting the RFID Reader/Writer (V750 series) of OMRON Corporation (hereinafter referred to as OMRON) to the NJ-series Machine Automation Controller (hereinafter referred to as Controller) through Ethernet, and provides the procedure for checking their connection.
  • Page 9: Applicable Devices And Support Software

    This document describes the procedure to establish the network connection. Except for the connection procedure, it does not provide information on operation, installation or wiring method. It also does not describe the function or operation of the devices. Refer to the manuals or contact your OMRON representative.
  • Page 10: Device Configuration

    AC Adapter (included) Precautions for Correct Use Prepare the latest project file in advance. To obtain the file, contact your OMRON representative. Precautions for Correct Use Update the Sysmac Studio to the version specified in this section or higher version using the auto update function.
  • Page 11 It may not be possible to reproduce the same operation with different devices or versions. Check the configuration, model and version. If they are different from your configuration. Contact your OMRON representative. Additional Information In this document, a USB is used to connect with the Controller. For information on how to install a USB driver, refer to A-1 Driver Installation for Direct USB Cable Connection of the Sysmac Studio Version 1 Operation Manual (Cat.No.
  • Page 12: Ethernet Communications Settings

    6. Ethernet Communications Settings 6. Ethernet Communications Settings This section describes the specifications such as communication parameters and variables that are set in this document. Additional Information To perform communications without using the settings described in this section, you need to modify the program.
  • Page 13: Example Of Checking Connection

    6. Ethernet Communications Settings 6.2. Example of Checking Connection This document shows an example of a Structured Text (ST) program in which the Controller executes the connect processing, send/receive processing, and close processing on the RFID Reader/Writer. The Controller and RFID Reader/Writer send and receive the message of “GETR TYP FWV (read the product type and firmware version of the memory data)”.
  • Page 14: Connection Procedure

    Execute the program and confirm that the correct Checking the Receive Data data are written to the variables of the Controller. Precautions for Correct Use Prepare the latest project file in advance. To obtain the file, contact your OMRON representative.
  • Page 15: Setting Up The Rfid Reader/Writer

    7. Connection Procedure 7.2. Setting Up the RFID Reader/Writer Set up the RFID Reader/Writer. 7.2.1. Parameter Setting Set the parameters of the RFID Reader/Writer. For the setting, a web browser (e.g., Internet Explore) that can execute Java software is required. Install necessary software so that Java software can operate. Set the IP address of the personal computer to 192.168.1.1.
  • Page 16 7. Connection Procedure Start Internet Explorer from the personal computer that is connected to the Switching Hub. *Set the IP address of the personal computer to 192.168.1.1. Use the following procedure to check the IP address of the personal computer. (1)Click Connect to the Internet View network status and tasks - Change adapter...
  • Page 17 7. Connection Procedure The Internet Options Dialog Box is displayed. Select the Connections Tab. The Internet Options Dialog Box is displayed. Click the LAN settings Button.
  • Page 18 7. Connection Procedure The Local Area Network (LAN) Settings Dialog Box is displayed. Confirm that the Use a proxy server for your LAN Check Box is cleared from the Proxy server Field, and click the OK Button. Click the OK Button on the Internet Options Dialog Box.
  • Page 19 7. Connection Procedure Type http://192.168.1.200 / in the address bar ( ) of Internet Explorer. The Reader Status Window is displayed. Click the Reader Settings Button. The V750 Operation Warning Dialog Box is displayed. Click the OK Button. The Reader Settings Window shows the Ethernet settings.
  • Page 20 7. Connection Procedure Cycle the power supply to the RFID Reader/Writer. *The new parameters will be enabled after the power supply is cycled. Additional Information In addition to changing the Ethernet settings on the web browser screen, you can set and read the Ethernet parameters by using the setting commands (SETR and GETR).
  • Page 21: Setting Up The Controller

    The Import File Dialog Box is displayed. Select OMRON_V750_ETN(TCP)_EV 101.smc and click the Open Button. *Obtain the project file from OMRON. OMRON_V750_ETN(TCP)_EV 101 project is displayed. The left pane is called Multiview Explorer, the right pane is called Toolbox and the middle pane is called Edit Pane.
  • Page 22 7. Connection Procedure 7.3.2. Checking the Parameters and Building Check the set parameters, execute the program check on the project data and build the Controller. Double-click Built-in EtherNet/IP Port Settings under Configurations and Setup - Controller Setup in the Multiview Explorer. The Built-in EtherNet/IP Port Settings Tab Page is displayed in the Edit Pane.
  • Page 23 7. Connection Procedure The Build Tab Page is displayed in the Edit Pane. Confirm that “0 Errors” and “0 Warnings” are displayed. Select Rebuild Controller from the Project Menu. A screen is displayed indicating the conversion is being performed. Confirm that “0 Errors” and “0 Warnings”...
  • Page 24 7. Connection Procedure 7.3.3. Going Online and Transferring the Project Data Connect online with the Sysmac Studio and transfer the project data to the Controller. Always confirm safety at the destination node before you transfer a user program, configuration data, setup data, device variables, or values in memory used for CJ-series Units from the Sysmac Studio.
  • Page 25 7. Connection Procedure The Communications Setup Dialog Box is displayed. Select the Direct Connection via USB Option from Connection Type. Click the OK Button. Select Online from the Controller Menu. *If the dialog on the right is displayed, the model or version of the Controller does not match those of the project file.
  • Page 26 7. Connection Procedure A confirmation dialog is displayed. Click the Yes Button. *The displayed dialog differs depending on the status of the Controller used. Click the Yes Button to proceed with the processing. *The displayed serial ID differs depending on the device. Additional Information For details on the online connections to a Controller, refer to Section 5 Going Online with a Controller in the Sysmac Studio Version 1.0 Operation Manual (Cat.
  • Page 27 7. Connection Procedure The Synchronization Dialog Box is displayed. Confirm that the data to transfer (NJ501 in the right figure) is selected. Then, click the Transfer to Controller Button. *After executing the Transfer to Controller, the Sysmac Studio project data is transferred to the Controller and the data are compared.
  • Page 28: Connection Status Check

    7. Connection Procedure 7.4. Connection Status Check Execute the program and confirm that Ethernet communications are normally performed. Sufficiently confirm safety before you change the values of variables on a Watch Tab Page when the Sysmac Studio is online with the CPU Unit. Incorrect operation may cause the devices that are connected to Output Units to operate regardless of the operating mode of the Controller.
  • Page 29 7. Connection Procedure displayed in the lower section of the Edit Pane. Confirm that the variables shown on the right are displayed in the Start input Name Columns. Error codes *To add a variable, click Input Name… connection *Program0 of the Name is omitted from the following status descriptions.
  • Page 30 7. Connection Procedure When the communications ends normally, each error code changes to 0. The TCP connection status (Output_EtnTcpSta) changes to _CLOSED. *In the case of error end, the error code corresponding to the error is stored. For details on error codes, refer to 9.7 Error Process.
  • Page 31: Initialization Method

    8. Initialization Method 8. Initialization Method This document explains the setting procedure from the factory default setting. If the device settings are changed from the factory default setting, some settings may not be applicable as described in this procedure. 8.1. Controller To initialize the settings of the Controller, select Clear All Memory from the Controller Menu of the Sysmac Studio.
  • Page 32: Rfid Reader/Writer

    8. Initialization Method 8.2. RFID Reader/Writer Use the following procedure to initialize the settings of the RFID Reader/Writer. Press the mode switch at least one second and start the Safe Mode of the RFID Reader/Writer. (Side of the RFID Reader/Writer) Type “http://192.168.1.200/"...
  • Page 33: Program

    OMRON evaluation conditions including the test system configuration, version of each product, and product Lot, No. of each device which was used for evaluation. OMRON does not guarantee the normal operation under the disturbance such as electrical noise and the performance variation of the device.
  • Page 34 9. Program 9.1.1. Communications Data Flow The following figure shows the data flow from when the Controller issues command data with TCP socket communications to the destination device until when the Controller receives the response data from the destination device. This program executes a series of processing from the connect processing to the close processing continuously.
  • Page 35 9. Program 9.1.2. TCP Socket Communications with Socket Service Instructions This section explains the TCP socket communications performed by using the TCP socket service function blocks (hereinafter referred to as socket service instructions) and outlines the general operation of the send/receive message. Additional Information For details, refer to Communications Instructions in Section 2 Instruction Descriptions of the NJ-series Instructions Reference Manual (Cat.
  • Page 36 9. Program ●Send/Receive message Send message Destination Header Command data Terminator device Controller Receive message (Response) Response data Header Terminator Receive message (Error response) Header Response data (Error code) Terminator ●Communications sequence TCP communications are performed between the destination device (server) and the Controller (client) in the following procedure.
  • Page 37: Destination Device Command

    9. Program 9.2. Destination Device Command This section explains the destination device command used in this program. 9.2.1. Overview of the Command This program uses “GETR TYP FWV (read the product type and firmware version of the memory data) command” to read the information of the destination device. Command Description GETR...
  • Page 38 9. Program ●Command format of the receive message This is the response format of the message received by the Controller from the destination device according to the setting of the GETR TYP FWV (read the product type and firmware version of the memory data) command. •ASCII codes are received except for the header and terminator.
  • Page 39 9. Program ●Receive data (response) that is stored After a data check is performed on the receive data using the ReceiveCheck function block, the receive data is stored as output receive data. Variable Description (data type) Storage area Receive data Recv_Buff Receive buffer (STRING[256])
  • Page 40: Error Detection Processing

    9. Program 9.3. Error Detection Processing This section explains the error detection processing of this program. 9.3.1. Error Detection in the Program This program detects and handles errors of the following items (1) to (4). For information on error codes, refer to 9.7. Error Process. Controller Destination device Ethernet cable...
  • Page 41 9. Program (4)TCP connection status error that occurs when ending the processing This program always performs the close processing at the end of the whole processing regardless of whether each processing from the connect processing to the receive processing ends normally or in an error. The TCP connection status variable TcpStatus of the SktGetTCPStatus instruction is used to detect whether the close processing ended normally.
  • Page 42 9. Program 9.3.2. Time Monitoring Function This section explains the time monitoring function of this program. You can change the monitoring time settings by changing the variables of the ParameterSet function block. ●Time monitoring function of the communication instruction processing To avoid errors that keep a communications process executing without a stop, the timer in this program is used to abort the processing (timeout).
  • Page 43: Variables

    9. Program 9.4. Variables The table below lists the variables used in this program. 9.4.1. List of Variables The data types, external variables (user-defined global variables/system-defined variables), and internal variables used in this program are listed below. ●Data type (Structure) [Communications processing status flags] Name Data type...
  • Page 44 9. Program [Send/Receive processing required/not required setting flag] Name Data type Description sComType STRUCT Send/Receive processing required/not required setting flags Send processing TRUE: Required / FALSE: Not required Send BOOL *Specify this when sending a command. Receive processing TRUE: Required / FALSE: Not required Recv BOOL *Specify this when receiving a response.
  • Page 45 9. Program ●External variables [User-defined global variables] Variable name Data type Description Communication start switch Input_Start BOOL The program is started when this variable changes from FALSE to TRUE. An area that stores the receive data (response) (256 Output_RecvMess STRING[256] bytes) An area that stores the error flag for a communications error or a timeout error that is detected at the connect...
  • Page 46 9. Program ●Internal variables (instance variables) The internal variables used to execute the function blocks in the program are listed below. An internal variable is called an "instance". The name of each function block to use is specified as the data type of the variable. [Instances for user-defined function blocks] Variable name Data type...
  • Page 47 9. Program ●Internal variables Variable name Data type Description Communications processing status flags Local_Status sStatus This variable is defined as sStatus structure. Local_State DINT Processing number An area in which an error code is edited. Local_ErrCode uErrorFlgs This variable is defined as uErrorFlgs union. Socket service instruction execution flags Local_ExecFlgs sControl...
  • Page 48: St Program

    9. Program 9.5. ST Program 9.5.1. Functional Components of the Program This program is written in the ST language. The functional components are as follows. Major classification Minor classification Description 1.1. Starting communications The communications processing is started. 1. Communications processing processing 1.2.
  • Page 49 9. Program Major classification Minor classification Description 6.1. Determining the close The close processing is performed. 6. Close processing processing status and setting the The processing is performed in the execution flag following cases. 6.2. Enabling the close instruction •When the receive processing required/not monitoring timer required setting is set to Not required 6.3.
  • Page 50 9. Program 9.5.2. Program List This section shows the details on the program. The function blocks (ParameterSet, SendMessageSet, and ReceiveCheck) are used to perform the communications settings, send data (command data) setting and receive data (response data) check that must be changed according to the destination device. For information on how to change these values, refer to 9.5.3 Detailed Description of Function Blocks.
  • Page 51 9. Program 2. Initialization processing...
  • Page 52 9. Program...
  • Page 53 9. Program 3. Connect processing...
  • Page 54 9. Program 4. Send processing...
  • Page 55 9. Program 5. Receive processing...
  • Page 56 9. Program...
  • Page 57 9. Program 6. Close processing...
  • Page 58 9. Program 7. Processing number error process...
  • Page 59 9. Program 9.5.3. Detailed Description of Function Blocks The user-defined function blocks are shown below. The code which you need to edit according to the destination device is indicated by the red frames on the function blocks below. ●ParameterSet function block (General-purpose Ethernet communications parameter setting) Instruction Meaning...
  • Page 60 9. Program [Program]...
  • Page 61 9. Program ●SendMessageSet function block (General-purpose Ethernet communications send data setting) Instruction Meaning ST expression General-purpose Ethernet ETN_SendMessageSet_instance( Execute, SendMessageSet Send_Data, communications ComType); send data setting [Internal variables] Name Data type Description Send_Header STRING[5] Send header: Header of the send message Send_Addr STRING[5] Destination device address: Address of the destination device...
  • Page 62 9. Program [Program]...
  • Page 63 9. Program ●ReceiveCheck function block (General-purpose Ethernet communications receive processing) Instruction Meaning ST expression ETN_ReceiveCheck_instance( Execute, Recv_Data, General-purpose Ethernet Recv_Buff, ReceiveCheck Communications Error, receive processing ErrorID, ErrorIDEx); [Internal variables] Name Data type Description Receive_Check STRING[5] FCS receive value: FCS receive result of the receive data Calc_Check STRING[5] FCS calculation value:...
  • Page 64 9. Program [Program]...
  • Page 65: Timing Charts

    9. Program 9.6. Timing Charts The timing charts of this program are shown below. ●Start & End processing Input_Start Input_Start Local_Status.Busy Local_Status.Busy Connection processing Connection processing Send processing Send processing Receive processing Receive processing Close processing Close processing Local_ErrCode Local_ErrCode 16#0000 .WordData 16#0000...
  • Page 66 9. Program ●Connect processing Input_Start Input_Start SktTCPConnect SktTCPConnect _instance.Execute _instance.Execute Topen_TON Topen_TON _instance.Q _instance.Q SktTCPConnect SktTCPConnect _instance.Busy _instance.Busy SktTCPConnect SktTCPConnect _instance.Done _instance.Done SktTCPConnect SktTCPConnect _instance.Error _instance.Error Local_ErrCode Local_ErrCode .BoolData[2] .BoolData[2] Local_ErrCode Local_ErrCode 16#0000 16#0000 16#0004 .WordData .WordData Output_sktCmds Output_SktCmds 16#0000 16#0000 16#**** ErrorID...
  • Page 67 9. Program ●Send processing SktTCPConnect SktTCPConnect _instance.Done _instance.Done SktTCPSend SktTCPSend _instance.Execute _instance.Execute Tfs_TON Tfs_TON _instance.Q _instance.Q SktTCPSend SktTCPSend _instance.Busy _instance.Busy SktTCPSend SktTCPSend _instance.Done _instance.Done SktTCPSend SktTCPSend _instance.Error _instance.Error Local_ErrCode Local_ErrCode .BoolData[0] .BoolData[0] Local_ErrCode Local_ErrCode 16#0000 16#0001 16#0000 .WordData .WordData Output_sktCmds 16#0000 16#**** Output_sktCmds...
  • Page 68 9. Program ●Receive processing SktTCPSend SktTCPSend _instance.Done _instance.Done SktGetTCPStatus SktGetTCPStatus _instance.Execute _instance.Execute Receive data SktGetTCPStatus SktGetTCPStatus No receive data Receive data exists. exists. _instance.DatRcvFlag _instance.DatRcvFlag SktTCPRcv SktTCPRcv _instance.Execute _instance.Execute Tr_TON_instance.Q Tr_TON_instance.Q Receive waiting time SktTCPRcv SktTCPRcv _instance.Busy _instance.Busy SktTCPRcv SktTCPRcv _instance.Done _instance.Done SktTCPRcv...
  • Page 69 9. Program SktTCPSend _instance.Done SktGetTCPStatus _ins tance .Execute Receive data exists. SktGetTCPStatus _instance .DatRcvFlag SktTCPRcv _instance .Execute Monitorin g time Tfr_TON _instance .Q elapsed. SktTCPRcv _instance.Busy SktTCPRcv _instance.Done SktTCPRcv _instance.Error Local_ErrCode .BoolData[9] Local_ErrCode 16#0000 16#0200 WordData Output_sktCmds 16#0000 16#FFFF ErrorID SktClose.
  • Page 70 9. Program ●Close processing Tr_TON_instance.Q Tr_TON_instance.Q SktClose SktClose _instance.Execute _instance.Execute Tclose_TON Tclose_TON _instance.Q _instance.Q SktClose SktClose _instance.Busy _instance.Busy SktClose SktClose _instance.Done _instance.Done SktClose SktClose _instance.Error _instance.Error SktGetTCPStatus SktGetTCPStatus _instance.Execute _instance.Execute SktGetTCPStatus SktGetTCPStatus _XXXX _XXXX _CLOSED _instance.TcpSta _instance.TcpSta Output_Sktclose Output_skTclose 16#0000 16#**** 16#0000 ErrorID...
  • Page 71: Error Process

    9. Program 9.7. Error Process 9.7.1. Error Code List The error codes for this program are shown below. ●Error flag (Error end/timeout) [Output_ErrCode] If the connect processing, send processing, receive processing or close processing ends in error or timed out, the error flag will be set in the Output_ErrCode variable. Error flag Description 16#0000...
  • Page 72 9. Program ●Error codes [Output_SktCmdsErrorID], [Output_SkTcloseErrorID] If an error occurs in the connect processing, send processing or receive processing, the error code is stored in the Output_SktCmdsErrorID variable and then the close processing is performed. If an error occurs in the close processing, the error code is stored in the Output_SkTcloseErrorID variable and the processing ends.
  • Page 73 9. Program ●TCP connection status error [Output_EtnTcpSta] If the TCP connection status does not enter the normal status (_CLOSED) in time after the close processing, a TCP connection status code is set in the Output_EtnTcpSta variable. (If the close processing ends in error, check this also.) Error code enumerator Description _eCONNECTION_STATE...
  • Page 74 9. Program ●Destination device error code The destination device error code is stored in the Output_MErrCode variable. When 16#2000 is stored in Output_ErrCode, the FCS value of the data received from the destination device is stored in Output_MErrCode. When 16#1000 is stored in Output_ErrCode, the error number is stored in Output_MErrCode as the destination device error code.
  • Page 75 9. Program Note2: Depends on the specification of IC chip equipped in the RF tag. ( It occurs at Monza chip when it specified the lock bit which does not exist in its memory map. Additional Information For details and troubleshooting the destination device errors, refer to Section 7 Troubleshooting Alarms and Errors in the V750-series UHF RFID System User's Manual (Cat.
  • Page 76 9. Program 9.7.2. TCP Connection Status Error and Corrective Actions This section describes the situation in which the TCP connection status error occurs and explains the corrective actions. ●Affects of the TCP connection status error After a TCP connection status error occurs, if this program is executed again without any corrective action or without notifying the error, then the destination node specified with the destination IP address (DstAdr) input variable and destination port (DstTcpPort) input variable may not be waiting for a connection.
  • Page 77: Revision History

    10. Revision History 10. Revision History Revision Date of revision Revision reason and revision page code 2013/04/15 First edition...
  • Page 78 2013 P543-E1-01 0911(-)

This manual is also suitable for:

Nj501 seriesNj301 seriesV750 seriesV750-ba50c04-us

Table of Contents