Omron V400-R2 Connection Manual

Omron V400-R2 Connection Manual

Ultra small multi-code reader (rs-232c)
Hide thumbs Also See for V400-R2:

Advertisement

Quick Links

Machine Automation Controller NJ-series
General-purpose Serial
Connection Guide
(RS-232C)
OMRON Corporation
Ultra Small Multi-code Reader
(V400-R2 Series)
P567-E1-01

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the V400-R2 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Omron V400-R2

  • Page 1 Machine Automation Controller NJ-series General-purpose Serial Connection Guide (RS-232C) OMRON Corporation Ultra Small Multi-code Reader (V400-R2 Series) P567-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 ................2 Remarks ..................... 3 Overview ....................5 Applicable Devices and Device Configuration ........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

    CJ-series Serial Communications Units Operation Manual for NJ-series CPU Unit W504 SYSMAC-SE2[][][] Sysmac Studio Version 1 Operation Manual W344 CXONE-AL[][]C-V4 CX-Protocol Operation Manual /AL[][]D-V4 W502 NJ501-[][][][] NJ-series Instructions Reference Manual NJ301-[][][][] Z333 V400-R2 Series Ultra Small Multi-code Reader V400-R2 Series User’s Manual...
  • Page 5: Terms And Definitions

    2. Terms and Definitions 2. Terms and Definitions Term Explanation and Definition Protocol macro A protocol macro is a function that stores a data send/receive procedure (protocols) in a Serial Communications Board or Serial Communications Unit to exchange data with general-purpose external devices by executing the ExecPMCR instruction on the CPU Unit.
  • Page 6: Remarks

    (4) It is prohibited to copy, to reproduce, and to distribute a part or the whole of this document without the permission of OMRON Corporation. (5) The information contained in this document is current as of September 2013. It is subject...
  • Page 7 3. Remarks The following notation is used in this document. Indicates a potentially hazardous situation which, if not avoided, will result in minor or moderate injury, or may result in serious injury or death. Additionally there may be significant property damage.
  • Page 8: Overview

    4. Overview This document describes the procedure for connecting OMRON Corporation's Ultra Small Multi-code Reader (V400-R2 series) (hereinafter referred to as the Code Reader) with NJ-series Machine Automation Controller (hereinafter referred to as the Controller) via serial communications, and describes the procedure for checking their connection.
  • Page 9: Applicable Devices And Device Configuration

    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 functionality 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 in advance. To obtain the files, contact your OMRON representative. Precautions for Correct Use Update the Sysmac Studio and CX-Protocol to the versions specified in this section or higher versions using the auto update function.
  • Page 11 For information on the special cable (V509-W011), refer to Cable for programmable controller connection made by OMRON (V509-W011) in Specifications and External Dimension in Section 5 Appendix of the Ultra Small Multi-code Reader V400-R2 Series User's Manual (Cat. No. Z333).
  • Page 12: Serial Communications Settings

    6. Serial Communications Settings 6. Serial Communications Settings This section describes the specifications such as communication parameters and wiring that are defined in this document. Additional Information To perform communications without using the settings described in this section, you need to modify the program.
  • Page 13: Cable Wiring Diagram

    6. Serial Communications Settings 6.2. Cable Wiring Diagram For details on the cable wiring, refer to Section 3 Installation and Wiring of the CJ-series Serial Communications Units Operation Manual for NJ-series CPU Unit (Cat. No. W494). Check the connector configuration and pin assignment before wiring. You do not need to make a cable when you use the special cable (V509-W011).
  • Page 14 6. Serial Communications Settings ■Cable/Pin assignment CJ1W-SCU42 Serial Ultra Small Multi-code Reader Communications Unit (V400-R2CF65) Signal Signal Pin No. Pin No. name name RS-232C RS-232C interface interface TRIG S.GND Shell D-SUB 9-pin DIN 8-pin Cable connector type: Male Cable connector type: Female External trigger *The external trigger is not used in this document.
  • Page 15: Example Of Connection Check

    6. Serial Communications Settings 6.3. Example of Connection Check This document shows an example of an ST (structured text) program and protocol macro data in which the Controller sends/receives the message to/from the Code Reader. The Controller and the Code Reader send and receive the message of "Reading Trigger (sequence No.
  • Page 16: Connection Procedure

    7. Connection Procedure 7. Connection Procedure This section describes the procedure for connecting the Code Reader to the Controller via serial communications. This document explains the procedures for setting up the Controller and the Code Reader from the factory default setting. For the initialization, refer to Section 8 Initialization Method.
  • Page 17 7. Connection Procedure 7.4.3. Checking the Trace Data Confirm that the correct data is sent and received by checking the trace data of the CX-Protocol. ↓ 7.4.4. Checking the Receive Data Confirm that the correct data are written to the variables of the Controller with the Sysmac Studio.
  • Page 18: Setting Up The Code Reader

    For details on the factory default setting of the Code Reader, refer to Factory default setting in Return to the factory default setting in Menu Sheet/Command List in Section 4 Setting Method of the Ultra Small Multi-code Reader V400-R2 Series User's Manual (Cat. No. Z333).
  • Page 19: Setting Up The Controller

    7. Connection Procedure 7.3. Setting Up the Controller Set up the Controller. 7.3.1. Hardware Settings 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. Make sure that the power supply to the PLC is OFF.
  • Page 20 The Import File Dialog Box is displayed. Select OMRON_V400-R2_PMCR232C _EV100.smc and click the Open Button. *Obtain the project file from OMRON. OMRON_V400-R2_PMCR232C _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 21 7. Connection Procedure 7.3.3. Checking the Parameters and Building Check the parameters that are set, 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 in the Edit Pane.
  • Page 22 7. Connection Procedure Parameter group to show is set to Port2: Protocol macro Settings. The setting items of the Port 2: Protocol macro Settings are shown. Confirm that the Port2: Port Settings is set to User settings and other settings are the same as those listed in Section 6.1.
  • Page 23 7. Connection Procedure The Task Settings Tab 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. Confirm that "0 Errors" and "0 Warnings"...
  • Page 24 7. Connection Procedure 7.3.4. Connecting 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 Select Communications Setup from the Controller Menu. The Communications Setup Dialog Box is displayed. Select the Direct connection via USB Option for Connection Type. Click the OK Button. Select Online from the Controller Menu. *Example of confirmation dialog box *If the dialog on the right is displayed, the model or version of the Controller does not...
  • Page 26 7. Connection Procedure A confirmation dialog box is displayed as shown on the right. Check the contents and click the Yes Button. *The displayed dialog depends on the status of the Controller used. Check the contents and click the Yes Button to proceed with the processing.
  • Page 27 7. Connection Procedure The Synchronization Dialog Box is displayed. Confirm that the data to transfer (NJ501 in the right dialog) 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 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 29 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. Confirm that there is no problem and click the Yes Button.
  • Page 30 7. Connection Procedure A confirmation dialog box is displayed. Check the contents and click the Yes Button. A dialog box is displayed indicating transferring is being performed, and a confirmation dialog box is displayed. Check the contents and click the Yes Button.
  • Page 31 Select Open from the File Menu. On the Open Dialog Box, select OMRON_V400-R2_PMCR_EV1 00.psw and click the Open Button. *Obtain the protocol macro data from OMRON. The project workspace and the Project Window display the protocol macro data that was read.
  • Page 32 7. Connection Procedure 7.3.7. Connecting Online and Transferring the Protocol Macro Data Connect online with the CX-Protocol, and transfer the protocol macro data to the Serial Communications Unit. Double-click OMRON_V400-R2_PMCR_EV1 00 on the project workspace to display a tree. Select Edit PC-PLC Comms Settings from the PLC Menu.
  • Page 33 7. Connection Procedure Confirm that the Network Type is set to USB on the Change PLC Dialog Box and click the OK Button. *If the Network Type is not set to USB, select USB from the pull-down list. Select Connect to PLC from the PLC Menu.
  • Page 34 7. Connection Procedure The Project Window on the right is displayed. Confirm that SCU[0] is entered in the Target Column. *If SCU[0] is not entered, select SCU[0] as shown on the right figure. Select New Protocol List and select Download Protocols from the Protocol Menu.
  • Page 35 7. Connection Procedure The dialog box on the right is displayed. Confirm that there is no problem and click the OK Button. Check that 100% is displayed in the Downloaded % Column in the right figure, and click the Close Button. Select New Protocol List and select Compare Protocols from the Protocol Menu.
  • Page 36 7. Connection Procedure When 100% is displayed in the Complied % Column, the compiling operation is completed. Confirming that the compiling operation is completed, and click the Compare Button. The dialog box on the right is displayed. Confirm that Successful is displayed in the Result Column and click the OK Button.
  • Page 37: Checking The Serial Communications

    7. Connection Procedure 7.4. Checking the Serial Communications Execute the program and confirm that serial 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 38 7. Connection Procedure The tree under NewPLC1 expands. Select the Serial Communications Unit (SCU[0] is selected in the right figure). Select the Trace 2 Icon ( ) on the Project Window. Confirm that Trace 2 is highlighted as shown in the right figure.
  • Page 39 7. Connection Procedure 7.4.2. Executing the Program Execute the program with the Sysmac Studio. Select Watch Tab Page from the View Menu of the Sysmac Studio. The Watch1 Tab Page is displayed in the lower section of the Edit Pane. Confirm that the variables shown on the right are displayed in the Start input...
  • Page 40 Preliminary Examination in Section 2 Introduction Procedure of the Ultra Small Multi-code Reader V400-R2 Series User's Manual (Cat. No. Z333). When reading, change Input_Start to False and then change Input_Start to True again by using the same...
  • Page 41 7. Connection Procedure 7.4.3. Checking the Trace Data Confirm that the correct data is sent and received by checking the trace data of the CX-Protocol. Select Upload Trace from the PLC Menu from the CX-Protocol. A dialog box on the right is displayed.
  • Page 42 7. Connection Procedure 7.4.4. Checking the Receive Data Confirm that the correct data are written to the variables of the Controller with the Sysmac Studio. Confirm that the online value of [Normal end] Local_Status.Done, which indicates the program execution status, was changed to True. *This means the program ended normally.
  • Page 43: 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 Serial Communications Unit and the CPU Unit.
  • Page 44: Initializing The Code Reader

    8.2. Initializing the Code Reader For the initialization of the Code Reader, refer to Return to the factory default setting in Menu Sheet/Command List in Section 4 Setting Method of the Ultra Small Multi-code Reader V400-R2 Series User's Manual (Cat. No. Z333).
  • Page 45: Program

    Additional Information 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 and product lot number of each device which was used for evaluation.
  • Page 46 9. Program 9.1.1. Communications Data Flow The following figure shows the data flow from when the Controller (Serial Communications Unit) issues command data via serial communications to the destination device until when it receives the response data from the destination device. Executing the The CPU Unit executes the protocol macro instruction communications sequence...
  • Page 47 9. Program 9.1.2. Function Block for Executing Protocol Macro and Send/Receive Messages This section describes the function block for executing the protocol macro (hereinafter referred to as ExecPMCR instruction) and outlines the general operation of the send/receive messages. Additional Information Refer to Serial Communications Instructions (ExecPMCR) in Section 2 Instruction Descriptions of the NJ-series Instructions Reference Manual (Cat.
  • Page 48 9. Program ●Send/Receive messages [Overview of send/receive messages] Destination Send message device Controller Data Terminator Receive message Terminator Data [Relationship between the SrcDat[ ] send data array and the send message] ScrDat[0] ScrDat[1] ScrDat[2] ScrDat[n-1] CPU → Communications Unit Send data array: ScrDat[ ] No.
  • Page 49: Communications Sequence

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

    9. Program 9.3. Error Detection Processing This program detects and handles the errors (1) to (3) below. For information on error codes, refer to 9.8 Error Process. Controller Destination device Serial cable (1) Errors when executing the ExecPMCR instruction (ExecPMCR instruction error) Errors occurred during an execution of the ExecPMCR instruction such as a unit error and communications error are detected as ExecPMCR instruction errors.
  • Page 51: Variables

    9. Program 9.4. Variables The variables used in this program are listed below. 9.4.1. List of user-defined variables The following tables list the data type, external variables (user-defined global variables/device variable for CJ-series Unit/system-defined variable) and internal variables that are used in this program.
  • Page 52 9. Program [Device variables for CJ-series Unit] (Serial Communications Unit) Variable name Data type Explanation Protocol macro operation status J01_P2_PmrSta WORD Bits 03 to 00: Protocol macro error code J01_P2_PmrExecSta BOOL Protocol Macro Execution Flag J01_P2_PmrSeqEndSta BOOL Sequence End Completion Flag J01_P2_PmrSeqAbtSta BOOL Sequence Abort Completion Flag...
  • Page 53 9. Program ●Internal variables Variable name Data type Explanation Communications processing status flags Local_Status sStatus This variable is defined as sStatus structure Local_State DINT Status processing number Local_ExecFlgs BOOL Communications instruction execution flag Local_EndExecPMCR BOOL Protocol macro execution end detection flag Local_InPort _sPort Used port...
  • Page 54: 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 Minor classification Description classification 1.Communications 1.1. Starting the communications The communications processing processing processing starts.
  • Page 55 9. Program 9.5.2. Program List The program is shown below. ●Program: Program0 (General-purpose serial communications connection check program) 1.Communications processing...
  • Page 56 9. Program 2.Initialization processing To change the input values such as the unit number of the Serial Communications Unit, the port number to be used, protocol macro sequence number and send data size, change the code indicated by a red frame.
  • Page 57 9. Program 3.PMCR communications processing...
  • Page 58 9. Program 4.Processing number error process...
  • Page 59: Protocol Macro Data

    9. Program 9.6. Protocol macro data 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 •...
  • Page 60 9. Program 9.6.2. Protocol Macro Processing Procedure This section describes the processing procedure of the protocol macro. [Step No.00] Issuing send message (SD_RDCODE) ↓ When step No.00 ends normally When step No.00 ends in an error ↓ ↓ Next Process: Terminates the Error Process: Interrupts the step as an communications sequence as an Abort and terminates the communications...
  • Page 61 9. Program 9.6.3. Sequence Settings This protocol macro data performs Reading Trigger (read code) by using communications sequence No. 900. Set the timeout periods for the communications sequence. Additional Information Refer to 3-2 Sequence Attributes (Common to All Steps) of the CX-Protocol Operation Manual (Cat.
  • Page 62 9. Program 9.6.4. Step Settings This section describes the step settings for communications sequence No. 900. The settings include retry count, send/receive messages (message names), next process, and error process. The sequence of this protocol macro data includes Step No.00 only. Additional Information Refer to 3-3 Step Attributes of the CX-Protocol Operation Manual (Cat.
  • Page 63 9. Program ●Next process and error process settings This section describes the settings for the next process and error process of the step. The process set in the Next Column is executed when the step execution ends normally. If a communications error occurs, the process set in the Error Column is executed.
  • Page 64 9. Program 9.6.5. Send Message Settings This section explains the settings of the send message. Additional Information Refer to 3-4 Communication Message Attributes of the CX-Protocol Operation Manual (Cat. No. W344) for details on send message settings. <Send message setting screen> ●Settings of SD_RDCODE send message <Settings>...
  • Page 65 9. Program 9.6.6. Receive Message Settings This section describes the settings of the receive message. Additional Information Refer to 3-4 Communication Message Attributes of the CX-Protocol Operation Manual (Cat. No. W344) for details on receive message settings. [Receive message setting screen] ●Setting of receive message RV_RDCODE <Settings>...
  • Page 66: Timing Charts

    9. Program 9.7. Timing Charts The timing charts of the program are shown below. The definitions of the timing chart patterns are as follows. Error end (1) Error end (2) Pattern Normal end ExecPMCR instruction Protocol macro error error Command Normal Error Error...
  • Page 67: Error Processing

    9. Program 9.8. Error processing The following tables list the errors that are generated by executing this program. 9.8.1. ExecPMCR Instruction Errors The error codes generated when the ExecPMCR instruction ends in an error are given below. ●Output_PmrErrorID After the ExecPMCR is executed, the content of ExecPMCR_instance.ErrorID is set. Code Description 16#0000...
  • Page 68 9. Program 9.8.2. Protocol Macro Error Codes The protocol macro error codes generated when a protocol macro related error occurs are given below. These codes are set in Output_PmrStaErrCode. ●Output_PmrStaErrCode The contents of the lower 4-bit of J01_P2_PmrSta are set. Code Description 16#0000...
  • Page 69: Revision History

    10. Revision History 10. Revision History Revision Date of revision Revision reason and revision page code Sep. 3, 2013 First edition...
  • Page 70 Buyer indemnifies Omron against all related costs or expenses. rights of another party. 10. Force Majeure. Omron shall not be liable for any delay or failure in delivery 16. Property; Confidentiality. Any intellectual property in the Products is the exclu-...
  • Page 71 OMRON ELETRÔNICA DO BRASIL LTDA • HEAD OFFICE São Paulo, SP, Brasil • 55.11.2101.6300 • www.omron.com.br OMRON EUROpE B.V. • Wegalaan 67-69, NL-2132 JD, Hoofddorp, The Netherlands. • Tel: +31 (0) 23 568 13 00 Fax: +31 (0) 23 568 13 88 • www.industrial.omron.eu Cat.

Table of Contents