EtherNet/IP–KEYENCE PLC Setup Instructions
This topic provides two methods on setting up the Standard Interface communication based on the EtherNet/IP protocol between a KEYENCE PLC and Mech-Mind Vision System.
-
Use PCI-e card.
-
Configure the software. No card required.
You should choose one of the methods to set up the communication. You cannot choose both methods. |
Hardware and Software Requirements
Hardware
If you configure the software to set up the EtherNet/IP communication, click this line to view the required hardware and hardware connection settings.
-
KEYENCE PLC: KV-8000 series, or other models with a KV-EP21V or KV-NC1EP EtherNet/IP Unit
A KV-8000 model is used in the example below. -
USB Type A Male to Type B Male cable
-
AC 220V to DC 24V power adapter
-
Network switch and Ethernet cables
-
IPC
If you use a PCI-e card to set up the EtherNet/IP communication, click this line to view the required hardware and hardware connection settings.
-
KEYENCE PLC: KV-8000 series, or other models with a KV-EP21V or KV-NC1EP EtherNet/IP Unit
A KV-8000 model is used in the example below. -
USB Type A Male to Type B Male cable
-
AC 220V to DC 24V power adapter
-
Network switch and Ethernet cables
-
HMS IXXAT INpact EIP Slave PCIe interface card installed on the IPC or host computer
Software
If you configure the software to set up the EtherNet/IP communication, click this line to view the required software.
-
KEYENCE PLC programming software KV STUDIO V11.41
-
Mech-Vision & Mech-Viz versions: 2.0.0 or above
-
Mech-Mind EDS file: Software EIP.eds. Location:
Communication Component/Robot_Interface/EthernetIP
in the directory where Mech-Vision and Mech-Viz are installed -
PLC routine files:
-
CameraSignalsMove.mod (used to send signals of the vision system)
-
CameraTest.mod (used for testing of the vision system)
-
MM_XXX_XXX.kfb (used to implement the features of various interface functions)
The files are stored in
Communication Component/Robot_Interface/EthernetIP/Programming Samples/Keyence KV-8000 PLC EthernetIP
in the installation directory where Mech-Vision & Mech-Viz are installed. Please copy and paste all files to the computer with KV STUDIO installed. -
If you use a PCI-e card to set up the EtherNet/IP communication, click this line to view the required software.
-
KEYENCE PLC programming software KV STUDIO V11.41
-
Mech-Vision & Mech-Viz versions: 2.0.0 or above
-
VCI V4 (driver software for HMS IXXAT INpact 40 interface card)
-
Mech-Mind EDS file name: 005A002B003A0100.EDS; Location:
Communication Component/Robot_Interface/EthernetIP
in the directory where Mech-Vision and Mech-Viz are installed -
PLC routine files:
-
CameraSignalsMove.mod (used to send signals of the vision system)
-
CameraTest.mod (used for testing of the vision system)
-
MM_XXX_XXX.kfb (used to implement the features of various interface functions)
The files are stored in
Communication Component/Robot_Interface/EthernetIP/Programming Samples/Keyence KV-8000 PLC EthernetIP
in the installation directory where Mech-Vision & Mech-Viz are installed. Please copy and paste all files to the computer with KV STUDIO installed. -
Configure Communication
If you configure the software to set up the EtherNet/IP communication, click this line to view the detailed operations.
-
Click Robot Communication Configuration on the toolbar of Mech-Vision.
-
In the Robot Communication Configuration window, complete the following configurations.
-
Click the Select robot drop-down menu, and select Listed robot. Click Select robot model, and select the robot model that you use. Then, click Next.
-
In the Communication mode section, set Interface service type to Standard Interface, set Protocol to ETHERNET IP (Software), and set Network Adapters and IP Address to the network adapter and IP address used by the IPC.
-
(Optional) Select Auto enable interface service when opening the solution.
-
Click Apply.
-
-
On the main interface of Mech-Vision, make sure that the Robot Communication Configuration switch on the toolbar is flipped and has turned blue.
If you use a PCI-e card to set up the EtherNet/IP communication, click this line to view the detailed operations.
Check PCI-e Card and Driver Software
-
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.
-
Start the IPC, go to Start ‣ Device Manager and check if the driver software VCI4 INpact PCIe has been installed.
Set up “Robot Communication Configuration”
-
Click Robot Communication Configuration on the toolbar of Mech-Vision.
-
In the Robot Communication Configuration window, complete the following configurations.
-
Click the Select robot drop-down menu, and select Listed robot. Click Select robot model, and select the robot model that you use. Then, click Next.
-
In the Communication mode area, select Standard Interface for Interface service type and select ETHERNET IP for Protocol.
-
(Optional) Select Auto enable interface service when opening the solution.
-
Click Apply.
-
-
On the main interface of Mech-Vision, make sure that the Robot Communication Configuration switch on the toolbar is flipped and turned to blue.
Configure IP address of the PCI-e Card
-
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. -
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.
Install EDS File and Configure Communication
Create PLC Project
-
Open KV STUDIO, click new, select the PLC model according to the model in use, and name the project. Then click Refer to select a location to store the project, and click OK to save settings.
-
If the message “Automatically set the operation recorder setting?” pops up, select Yes.
-
If the message “Setup unit setting info now?” pops up, select No.
-
In the left-side Project panel, go to Unit configuration ‣ KV 8000, double-click EtherNet/IP R30000 DM10000. An EtherNet/IP settings window will appear as shown below. Select Manual in the pop-up window.
-
In the EtherNet/IP settings window, select KV-8000, click Unit setting and then set the IP address of the PLC.
Install EDS File and Configure Network
-
Click EDS file in the EtherNet/IP settings window, and select Reg. In the pop-up window, locate and select the EDS file, then click Open.
-
The EDS file is stored in the Mech-Mind IPC. Location:
Communication Component/Robot_Interface/EthernetIP
in the installation directory where Mech-Vision and Mech-Viz are installed. If KV STUDIO is not installed on the same IPC, you can copy and paste theEthernetIP
folder to the PC with KV STUDIO installed and click Reg. -
If you configure the software to set up the EtherNet/IP communication, select the Software EIP.eds file. If you use a PCI-e card to set up the EtherNet/IP communication, select the 005A002B003A0100.EDS file. In this example, the 005A002B003A0100.EDS file is selected.
If the message “The icon specified for EDS file could not be found.” pops up, select Select icon files and then click OK.
After selecting the icon files, click Open.
-
-
If the EDS file is registered successfully, Ixxat INpact EtherNet/IP™ will appear in the Unit list. Double-click it to connect to the EtherNet/IP network.
-
Set the IP address in the Initial adapter settings window, set the IP address of the IPC as same as which is set in HMS IPconfig, and then click OK.
-
Select Ixxat INpact EtherNet/IP™, click Unit setting(2) and then click .. next to Connection settings.
-
Now you can see a Connection settings window. Click Assign device. Assign the IN and OUT manually, as shown below (The Input and Output in the figure are applicable to this example only.) Then go back to the EtherNet/IP settings window after assigning.
-
Now the information of the server appears in the EtherNet/IP settings window. Click OK.
-
Click OK in the Unit Editor window.
Download Hardware Configuration to PLC
-
Go back to the main interface of KV STUDIO, click Transfer to PLC button in the menu bar, and the Transfer program window will pop up.
-
Keep the default settings, and click Execute in the Transfer program window.
-
Select Yes in the pop-up window showing the message “Change to PROGRAM mode and overwrite?”. Select Yes in the pop-up window showing the message “Change to RUN mode?”.
Check Communication
-
If the PLC is connected successfully, the status of Ixxat INpact EtherNet/IP(TM) will be displayed as online in Monitor mode.
-
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:
-
If the hardware is properly connected;
-
If the Interface Service has been started successfully in Mech-Vision;
-
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
-
In the main interface of KV STUDIO, go to
, and the Import program window will pop up. -
In the Import program window, select the CameraSignalsMove.mod, CameraTest.mod, and MM_XXX_XXX.kfb files, and then click Open.
-
Click OK in the Import completed window.
Download PLC Program to PLC
-
Go back to the main interface of KV STUDIO, click Transfer to PLC → Monitor mode in the menu bar, and the Transfer program window will pop up.
-
Keep the default settings, and click Execute in the Transfer program window.
-
Select Yes in the pop-up window showing the message “Change to PROGRAM mode and overwrite?”. Select Yes in the pop-up window showing the message “Change to RUN mode?”.
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-Keyence PLC Functions.
Prerequisites
-
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.
-
Mech-Viz project: In Mech-Viz, right-click the project name in the Resources panel and select Autoload Project.
The Mech-Viz project used for testing contains a “Branch by Msg” Step that has been renamed to 1 as shown below.
Run Mech-Vision Project and Obtain Vision Points
Parameter Settings
-
Go back to the main interface of KV STUDIO, go to Project ‣ Program, double-click CameraTest, and set the status of ToCamera.COM_ENABLE to be Always ON.
-
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.
-
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.
Start Mech-Vision Project
-
Double-click the input variable Start_Vision of the MM_Start_Vis FB, and set the value to 1 to start Mech-Vision project. Then double-click the variable again to reset the value to 0.
-
Click Registration monitor window, locate FromCamera.STATUS_CODE in the Device column, and then check its current 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.
Obtain Vision Points from Mech-Vision
-
After the status code 1102 is returned, double-click the input variable Get_VisData of the FB MM_Get_VisData to set the value to 1 and therefore obtain the vision points. Then double-click the variable again to reset the value to 0. The result is shown below. The value of SendPoseNum is 3, which means 3 vision points are obtained.
-
Check the current value of FromCamera.STATUS_CODE in the Registration monitor window. 1100 represents that the vision points were obtained successfully from Mech-Vision. Otherwise, the corresponding error code will be returned. Please refer to Status Codes and Troubleshooting for troubleshooting.
Run Mech-Viz Project and Obtain Planned Path
Parameter Settings
-
Double-click the input variable Start_Empty of the FB MM_Get_VisData to set the value to 1. Then double-click the variable again to reset the value to 0. Open the device value batch modify/read window, and go to
to check if the previously obtained vision data has been cleared successfully. -
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.
-
Set the value of Request_Pose_Type to 1. This asks Mech-Viz to send joint positions (instead of TCP data).
Start Mech-Viz Project
-
Double-click the input variable Start_Viz of the FB MM_Start_Viz to set the value to 1 and therefore start Mech-Viz project. Then double-click the variable again to reset it to 0.
-
Check the current value of FromCamera.STATUS_CODE in the Registration monitor window. 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.
Select Branch in the Mech-Viz Project
-
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.
-
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.
Obtain Mech-Viz Planned Path
-
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.
-
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 joint positions have been obtained. The joint positions are stored in TargetPose.