Omron G9SP-N20S Network Connection Manual

Omron G9SP-N20S Network Connection Manual

Safety controller
Hide thumbs Also See for G9SP-N20S:

Advertisement

Quick Links

Machine Automation Controller NJ-series
General-purpose Seriarl
Connection Guide (RS-232C)
OMRON Corporation
G9SP Safety Controller
P545-E1-01

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the G9SP-N20S and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Omron G9SP-N20S

  • Page 1 Machine Automation Controller NJ-series General-purpose Seriarl Connection Guide (RS-232C) OMRON Corporation G9SP Safety Controller P545-E1-01...
  • Page 2 Beckhoff Automation ® GmbH, Germany. Sysmac is a trademark or registered trademark of OMRON Corporation in Japan and other countries for OMRON factory automation products. Company names and product names in this document are the trademarks or registered...
  • Page 3: Table Of Contents

    Table of Contents Related Manuals ..................1 Terms and Definitions ................1 Remarks ..................... 2 Overview ....................3 Applicable Products and Support Software..........4 5.1. Applicable Products ................4 5.2. Device Configuration................5 Serial Communications Settings ............. 6 6.1. Serial Communications Settings ............6 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: 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) The information contained in this document is current as of August 2013. It is subject to change without notice for improvement.
  • Page 6: Overview

    4. Overview This document describes the procedure for connecting a Safety Controller (G9SP series) of OMRON Corporation (hereinafter referred to as OMRON) with an NJ-series Machine Automation Controller (hereinafter referred to as the Controller) via serial communications, and the procedure for checking their connection.
  • Page 7: Applicable Products 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 8: Device Configuration

    CP1W-CN811 Cable Precautions for Correct Use Obtain the latest Sysmac Studio project file from OMRON in advance. (To obtain the files, contact your OMRON representative.) Additional Information It may not be possible to reproduce the same operation with different devices or versions.
  • Page 9: Serial Communications Settings

    Modifications are necessary to perform communications using different settings. 6.1. Serial Communications Settings The table below lists the settings for serial communications. CJ1W-SCU42 G9SP-N20S Unit number Communications (connection) port Port 2 (RS-232C) Serial communications mode...
  • Page 10: Cable Wiring Diagram

    Communications Units Operation Manual for NJ-series CPU Unit (Cat.No. W494). Check the connector configuration and pin assignment before wiring. ■Connector configuration and pin assignment < OMRON G9SP-N20S + CP1W-CIF01 > Applicable Connectors: D-sub 9 pin <OMRON CJ1W-SCU42> Applicable connector: D-sub 9 pin ■Cable/pin assignment...
  • Page 11: Example Of Checking Connection

    6. Serial Communications Settings 6.3. Example of Checking Connection This connection example uses the ladder program for network connection. For details on the ladder program, refer to 9. Project File. The Controller and Safety Controller send and receive a message of Monitor I/O. The following figure shows the outline of the operation.
  • Page 12: Connection Procedure

    7.4.2 Checking Data that are Sent and Confirm that the correct data are sent and received. Received Precautions for Correct Use Obtain the latest Sysmac Studio project file from OMRON in advance. (To obtain the files, contact your OMRON representative.)
  • Page 13: Setting Up The Safety Controller

    7. Connection Procedure 7.2. Setting Up the Safety Controller Set up the Safety Controller. 7.2.1. Installing the Option Board Install the Option Board. Precautions for Correct Use Make sure that the power supply is OFF when you install. Confirm that the power supply to the Safety Controller is OFF.
  • Page 14: Setting Up The Controller

    7. Connection Procedure 7.3. Setting Up the Controller Set up the Controller. 7.3.1. Hardware Settings of the Serial Communications Unit Set the hardware switches on the Serial Communications Unit. Precautions for Correct Use Make sure that the power supply is OFF when you perform the setting up. Confirm that the power supply to the Controller is OFF.
  • Page 15 OMRON_G9SP_SERI232_LD_ EV100.smc (Sysmac Studio project file) and click the Open Button. *Obtain the Sysmac Studio project file from OMRON. OMRON_G9SP_SERI232_LD_ EV100 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 16 7. Connection Procedure 7.3.3. Checking the Parameters and Building Check the set parameters, execute the program check on the project data and build the Controller. Double-click CPU/Expansion Racks under Configurations and Setup in the Multiview Explorer. The CPU/Expansion Racks Tab is displayed on the Edit Pane.
  • Page 17 7. Connection Procedure Parameter group to show is set to Port 2: No-Protocol Settings. The items of the Port 2: No-Protocol Settings are displayed. Confirm that the Port2: Port settings is set to User settings and other items are the same as Section 6.1.
  • Page 18 7. Connection Procedure The Task Settings Tab Page is displayed in the Edit Pane. Click the Program Assignment Settings Button and confirm that Program0 is set under PrimaryTask. Select Check All Programs from the Project Menu. The Build Tab Page is displayed in the Edit Pane.
  • Page 19 7. Connection Procedure 7.3.4. 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 20 7. Connection Procedure Select the Communications Setup from the Controller Menu. The Communications Setup Dialog Box is displayed. Select the Direct Connection via USB Option in the Connection Type Field. Click the OK Button. Select Online from the Controller Menu. A confirmation dialog box is displayed.
  • Page 21 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. A confirmation dialog is displayed. Click the Yes Button. A screen stating "Synchronizing" is displayed.
  • Page 22 7. Connection Procedure Select Reset Controller from the Controller Menu. *When Mode is set to RUN Mode, Reset Controller cannot be selected. In this case, select Mode - PROGRAM Mode from the Controller Menu to change to PROGRAM mode and perform the procedure in this step.
  • Page 23 7. Connection Procedure 7.3.5. Transferring the Unit Settings Transfer the setting data of the Serial Communication Unit. Select Mode - PROGRAM Mode from the Controller Menu. A confirmation dialog box is displayed. Click the Yes Button. PROGRAM mode is displayed on the Controller Status Pane.
  • Page 24 7. Connection Procedure A confirmation dialog box is displayed. Click the Yes Button. A dialog box is displayed indicating transferring is being performed. A confirmation dialog box is displayed. Click the Yes Button. The Port Selection Dialog Box is displayed. Select All ports and click the OK Button.
  • Page 25: Connection Status Check

    7. Connection Procedure 7.4. Connection Status Check Execute the project file that was transferred and confirm that serial communications are performed normally. 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 26 7. Connection Procedure The Watch Tab Page is displayed in the lower section of the Edit Pane. Confirm that the following values are displayed in the Name Columns. Input_Start Output_Status Output_ErrorCode1 Output_ErrorCode2 G9SP_ResponseData[0-198] G9SP_CommandData *If the necessary variables are not displayed, click Input Name to add.
  • Page 27: Initialization Method

    8. Initialization Method 8. Initialization Method This document explains the setting procedure from the factory default setting. Some settings may not be applicable as described in this document unless you use the devices with the factory default setting. 8.1. Initializing the Controller To initialize the Controller, it is necessary to initialize the CPU Unit and Serial Communications Unit.
  • Page 28 8. Initialization Method 8.1.2. Serial Communications Unit To initialize the settings of the Serial Communications Unit, select Edit Special Unit Settings of CJ1W-SCU42 in CPU/Expansion Racks from the Sysmac Studio. Click the Return to default Button and click the Apply Button. Then, click the Transfer to Controller Button.
  • Page 29: Project File

    (Detected with the response data from the destination device). Additional Information OMRON has confirmed that normal communications can be performed using this project file under the OMRON evaluation conditions including the test system configuration, version of each product, and product Lot, No. of each device which was used for evaluation.
  • Page 30 9. Project File 9.1.1. Communications Data Flow The following figure shows the data flow from when the Controller (SCU Unit) issues a communications command (hereinafter referred to as command) to the destination device until when the SCU receives the response data from the destination device. Sending a command The SCU Unit sends the send message set with the ladder program to the destination device.
  • Page 31 9. Project File ·SCU Receive Serial ·The data type (_sPORT) of destination port (Port) ●Send/receive messages [Overview of send/receive message] 256 bytes or less Send message :SerialSend instruction SrcDat[] Destination device Controller Data Data Receive message 256 bytes or less :SerialRcv instruction DstDat[] *The set values shown below for the SCU Unit are stored in ST (Start Code) and ED (End Code).
  • Page 32: Destination Device Command

    9. Project File 9.2. Destination Device Command This section explains the destination device command used in this project file. 9.2.1. Command Format The command format of the destination device is as follows: Variable Type Data Code Remarks Start code #16#40 Fixed G9SP_Send Command_...
  • Page 33 9. Project File 9.2.2. Response Format The response format of the destination device is as follows: <Normal response> Variable Type Data Value Remarks Start code #16#40 Fixed G9SP_Response Data Data[0] #16#00 Fixed (Response length (HL)) Response length Data[1] #16#00 Fixed (Response length (LH)) Data[2] #16#C3 Fixed (Response length (LL))
  • Page 34 9. Project File Variable Type Data Value Remarks Data[74] #16#yy Rightmost byte Configuration ID Data[75] #16#zz Leftmost byte Data[76] #16#aa First byte Data[77] Unit Conduction #16#bb Second byte Time Data[78] #16#cc Third byte Data[79] #16#00 Not used Data[80] to [99] Reserved #16#00 Not used...
  • Page 35 9. Project File <Error response> Variable Type Data Code Remarks Start code #16#40 Fixed G9SP_Response Data[0] #16#00 Fixed (Response length (HL)) Response Data[1] #16#00 Fixed (Response length (LH)) length Data[2] #16#09 Fixed (Response length (LL)) Data[3] #16#00 Fixed (End code (H)) End code Data[4] #16#00...
  • Page 36: Error Detection Processing

    9. Project File 9.3. Error Detection Processing This project file detects and handles errors (1) to (3). For information on error codes, refer to 9.7 Error Status List. NJ501-1500+ Destination device CJ1W-SCU42 Serial cable (1) Errors during execution of SerialSend/SerialRcv instructions (communications instruction errors) An error end of SerialSend/SerialRcv instruction due to an incorrect SCU Unit setting or incorrect variable setting, etc is detected as a communications instruction error.
  • Page 37: Variables

    9. Project File 9.4. Variables The table below lists the variables used in this project file. 9.4.1. External variables These external variables are necessary to execute this program. To use global variables, they must be declared in each program. Additional Information With the Sysmac Studio, the data type is expressed as ARRAY[0..2] OF WORD when an array is specified for a data type.
  • Page 38 9. Project File (2)These variables of the SCU Unit are used in this program. Name Data type Description SerialSend instruction executing flag: SCU_P2_NopSerialS BOOL ON during data send operation and OFF when the send endExecSta operation is completed. Receive completion flag: SCU_P2_NopRcvCo ON when reception of data is completed and OFF when BOOL...
  • Page 39 9. Project File 9.4.2. Internal Variables These internal variables are necessary to execute this project file. They can be used only in this program. ●Variables for internal processing These function blocks are used in this program. Name Data type Description G9SP_SerialSend_Instance SerialSend The instance of the SerialSend instruction...
  • Page 40: Ladder Program

    9. Project File Name Data type Description Receive data error flag. G9SP_ReceiveData_error BOOL Turns ON when the receive data is not normal. 9.5. Ladder Program 9.5.1. Ladder Program Function Configuration The functional configuration of this program is as follows Major Minor classification Description classification...
  • Page 41 9. Project File 9.5.2. Explanation on Each Functional Component This section shows the details on the functions of this program. 1. Initialization processing Overview Description 1.1. SCU Unit setting Sets the Unit number and serial port number of the SCU Unit in the SCU_Inport structure.
  • Page 42 9. Project File Overview Description 1.2. Setting the G9SP Sets a command sent to G9SP. command data Data in the red frame are communication receive data and echo back data that can be changed by the user. Any value can be set. 1.3.
  • Page 43 9. Project File Overview Meaning 1.4. Converting the send Converts the set command data and calculated checksum data value into a BYTE array to set them for the SerialSend (USINT→BYTE) instruction.
  • Page 44 9. Project File Overview Meaning 1.5. Initializing the Initializes the response area and status area. The status area response data area is initialized to #16#FFFF. and status 1.6. Turning ON the Turns ON G9SP_Excuting that indicates the serial serial communications are in progress. communications G9SP send/receive completion check timer executing flag and...
  • Page 45 9. Project File 2. Managing the SerialSend instruction executing status Overview Meaning 2.1. Generating a Turns ON G9SP_SerialSend_Excute and starts the SerialSend instruction SerialSend instruction execution processing if the execution flag SerialSend instruction executing flag is not turned ON. Turns OFF this flag when Done flag of the SerialSend instruction is turned ON.
  • Page 46 9. Project File Overview Meaning 2.6. Saving error status Sets the following status when the SerialSend instruction ends in an error. ·Output_Status: #16#FF01 ·Output_ErrorCode1: ErrorID of SerialSend instruction ·Output_ErrorCode2: ErrorIDEx of SerialSend instruction Additional Information For information on the error status, refer to 9.7 Error Status List.
  • Page 47 9. Project File 3. SerialRcv instruction execution management Overview Description 3.1. Generating a If G9SP_SerialSend_End is turned ON and the receive SerialRcv instruction completion flag is turned ON, Turns ON execution flag G9SP_SerialRcv_Excute and starts the SerialRcv instruction execution processing. This flag is turned OFF when Done flag of the SerialRcv instruction is turned ON.
  • Page 48 9. Project File Overview Meaning 3.4. Checking for data Turns ON G9SP_SerialSend_End when receive completion G9SP_SerialRcv_Excute is turned OFF. 3.5. Saving the error Sets the next status when the SerialRcv instruction ends in an status error. ·Output_Status: #16#FF02 ·Output_ErrorCode1: ErrorID of SerialRcv instruction ·Output_ErrorCode2: ErrorIDEx of SerialRcv instruction Additional Information For derails on the error status, refer to 9.7 Error Status List.
  • Page 49 9. Project File 4. End processing Overview Meaning 4.1. Checking if the Checks if the receive response data response data is (G9SP_ResponseData[2] to [5]) is the same as the fixed normal data. If they are the same, the following data are set. Output_Status: #16#0000 Output_ErrorCode1: #16#0000 Output_ErrorCode2: #16#00000000...
  • Page 50 9. Project File...
  • Page 51 9. Project File Overview Meaning 4.2. Saving the response If the comparison results are different in No. 4.1, the following data error code data are set. Output_Status: #16#FF03 G9SP_ResponseData_error: ON Output_ErrorCode: G9SP_ResponseData[5]+[2] (Service code+Response length) Output_ErrorCode: G9SP_ResponseData[7]+[6]+[4]+[3] (Reserve data at error response+End code) 4.3.
  • Page 52: Timing Charts

    9. Project File 9.6. Timing Charts This section explains the timing charts of the ladder program. The definitions of the timing chart patterns are as follows: Pattern Normal Error end (1) Error end (2) Error end (3) Communications Unit error Destination Device instruction error error...
  • Page 53 9. Project File (2) Error end 1 (Communications instruction error) SerialSend instruction error SerialRcv instruction error SerialSend instruction error end SerialSend instruction error end (3) Error end 2 (Unit error) (4) Error end 3 (Destination device error) SerialSend not executed. Response data error occurs Timeout error...
  • Page 54: Error Status List

    9. Project File 9.7. Error Status List 9.7.1. SerialSend/SerialRcv instruction errors This error occurs when the SerialSend/SerialRcv instruction ends in an error. The status code (Output_Status) for each instruction error is shown below. SerialSend instruction error: #16#FF01 SerialRcv instruction error: #16#FF02 Each error status is stored in the following.
  • Page 55 9. Project File Additional Information For details on the errors, refer to A-3 Error Code Details in the NJ-series Instructions Reference Manual (Cat. No. W502). For troubleshooting the errors, refer to 9-3 Troubleshooting in the CJ-series Serial Communications Units Operation Manual for NJ-series CPU Unit (Cat.No. W494). 9.7.2.
  • Page 56 9. Project File...
  • Page 57: Revision History

    10. Revision History 10. Revision History Revision Date of revision Revision reason and revision page code Aug. 1, 2013 First edition...
  • Page 58 2013 P545-E1-01 1308**(-)

This manual is also suitable for:

Nj seriesG9sp series

Table of Contents