Omron Sysmac CJ Series Connection Manual

Omron Sysmac CJ Series Connection Manual

General-purpose serial connection guide (rs-232c)
Hide thumbs Also See for Sysmac CJ Series:

Advertisement

No. FST-ZTH120042A
Sysmac CJ-series
General-purpose Serial Connection Guide
(RS-232C)
OMRON Corporation
V750-series RFID System
P542-E1-01

Advertisement

Table of Contents
loading

Summary of Contents for Omron Sysmac CJ Series

  • Page 1 No. FST-ZTH120042A Sysmac CJ-series General-purpose Serial Connection Guide (RS-232C) OMRON Corporation V750-series RFID System P542-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. Ethernet is a registered trademark of Xerox Corporation. Java and all Java-related trademarks and logos are trademarks or registered trademarks of Oracle Corporation, Inc., in the United States and other countries.
  • 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 Serial Communications Settings ............. 9 6.1. Serial Communications Settings ............9 6.2.
  • Page 4: Related Manuals

    1. Related Manuals 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 Terms and Definition Terms Explanation and Definition Protocol macro The protocol macro is a function that stores a procedure (protocol) to send/receive data to/from general-purpose external devices in a Serial Communications Board or Serial Communications Unit. Data can be sent/received by executing the PMCR instruction on the CPU Unit.
  • 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

    Overview This document describes the procedure for connecting the RFID Reader/Writer (V750 Series) of OMRON Corporation (hereinafter referred to as OMRON) with the CJ2-series Programmable Controller + Serial Communication Unit (hereinafter referred to as the PLC), 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

    Precautions for Correct Use Prepare the latest project file and protocol macro data beforehand. (To obtain the files, contact your OMRON representative.) Precautions for Correct Use Update the CX-Programmer 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 For information on the serial cable (RS-232C), refer to 3-4 RS-232C and RS-422A/485 Wiring in the CJ-series Serial Communications Boards and Serial Communications Units Operation Manual (Cat.No.
  • Page 12: Serial Communications Settings

    6. Serial Communications Settings Serial Communications Settings This section provides the specifications of the communications parameters and cable wiring that are set in this document. Additional Information To perform communications without using the settings specified in this section, you need to modify the program.
  • Page 13 6. Serial Communications Settings Precautions for Correct Use This document describes the procedure for setting the CJ1W-SCU42 Serial Communications Unit when unit number 0 and communications port 2 are used. To connect devices under different conditions, refer to 9. Program and create a program by changing the allocation areas and PMCR control word.
  • Page 14: Cable Wiring Diagram

    V750-series UHF RFID System User’s Manual(Cat.No. Z235). Check the connector configuration and pin assignment for wiring. ■Connector configuration and pin assignment <OMRON CJ1W-SCU42> Applicable connector: D-sub 9 pin <OMRON V750-BA50C04-US> Applicable connector: D-sub 9 pin ■Cable/Pin arrangement Serial Communications Unit...
  • Page 15: Example Of Checking Connection

    6. Serial Communications Settings 6.3. Example of Checking Connection Example of Checking Connection This document uses an example of the ladder program and protocol macro data in which the PLC sends/receives a message to/from the RFID Reader/Writer. The PLC and RFID Reader/Writer send and receive the message of “Sequence No. 900 (read product type and version)”.
  • Page 16: Connection Procedure

    7. Connection Procedure Connection Procedure This section explains the procedure for connecting the RFID Reader/Writer to the PLC via serial communications. This document explains the procedures for setting up the PLC and RFID Reader/Writer from the factory default setting. For the initialization, refer to Section 8 Initialization Method. 7.1.
  • Page 17 7. Connection Procedure ↓ 7.4.3. Checking the Trace Data Check the trace data of the CX-Protocol and confirm that correct data are sent and received. ↓ 7.4.4. Checking the Receive Data Confirm that the correct data are written to the I/O memory of the PLC by using the CX-Programmer.
  • Page 18: 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 the software when necessary so that Java software can operate.
  • Page 19 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 Network Connections on the Control Panel.
  • Page 20 7. Connection Procedure The Internet Options Dialog Box is displayed. Select the Connections Tab. On the Internet Options Dialog Box, click the LAN Settings Button.
  • Page 21 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 22 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 RS-232C settings.
  • Page 23: Setting Up The Plc

    7. Connection Procedure 7.3. Setting Up the PLC Set up the PLC. 7.3.1. Hardware Setting Set the hardware switches of the Serial Communications Unit. Precautions for Correct Use Make sure that the power supply is OFF when you perform the settings. Make sure that the power supply to the PLC is OFF when you perform the settings.
  • Page 24 Select Open from the File Menu. On the Open CX-Programmer Project Dialog Box, select the OMRON_V750_PMCR232C_E V102.cxp.cxp and click the Open Button. *Obtain the project file from OMRON. After opening the project file, select Programs in the project workspace. (Project workspace)
  • Page 25 7. Connection Procedure Select Change Model from the PLC Menu. The Change PLC Dialog Box is displayed. Select a device type of the PLC to use from the pull-down list in the Device Type, and click the Settings Button. *CJ2M is selected in this document.
  • Page 26 7. Connection Procedure Confirm that the Network Type is set to USB on the Change PLC Dialog Box and click the OK Button. *When the Network Type is not set to USB, select USB from the pull-down list. *If you changed the Device Type in step 6 or changed the CPU Type in step 7, the dialog box on the right will be displayed.
  • Page 27 7. Connection Procedure The dialog box on the right is displayed. Click the Yes Button. Check that the CX-Programmer and the PLC are normally connected online. *The icon is selected during online connection. Additional Information If the CX-Programmer and PLC are not connected online, please check the connection of the cable.
  • Page 28 7. Connection Procedure 7.3.3. Creating the I/O Table Create the I/O table of the PLC. If the operating mode of the PLC is RUN Mode or Monitor Mode, change it to Program Mode by following steps (1) to (3). (1)Select Operating Mode - Program from the PLC Menu of the CX-Programmer.
  • Page 29 7. Connection Procedure Select Create from the Options Menu of the PLC I/O Table Window. The dialog box on the right is displayed. Click the Yes Button. The dialog box on the right is displayed. Click the Yes Button. The Transfer from PLC Dialog Box is displayed.
  • Page 30 7. Connection Procedure 7.3.4. Parameter Setting Set the parameters of the Serial Communications Unit. Double-click the [0000] Main Rack on the PLC IO Table Window to display a tree. Right-click 00[1500]CJ1W-SCU42, and select the Unit Setup. The View Parameters Dialog Box is displayed.
  • Page 31 7. Connection Procedure The setting items of the Port 2: Protocol macro Settings are listed as shown in the right figure. (The figure shows default values.) Select User settings from Port settings. Set the following parameters in the same way. •Serial communications mode: Protocol macro •Data length: 7 bits...
  • Page 32 7. Connection Procedure The dialog box on the right is displayed. Click the Yes Button. The dialog box on the right is displayed when the transfer is completed. Click the Close Button. The dialog box on the right is displayed. Click the Yes Button. The Select Port Dialog Box is displayed.
  • Page 33 7. Connection Procedure The dialog box on the right is displayed. Click the OK Button. Click the Compare Button on the View Parameters Dialog Box. The dialog box on the right is displayed if the parameter settings match. Click the Close Button.
  • Page 34 7. Connection Procedure Click the OK Button on the View Parameters Dialog Box. Close the Edit Parameters Dialog Box and the PLC IO Table.
  • Page 35 7. Connection Procedure 7.3.5. Transferring the Project Data Transfer the project data to the PLC. Select Programs on the project workspace of CX-programmer, and select Transfer - To PLC from the PLC Menu. Select the Program(s) Check Box, Comments Check Box, and Program index Check Box, and click the OK Button.
  • Page 36 7. Connection Procedure The dialog box on the right is displayed (stating “Download successful”) when the transfer is completed. Click the OK Button. Select Programs in the project workspace, and select Transfer - Compare with PLC from the PLC Menu. Select the Program(s) Check Box and click the OK Button.
  • Page 37 Select Open from the File Menu. The Open Dialog Box is displayed. Select OMRON_V750_PMCR_EV100. psw and click the Open Button. *Obtain the protocol macro data from OMRON. The project workspace and the Project Window show the protocol macro data that was read.
  • Page 38 7. Connection Procedure Double-click the OMRON_V750_PMCR_EV100 on the project workspace to open the tree. Select Edit PC-PLC Comms Settings from the PLC Menu. The Change PLC Dialog Box is displayed. Select a device type from the pull-down list and click the Settings Button.
  • Page 39 7. Connection Procedure Confirm that the Network T ype is set to USB on the Change PLC Dialog Box and click the OK Button. f the Network Type is not set to USB, select USB from t pull-down list. Select Connect to PLC from the PLC Menu.
  • Page 40 7. Connection Procedure 7.3.7. Transferring the Protoc ol Macro Data ransfer the protocol macro data t o the Serial Communications Unit. Double-click the New Protocol List on the project workspace to open the tree. The Project Window on the right is displayed.
  • Page 41 7. Connection Procedure When 100% is displayed in the Complied % Column, the compile operation is completed. ter confirming that the compile operation is completed, click the Download Button. The dialog on the right is displayed. Click the OK Button. Check that 100% is displayed the Downloaded % Column in the right figure, and click the...
  • Page 42 7. Connection Procedure The dialog box on the right is displayed. Select the Inclu Source Information Check Box and click the Compile Button. When 100% is displayed in the Complied % Column, the compile operation is completed. After confirming that the co mpile operation is completed, click the Compare Button.
  • Page 43: Transferring The Project Data

    7. Connection Procedure . Transferring the Proje ct Data xecute the program and confirm that serial communications are normally performed. Confirm safety sufficiently before monitoring power flow and present value status in the Ladder Section window or when monitoring present values in the Watch window.
  • Page 44 7. Connection Procedure Select the Trace 2 icon ( ) on the Project Window. (Confirm that Trace 2 is highlighted as shown on the right figure.) *Trace 2 corresponds to port 2 of the Serial Communications Unit. Select Start Trace - One Shot Trace from the PLC Menu.
  • Page 45 7. Connection Procedure .2. Executing the Pr gram xecute the program w ith the CX-Programmer. Expand the Programs tree on e project worksp ace of the CX-Programmer, and double-click Section 1. The section 1 ladder is displayed on the ladder window. Ladder window On the ladder window, right-click an Input_Start and select Set -...
  • Page 46 7. Connection Procedure 7.1.3. Checking the Trace Data Check the trace data of the CX-Protocol and con firm that correct data are sent/received. Select Upload Trace from the PLC Menu of the CX-Protocol. The dialog box on the right is displayed.
  • Page 47 7. Connection Procedure 1.4. Checking the Receive Data onfirm that correct data are written to the I/O memory of the PLC by using the CX-Programmer. Select Edit - Memory from the PLC Menu of the CX-Programmer. Double-click CIO in the Memory Window that is disp layed.
  • Page 48 7. Connection Procedure Select Monitor from the Online Menu. The Monitor Memory Areas Dialog Box is displayed. Select the CIO Check Box and click the Monitor Button. On the CIO Window shown on the right, check the received data (identification code). (In the right example, the data stored in CIO 5510 onwards are “V750-BA50C04-US”...
  • Page 49: Initialization Method

    8. Initialization Method 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. Initializing the PLC o initialize the PLC, you ne ed to initialize the Serial Communications Unit and the CPU Unit.
  • Page 50 8. Initialization Method 8. Initialization Method 8.1.2. CPU Unit To initialize the settings of the CPU Unit, sele ct Clear All Memory Areas from the PLC Menu of the CX-Programmer. On the Confirm All Me mory Area Clear Dialog Box, select the Initialize ption and click the OK Button.
  • Page 51: Initializing The Rfid Reader/Writer

    8. Initialization Method 8.2 . Initializing the 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 52: Program

    OMRON has confirmed that normal communications can be performed using this program and protocol macro data 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 53 9. Program 9.1.1. Communication s Data Flow The following figure show s the data flow from when the PLC (SCU Unit) issues command data to the destination device until when the PLC (SCU Unit) receives the response data from the destination device.
  • Page 54 9. Program 1: Control word 1] Set the following 3 items of the SCU U nit. •Communications port No. (internal logical port): #0 to #7 •Serial port number (physical port): #1 and #2 (#1: PORT1, #2: PORT2) •Unit address of d estination device: # unit number + #10 +0 word Control word: C1...
  • Page 55 9. Program  Send/receive messag verview of send/receive message] end message Destination device Terminator Data Receive message Data Terminator [Relationship between send area S (PMCR instruction operand) and send message] +2 words +(n-1) word +1 word +0 word CPU→Communications Unit Send area:S No.
  • Page 56: Communications Sequence

    9. Program 9.2. Communications Sequence This section explains the communications sequence (protocol macro data) that can be used for the PMCR instruction of this program. 9.2.1. Communications Sequence Number A communications sequence (protocol macro data) that is registered in the SCU Unit is identified by the communications sequence number.
  • Page 57: Error Detection Processing

    9. Program 9.3. Error Detection Processing This program detects and handles errors (1) to (3). For information on error codes, refer to 9.8 Error Process. CJ2M-CPU12 CJ1W-SCU42 Destination device Serial cable (1) E ors whe n executing the PMC R instruction (PMCR instruction error) An incorrect sequence number and an incorrect memory address, which prevent the execution of the PMCR instruction, are detected as PMCR instruction errors.
  • Page 58 9. Program Additional Information For information on the addresses allocated to the SCU Unit, refer to 9.4.2 List of Fixed Allocations.
  • Page 59: Memory Maps

    9. Program 9.4. Memory Maps This section shows the memory maps of this program. 9.4.1. Lists of Addresses The tables below list the addresses necessary to execute this program. You can change the allocations below to any addresses. Precautions for Correct Use Make sure there is no duplicated address when changing addresses.
  • Page 60 9. Program ●Internal addresses hese addresses are used to operate this program only. Address Data type Symbol name Explanation 5000.01 BOOL Local_PMCRExecuting Indicates the PMCR instruction execution status. This flag turns ON when the PMCR instruction is being execu ted, and turns OFF when the PMCR instruction is not executed.
  • Page 61 9. Program .4.2. List of Fixed Allocations The tables below list the addresses necessary to execute this program. ●Alloca ed CIO The following allocations cannot be changed be cause they are determined according to th unit number that is set for the SCU Unit. In this program, the unit number is set to 0.
  • Page 62: Ladder Program

    9. Program 9.5. Ladder Program 9.5.1. Ladder Program Function Configuration The functional configu ration of this program is as follows: Major Minor classification Description classification 1.Initialization 1.1 Response code clear Preparation for communications. The processing 1.2 Operand setting for area to be used is cleared and PMCR instruction initialization settings are performed.
  • Page 63 9. Program 9.5.2. Explanation on E ach Functional Component This section shows the program. ● 1. Initialization processing Overview Description 1.1. Response code clear Clears the error code storage area to zero. 1.2. Operand setting for Sets the PMCR execution parameters (operands). PMCR instruction 1.3.
  • Page 64 9. Program ●2. PMCR instruction execution management Overview Description 2.1. PMCR instruction Enters the PMCR instruction executing status. executing The executing status will be reset at a normal end or an error end of the program. 2.2. PMCR instruction The PMCR instruction is executed under the following execution processing conditions.
  • Page 65 9. Program Overview Description Detects whether the progra m is executed normally or 2.3. Normal/error detection abnormally. processing It is considered as normal end when all the fo llowing requirements are met. (1)Normal end of PMCR instruction (No PMCR instruction error) (2)Normal end of communications sequence (No communications error ) (3)Receives normal message from the des...
  • Page 66 9. Program ●3. Normal end state management Overview Description 3.1. Normal end processing Turns ON the normal end flag when normal end of the program is detected in 2.3 Normal/error detection processing. 3.2. Response code setting Sets the normal response code "#0000" in the response code storage area.
  • Page 67 9. Program ●4.Error end state management Overview Description 4.1. Error end processing Turns ON the error end flag when an error end of the program is determined in 2.3 Normal/error detection processing. 4.2. Response code setting If an error occurs, sets the corresponding response code in the response code storage area.
  • Page 68: Protocol Macro Data

    9. Program 9.6. Protocol Macro Data The protocol macro data consists of Sequence, Step, Send/Receive Message, and Matrix. Its composition is described as follows: ●When there is only one receive message format for a step (send/receive once) •Set one send message and one receive message for the step Sequence No.900 Step No.00 Send message 00...
  • Page 69 9. Program 9.6.2. Protocol Macro Processing Procedure This section describes the proc essing procedure of the protocol macro. [Step No.00] Issuing Send Message (SD_GETRVER) ↓ When step No.00 ends normally When step No.00 ends abnormally ↓ ↓ Next Process: Terminates the Error Process: Interrupt the step as an communications sequence as an Abort and termi...
  • Page 70 9. Program 9.6.3. Sequence Settings This protocol macro data reads the product type and version by using co mmunications equence No. 900. Set the timeout periods for the communications sequence. Additional Information For etails on sequence settings, refer to 3-2 ll Steps) in Sequence Attributes (Common to A the CX-Protocol Operation Manual (Cat.
  • Page 71 9. Program 9.6.4. Step Settings This section describes the step settings for communications sequence No. 900. The se ttings include Retry Count, Send/Receive Messages (message names), Next Proces s, and Error rocess. The sequence of this protocol macro data includes Step No.00 only. Additional Information For details on the sequence settings, refer to 3-3 Step Attributes in the CX-Protocol Operation...
  • Page 72 9. Program ●Next process and erro r process settings This section describes the settings for the Next Process and Error Process of the step. The process specified in the Next Column is executed when the execution of the step ends normally.
  • Page 73 9. Program 6.5. Send Message Settings is section explains the settings of the send message. Additional Information For details on the settings of the send message, refer to 3-4 Communication Message ttributes in the CX-Prot ocol Operation Manual (Cat. No. W344). <Send message setting screen>...
  • Page 74 9. Program <Send message command forma t> This is the command format of the message that is sent from the SCU Unit to the destination device according to the settings of SD_GETRVER. Data Command Number Remarks of bytes Fixed: SOH (#01) Start code Fixed: ”GETR”...
  • Page 75 9. Program 9.6. 6. Receive Message Setting This section describes the settings of receive messages. The receive messages corr esponding to three response formats for a normal message and error messages (response for command, unspecified command) are set. Additional Information For details on the settings of the send message, refer to 3-4 Communication Message Attributes in the CX-Protocol Operation Manual (Cat.
  • Page 76 9. Program Code Description (11)(13) &(W(n),3) (W(n),3): Converts 3-byte data and stores it in the [first (15) n=20,21,22 receive word specified with the PMCR instruction operand + n word]. &: Forward direction hex adecimal conversion (Converts the receive message from ASCII code into hexadecimal, and stores the receive data from the lower byte) (17) &(W(23),1)
  • Page 77 9. Program Command Number Remarks of bytes e horizontal parity is calculated based on the data after e start code (SOH) through just before the FCS. The sult is converted in 2 ASCII code characters and they are ded to the message. Terminator Fixed: CR+LF (#0D0A) *The FCS is...
  • Page 78 9. Program ●Se ttings the R V_ICMD receive message (error message: undefined command) [Settings] <h>+“ICMD”+&(W(1),4)+<c>+<t> Code Remarks <h> (Header) Type: Code, Data: SO “ICMD” Constant ASCII &(W(1),4) (W(1),4): Converts 4-byte data and stores it in the [first receive word specified with the PMCR instruction operand + 1 word].
  • Page 79 9. Program 9.6. 7. Matrix Settings his section describes the matrix sett ings. GetVer_Mat matrix is registered. Additional Information For details on matrix settings, refer to 3-5 Creating Matrices in the CX-Protocol Operation Manual (C at. No. W344) <Matrix registration screen> *In this figure, four cases are set for the GetVer_Mat matrix.
  • Page 80: Timing Charts

    9. Program 9.1. Timing Charts The timing charts of this ladder program are shown below. The definitions of the timing chart patterns are as follows: Pattern Normal end Error end (1) Error end (2) Error end (3) PMCR instruction Communications Destination device error error...
  • Page 81: Error Process

    9. Program 9.2. Error Process The error details for this program are shown below. 9.2.1. Protocol Macro Error Codes The SCU t detects thes e erro rs by monitorin g the protocol macro opera tions. The errors include (1) PM CR instruction erro and (2) commu ications error (e.g.
  • Page 82 9. Program 9.2.2. Destination De vice Error Codes The destination device errors are detected while monitoring the communications of the destination device when t he PLC sends a command. The error codes for are stored in H402 (Output_DestinationDeviceErrorCode). [Format] Response code #**: Main #**: Sub [Response c...
  • Page 83 9. Program Additional Information For details and troubleshooting the destination device errors, refer to Section 7 Troubleshooting Alarms and Errors in th e V750-series UHF RFID System User's Manual at. No. Z235).
  • Page 84: Revision History

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

Table of Contents