EtherNet/IP–OMRON PLC Setup Instructions

You are viewing an old version of the documentation. You can switch to the documentation of the latest version by clicking the top-right corner of the page.

This topic provides instructions on setting up the Standard Interface communication based on the EtherNet/IP protocol between an OMRON PLC and Mech-Mind Software Suite.

Hardware and Software Requirements

Hardware

  • OMRON PLC:

    • CJ2H-CPU6[]-EIP series; CJ2M-CPU3[] series

    • Other models with a CJ1W-EIP21 or CS1W-EIP21 EtherNet/IP Unit

  • USB Type A Male to Type B Male cable

  • Power supply unit

  • HMS IXXAT INpact EIP Slave PCIe interface card installed on the IPC in Mech-Mind Vision System

  • Network switch and Ethernet cables

An CJ2H CPU65-EIP model and CJ1W-PA205R power supply unit are used in the example below. The UNIT NO. is set to 0, and the NODE No. is set to 15 (in HEX; 21 in the decimal numeral system).

The connection of the hardware system is shown as below.

hardware connection

Software

  • CX-Programmer V9.70

  • Mech-Mind Software Suite: 1.7.0 or above

  • VCI V4 (driver software for HMS IXXAT INpact 40 interface card)

  • HMS IPconfig software

  • Mech-Mind EDS file name: 005A002B003A0100.EDS; The EDS file is stored in the folder where Mech-Mind Software Suite is installed: Communication Component/Robot_Interface/EthernetIP.

  • PLC routine files:

    • AUTOEXEC.OBJ

    • PROGRAMS.IDX

    • SYMBOLS.SYM

    • COMMENTS.CMT

    The files are stored in Communication Component\Robot_Interface\EthernetIP\Programming Samples\Omron CX-Programmer CJ2H PLC EthernetIP in the installation directory of Mech-MindSoftware Suite. Please copy and paste all files to the computer with CX-Programmer installed.

Configure IPC and Initiate Communication

Check PCI-e Card and Driver Software

  1. Please make sure that the INpact EIP Slave PCIe interface card has been pressed into the PCI-e slot of the IPC, as shown below.

    install communication board
  2. Start the IPC, go to Start ‣ Device Manager and check if the driver software VCI4 INpact PCIe has been installed.

    device manager

Set up “Robot and Interface Configuration” in Mech-Vision

  1. Click Robot and Interface Configuration in the toolbar of Mech-Vision.

  2. Select Listed robot from the Select robot drop-down menu, and then click Select robot model. Select the robot model that you use, and then click Next.

  3. In the Communication Option panel, follow the steps below to proceed:

    • Select Standard Interface as the Interface Type;

    • Select ETHERNET IP as the Protocol;

    • Click the Apply button.

    deployment settings 1
  4. Make sure the Interface Service is started: in the toolbar of Mech-Vision, the Interface Service switch on the far right is flipped and turned to blue.

    deployment settings 2

Configure IP address of the PCI-e Card

  1. Download and install HMS IPconfig software on the IPC first. Use an Ethernet cable to connect the network ports of the IPC and the INpact EIP Slave PCIe.

    After configuring the IP and initiating communication successfully, the Ethernet cable used here can be removed.
  2. Open HMS IPconfig, click to scan and select Ixxat INpact EtherNet/IP(TM). Then uncheck Retrieve IP settings dynamically from a DHCP server and enter the IP address and subnet mask, as shown below. The IP address should be the same as what is configured in the PLC. After configuration, click Apply.

    set ip

Install EDS File and Configure Communication

Create PLC Project

  1. Open the CX-Programmer software, click New in the menu bar and then a Change PLC window will pop up. Select the Device Type according to the model in use, and then click Settings. Select the CPU type in the pop-up Device Type Settings window. Click OK to save the changes.

    create plc 1
  2. Click Save in the menu bar, a Save CX-Programmer File window will pop up. Select a folder to save the project file, name the file, and then click Save.

    create plc 2
  3. Click Connect in the menu bar, and then select Yes in the pop-up window to connect to the PLC.

    create plc 3
  4. Click Program in the menu bar. Make sure that there aren’t any problems if the PLC is stopped, and then select Yes.

    create plc 4
    create plc 5
  5. Select IO Table and Unit Setup  Open in the project workspace to open the PLC IO Table.

    create plc 6
  6. In the PLC IO Table, go to Built-in Port/Inner Board (The instructions in this step is based on a specific model of PLC. Please configure according to the actual PLC model you are using.). Double-click CJ2B-EIP21 and select TCP/IP in the CJ2B-EIP21 Edit Parameters window, enter the IP address (The last number of the IP address should be the same as the NODE No. set on the PLC.) and subnet mask. Then click Transfer[PC to Unit]. Select Yes in the pop-up window to transfer parameters.

    create plc 7
  7. After transferring the parameters successfully, click Close.

    create plc 8
  8. Select Yes to restart the unit, and click OK in the pop-up window. Go back to the CJ2B-EIP21 Edit Parameters window and click OK to complete configuration.

    create plc 9
    create plc 10

Install EDS File and Configure Network

  1. In the PLC IO Table, right click on CJ2B-EIP21  Start Special Application  Start with Settings Inherited.

    eds file 1
  2. Select Network Configurator in the pop-up window, and click OK to open the Untitled - Network Configurator window.

    eds file 14
  3. In the Untitled - Network Configurator window, click Install EDS in the menu bar, and an Install EDS File file will pop up.

    eds file 2
  4. Locate and select the EDS file and click Open.

    eds file 3
    The EDS file is stored in the folder where Mech-Mind Software Suite is installed. The EDS file is stored in the folder where Mech-Mind Software Suite is installed: Communication Component/Robot_Interface/EthernetIP. If CX-Programmer is not installed on the same IPC where the Software Suite is installed, you can copy and paste the EthernetIP folder to the PC with CX-Programmer installed.
  5. In the Untitled - Network Configurator panel, go to EtherNet ‣ IP HardWare ‣ Vendor ‣ HMS Industrial Networks AB ‣ Generic Device. Right click on Ixxat INpact EtherNet/IP™ and select Add to Network in the context menu.

    eds file 4
  6. Then go to EtherNet/IP Hardware ‣ Vendor ‣ OMRON Corporation ‣ Communications Adapter ‣ CJ2B-EIP21. Right click on Rev 3 and select Add to Network in the context menu.

    eds file 5
  7. In EtherNet/IP_1 window, right click Mech-Mind visual device icon, select Change Node Address in the context menu, and then configure the IP address to 192.168.1.10. Right click the CJ2B-EIP21 device icon, select Change Node Address in the context menu, and then configure the IP address to 192.168.1.21.

    eds file 6
    eds file 15
    eds file 16
  8. In EtherNet/IP_1 window, right click the visual device icon, and select Property.

    eds file 7
  9. In the Property window, click I/O Information to check the I/O size, and then click Close.

    eds file 8
  10. In EtherNet/IP_1 window, double click the CJ2B-EIP21 icon. Select Tag Sets in the pop-up Edit Device Parameters window, and then click Edit Tags. Select In-Consume, and click New. Then edit the tag according to actual situation. Click Regist and Close. Select Out-Produce and edit the tag in the same way. Click OK in the Edit Tags window in the end.

    eds file 9
  11. Select Ixxat INpact EtherNet/IP(TM) in the Unregister Device List, click the icon to move down. Then double click Ixxat INpact EtherNet/IP™ in the Register Device List.

    eds file 10
  12. A Ixxat INpact EtherNet/IP™ Edit Connection window showing Input and Output will appear. Configure the tag sets as shown below. Click Regist and Close to close the window.

    eds file 11
  13. Now the tag sets will appear in the Register Device List, then click OK.

    eds file 12
  14. After the IPC is connected, a small arrow will appear as shown below:

    eds file 13

Download Hardware Configuration to PLC

  1. Click Connect in the Network Configurator window. Then select OK in the pop-up Setup Interface window. Now you can see a Select Connect Network Port window.

    download configuration 1
  2. In the Select Connect Network Port window, Select BackPlane‣ #0 CJ2B-EIP21‣TCP:2, and then click OK. Select Using the existing network‣ EtherN IP_1 in the Select Connected Network window and click OK.

    download configuration 2
    download configuration 3
  3. Click Download to Network in the Network Configurator window, and select Yes to start downloading parameters.

    download configuration 4
  4. After the download is completed, click OK.

    download configuration 5

Check Communication

  1. In the Untitled-Network Configurator window, go to Device  Monitor.

    establish communication 1
  2. A Monitor Device window will appear. Click Connection. If the connection is successful, the status indicator will be blue.

    establish communication 2
  3. The PLC is successfully connected if the following message is displayed in the Console tab of Mech-Vision Log panel: Connect to ETHERNET IP controller successfully. If you don’t see this log message, please check:

    1. If the hardware is properly connected;

    2. If the Interface Service has been started successfully in Mech-Vision;

    3. If the hardware configuration has been downloaded to the PLC.

Import Example Program and Download to PLC

Before you add the example program to a project already in use, it is recommended to import it to a new project and test it first. In the following steps, the project created earlier is used to import and test the example program.

Import Mech-Mind Example Programs

  1. Open CX-Programmer, right click MM_Camera_CX[CJ2H] Offline and select Transfer ‣ From File.

    import file 1
  2. Check Programs, Program Index, Symbols and Program comments. Then click next to the File name under Programs, select the OBJ file, and click Open. If other files are stored in the same folder, they will be auto filled. Click OK in the end.

    import file 2
    import file 3
  3. Select OK in the pop-up window to load the example program.

    import file 4

Download PLC Program to PLC

  1. Right click MM_Camera_CX[CJ2H] Offline and select Work Online in the context menu to switch the project to monitor mode.

    build plc 1
  2. Right click MM_Camera_CX[CJ2H] Monitor Mode and select Transfer  To PLC.

    build plc 2
  3. Click OK in the Download Options window.

    build plc 3
  4. Click Yes if the safety of connected devices can be ensured. Click OK after downloading the program successfully.

    build plc 4
    build plc 5

Test with Mech-Vision/Mech-Viz Project

This section introduces how to use the example program function block to trigger the Mech-Vision project to obtain vision points and trigger the Mech-Viz project to obtain the planned path. For detailed information on the I/O units, please refer to EtherNet/IP - Omron PLC Commands.

Prerequisites

  1. Mech-Vision project(s): Right-click the solution and select Autoload Solution. Projects in the solution are also autoloaded. Meanwhile, the project number will show up before each project name.

  2. Mech-Viz project: Right-click the project name in Resources of Mech-Viz and select Autoload Project.

    The Mech-Viz project used for testing should contain a “Branch by Msg” Step that has been renamed to 1 as shown below.

    preparation 4

Run Mech-Vision Project and Obtain Vision Points

Parameter Settings

  1. Open CX-Programmer, go to Programs ‣ NewProgram1(00) Running, double click CameraTest, and set the condition flag of ToCamera.COM_ENABLE to be Always ON.

    test vision 1
  2. Set the Mech-Vision project ID according to the displayed number in the Project List panel in Mech-Vision. Set the value of VISION_PROJ_NUM to 1, then project No.1 in Mech-Vision will be started.

  3. Set the number of vision points to be sent by Mech-Vision project. Set the value of REQ_POSE_NUM to 0, which means the Mech-Vision project will send all the vision points.

    test vision 2

Start Mech-Vision Project

  1. Double click the input variable Start_Vis of the FB MM_Start_Vis. Set the value to 1 in the Set New Value window and then click Set to start Mech-Vision project and trigger the camera to capture images. Then reset the value to 0.

    test vision 3
  2. Click Toggle Watch Window button, locate FromCamera.STATUS_CODE in the Name column, and then check its value. 1102 represents that the project was started successfully. Otherwise, the corresponding error code will be returned. Please refer to Status Codes and Troubleshooting for troubleshooting.

    test vision 4
    test vision 5

Obtain Vision Points from Mech-Vision

  1. After the status code 1102 is returned, double click the input variable Get_VisData of the FB MM_Get_VisData. Set the value to 1 in the Set New Value window and then click Set to obtain vision points. Then reset the value to 0. The result is shown below. The value of SendPoseNum is 3, which means 3 vision points were obtained.

    test vision 6
    test vision 7
  2. Double click Memory in the project workspace, and a PLC Memory window will appear. Double click D, set the Start to 10000, click decimal, 2w to set the data format as signed decimal and double word, and then click monitor to start monitoring (This example received 3 poses. Divide the transferred values by 10000 to obtain the actual pose data.).

    test vision 8

Run Mech-Viz Project and Obtain Planned Path

Parameter Settings

  1. Open CX-Programmer, double click input variable Start_Empty of the FB MM_Get_VisData. Set the value to 1 in the Set New Value window and then click Set to clear the previously obtained vision data. Then reset the value to 0.

    test viz 1
    test viz 2
  2. Set the value of Branch_Name and Branch_Exit_Port to 1 respectively, the Mech-Viz project will proceed along exit port 1 of Step 1.

    test viz 3
  3. Set the value of Request_Pose_Type to 1. This asks Mech-Viz to send joint positions (instead of TCP data).

    test viz 4

Start Mech-Viz Project

  1. Double click the input variable Start_Viz of the FB MM_Start_Viz, set the value to 1 in the Set New Value window to start Mech-Viz project and then reset it to 0.

    test viz 5
  2. Check the value returned by the variable FromCamera.STATUS_CODE. 2103 represents that the project was started successfully. Otherwise, the corresponding error code will be returned. Please refer to Status Codes and Troubleshooting for troubleshooting.

    test viz 6

Select Branch in the Mech-Viz Project

  1. Double click the input variable Set_Branch of the FB MM_Set_Branch, set the value to 1 in the Set New Value window to select branch in the Mech-Viz project and then reset it to 0.

    test viz 7
  2. Check the value returned by the variable FromCamera.STATUS_CODE. 2105 represents that the branch was selected successfully. Otherwise, the corresponding error code will be returned. Please refer to Status Codes and Troubleshooting for troubleshooting.

    test viz 8

Obtain Mech-Viz Planned Path

  1. Double click the input variable Get_VizData of the FB MM_Get_VizData, set the value to 1 in the Set New Value window to obtain planned path from Mech-Viz project and then reset it to 0.

    test viz 9
  2. Check the value returned by the variable FromCamera.STATUS_CODE. 2100 represents that planned path was obtained successfully. Otherwise, the corresponding error code will be returned. Please refer to Status Codes and Troubleshooting for troubleshooting. The result is shown in the figure. The value of SendPoseNum is 10, which means that 10 robot poses in JPs have been obtained. The JPs are stored in TargetPose.

    test viz 10
  3. Go back to PLC Memory window, the 10 poses are shown below. Please divide the transferred values by 10000 to obtain the actual pose data.

    test viz 11

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.