You are on page 1of 15

CC-Link Communications for In-Sight Vision

Systems
Integration Note

Author: John Keating


Product Marketing Manager

Published: 6 March, 2009


Integration Note

Executive Summary
This document is intended to assist users to configure CC-Link communications between In-Sight vision
systems and Mitsubishi Q-Series PLCs. CC-Link communication enables In-Sight vision systems to
communicate directly with Mitsubishi PLCs without requiring ladder logic.
Examples in this document are based on In-Sight Explorer software version 4.3, using the EasyBuilder
interface, and Mitsubishi’s GX Developer software, version 8.

Connecting In-Sight and Q-Series PLCs via Ethernet


CC-Link communications are set up through CC-Link connection between the CC-Link connection on the
CIO-MICRO-CC board and the CC-Link connection on the Q-Series PLC. In this example, In-Sight is
communicating with the CC-Link module QJ61BT11N.

CC-Link

Ethernet

Communicating Between In-Sight and Q-Series PLCs:


In-Sight can read and write many different data types via CC-Link, including tool results, data strings and
tolerances. This example will demonstrate writing X, Y and Angle data from In-Sight to the PLC, and
reading the Rotation Tolerance for a PatMax tool from the PLC to In-Sight.

Cognex Corporation Page 2 of 15


Integration Note

Setting Up an Application to Send Data In EasyBuilder


Create a new job

Go to the Get
Connected Step

Press New Job

Set the Trigger Type to manual.

Go to the Set Up
Image step

Trigger type = manual

Cognex Corporation Page 3 of 15


Integration Note

Add a PatMax Pattern tool to the job:

Go to the Locate
Part

Select PatMax
Patterns and press
Add

Train the PatMax model.

Place the model


region around the
feature to locate.

Place the search


region in the area
to look for the
feature.
Press OK when
complete.

Cognex Corporation Page 4 of 15


Integration Note

Note that the Rotation Tolerance is currently set to 15. This is the value that we will update by
reading a new value from the PLC.

Configuring CC-Link In EasyBuilder


We will now set up In-Sight to communicate via CC-Link.

Go to the
Communication step

Press the Add


Device button

Cognex Corporation Page 5 of 15


Integration Note

Set the:
• Device to PLC
• Manufacturer
to Mitsubishi
• Protocol to
CC-Link

Configure the CC-Link settings.

In-Sight can use V1 or V2. This


example uses version V1 of CC-Link.

Rate set to 10M to match the dial


settings on the PLC CC-Link module.

Number of stations is set


to 4. This will also be
set on the PLC.

In-Sight can read and write Bit and Word data. This example will read and write word data. Select the
items to write to the PLC. Go to the Format Output Word Data tab:

Select data type from


the list. In this example,
Press Add to add more Inspection counter is we use a 32 bit float.
data to write to the PLC. automatically added.

Cognex Corporation Page 6 of 15


Integration Note

Select the items to send to the PLC. By pressing the CTRL or Shift key, you can select multiple items.

Angle, X and Y
data are selected.

Press OK to
accept.

The Format Output Word Data tab should now look like this:

Inspection count,
Angle, X and Y
are selected to
send to the PLC.

Now, select the items to read from the PLC. Go to the Format Input Word Data tab and press Add:

Cognex Corporation Page 7 of 15


Integration Note

Select Rotation_Tolerance from the list and press OK:

Rotation
Tolerance will be
read from the
PLC.

Press OK to
accept.

Select the data type from the list. In this example, we use a 32 bit float:

Select 32 bit float

Go to the Run Job step and put In-Sight online.

Go to the Run Job


step.

Press the Online


button.

Cognex Corporation Page 8 of 15


Integration Note

Configuring CC-Link in GX Developer


To configure the Q Series PLC, open the CC-Link settings by double clicking Network Parameters in the
Project data list and pressing the CC-Link button in the network parameters dialog box:

The CC-Link module for this Mitsubishi PLC for this example is model number QJ61bT11N-100. The
parameters are set up as shown below. The Start I/O address will vary based on the position of the CC-
Link module in the PLC, and how many points are used prior to the CC-Link module. In this example, the
CC-Link module is in the second slot, with an offset of 32 points. The Start I/O No is set to 0020, which is
32 Hex.

The CC-Link module, QJ61BT11N, is the


second module in the PLC, offset by 32 points.
The starting I/O for CC-Link will be 0020, which
is 32 Hex.

Cognex Corporation Page 9 of 15


Integration Note

The CC-Link module is the second module


in the PLC, offset by 32 points. The
starting I/O is 0020 Hex, which is 32
decimal.
RWr = D100 (Data Register to write to)
RWr = D600 (Data Register to read from)
Station Number = 1

Press the Station Information Button

Set Exclusive Station


Set Station Type to “Remote count to 4 to match the
device station” for the CIO- setting in In-Sight.
MICRO-CC.

Press End to accept.

Cognex Corporation Page 10 of 15


Integration Note

Press End to accept the


network parameter changes.

Write the settings to the PLC through the icon or OnlineÆWrite to PLC menu:

or

Select
PLC/Network/Remote
Press Execute to write
the settings.

Reset the PLC by cycling power or through the reset switch on the PLC’s CPU.

Cognex Corporation Page 11 of 15


Integration Note

Monitoring Communication
Both In-Sight and the Q-Series PLC are now set up to communicate using CC-Link. To monitor the data
that is being exchanged, start the Entry Data Monitor in GX Developer through the icon or
OnlineÆMonitorÆEntry Data Monitor menu.

Press Register devices to


add devices to monitor.

Press the Register


button to enter each
device.

Add devices for:


D100 (read)
D102 (read)
D104 (read) Set to Real Number
D106 (read) to match the setting
in In-Sight.
D600 (write)

Cognex Corporation Page 12 of 15


Integration Note

Press Device Test to set a value


for D600, which In-Sight will read
to set the Rotation Tolerance of
PatMax.

Set the data


type to Real
Number to
match the
setting in In-
Sight, and
Input 180. This
press Set.
will set the PatMax
Rotation
Tolerance to +/-
180 degrees.

Cognex Corporation Page 13 of 15


Integration Note

Trigger In-Sight by pressing the trigger icon or pressing F5, and monitor the settings in the batch monitor
of GX Developer.

Trigger by pressing this icon, or by


pressing F5.

PatMax
Results

Switch to GX Developer to monitor the data in the PLC.

PatMax Angle,
X and Y
values are
written to the
PLC.

Now, switch to In-Sight Explorer, and verify that the Rotation Tolerance has been updated to 180.

Cognex Corporation Page 14 of 15


Integration Note

The value 180 is read from the PLC.

Go to the Locate Part Step. The PatMax


Rotation Tolerance is set to 180.

Cognex Corporation Page 15 of 15

You might also like