O M R O N C o r...     EtherNet/IP

O M R O N   C o r...     EtherNet/IP
Machine Automation Controller NJ-series
EtherNet/IP
TM
Connection Guide
O MR O N C or p o ra ti o n
Vision System
(FH Series) P576-E1-02
About Intellectual Property Rights 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.
ODVA and EtherNet/IPTM are trademarks of ODVA.
EtherCAT(R) is registered trademark and patented technology, licensed by 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
trademarks of their respective companies.
Table of Contents
1.
Related Manuals .......................................................................................... 1
2.
Terms and Definitions ................................................................................ 2
3.
Precautions .................................................................................................. 4
4.
Overview ...................................................................................................... 5
5.
Applicable Devices and Device Configuration ........................................ 6
5.1. Applicable Devices .................................................................................. 6
5.2. Device Configuration ............................................................................... 7
6.
EtherNet/IP Settings.................................................................................... 9
6.1. Parameters .............................................................................................. 9
6.2. Data Types for Tag Data Links ............................................................. 10
6.3. Global Variables .................................................................................... 11
6.4. Tag Sets ................................................................................................ 14
6.5. Tag Data Link Table .............................................................................. 14
7.
EtherNet/IP Connection Procedure ......................................................... 15
7.1. Work Flow ............................................................................................. 15
7.2. Setting up FH Sensor Controller ........................................................... 16
7.3. Setting up Controller ............................................................................. 21
7.4. Checking the EtherNet/IP Communications ......................................... 40
8.
Initialization Method.................................................................................. 44
8.1. Initializing Controller .............................................................................. 44
8.2. Initializing FH Sensor Controller ........................................................... 44
9.
Appendix Procedure Using the Project File ........................................... 45
9.1. Work Flow ............................................................................................. 45
9.2. Setting up Controller ............................................................................. 46
10. Revision History ........................................................................................ 48
1.Related Manuals
1. Related Manuals
To ensure system safety, make sure to always read and heed the information provided in all
Safety Precautions and Precautions for Safe Use of manuals for each device which is used in
the system.
The table below lists the manuals of OMRON Corporation (hereinafter referred to as OMRON)
related to this document.
Manufacturer
OMRON
OMRON
OMRON
Cat. No.
W500
W501
W506
Model
Manual name
NJ501-[][][][]
NJ-series CPU Unit
NJ301-[][][][]
Hardware User´s Manual
NJ501-[][][][]
NJ-series CPU Unit
NJ301-[][][][]
Software User's Manual
NJ501-[][][][]
NJ Series
NJ301-[][][][]
CPU Unit Built-in EtherNet/IPTM Port
User's Manual
OMRON
W504
SYSMAC-SE2[][][]
Sysmac Studio Version 1 Operation
Manual
OMRON
OMRON
OMRON
OMRON
0969584-7
2285550-0
Z340
Z341
W4S1-05[]
Switching Hub W4S1-series Users
W4S1-03B
Manual
FH-1050/3050
Image Processing System
FH-1050/3050-[]0
INSTRUCTION SHEET
FH-1050/3050
Vision Sensor FH/FZ5 Series
FH-1050/3050-[]0
Vision System User’s Manual
FH-1050/3050
Vision Sensor FH/FZ5 Series
FH-1050/3050-[]0
Vision System Processing Item Function
Reference Manual
OMRON
Z342
FH-1050/3050
Vision Sensor FH/FZ5 Series
FH-1050/3050-[]0
Vision System User’s Manual for
Communications Settings
OMRON
Z343
FH-1050/3050
Vision Sensor FH/FZ5 Series
FH-1050/3050-[]0
Vision System Operation Manual
for Sysmac Studio
OMRON
1636843-6
FZ-M08
LCD monitor INSTRUCTION SHEET
1
2.Terms and Definitions
2. Terms and Definitions
Term
Node
Explanation and Definition
Controllers and devices are connected to the EtherNet/IP network via
the EtherNet/IP ports. EtherNet/IP recognizes each EtherNet/IP port
connected to the network as one node.
When a device with two EtherNet/IP ports is connected to the
EtherNet/IP network, EtherNet/IP recognizes this device as two nodes.
EtherNet/IP achieves the communications between controllers or the
communications between controllers and devices by exchanging data
between these nodes connected to the network.
Tag
A minimum unit of the data that is exchanged on the EtherNet/IP network
is called a tag. The tag is defined as a network variable or as a physical
address, and it is allocated to the memory area of each device.
Tag set
In the EtherNet/IP network, a data unit that consists of two or more tags
can be exchanged. The data unit consisting of two or more tags for the
data exchange is called a tag set. Up to eight tags can be configured per
tag set for OMRON controllers.
Tag data link
In EtherNet/IP, the tag and tag set can be exchanged cyclically between
nodes without using the user program. This standard feature on
EtherNet/IP is called a tag data link.
Connection
A connection is used to exchange data as a unit within which data
concurrency is maintained. The connection consists of tags or tag sets.
Creating the concurrent tag data link between the specified nodes is
called a "connection establishment". When the connection is
established, the tags or tag sets that configure the connection are
exchanged between the specified nodes concurrently.
Specifying the tag set name (tag name) and specifying the instance
number of Assembly Object are given as methods to specify the
connection. In Sysmac Studio, the connection is set by specifying the
instance number.
Connection type
There are two kinds of connection types for the tag data link connection,
one is a multi-cast connection and the other is a unicast (point-to-point)
connection. The multi-cast connection sends an output tag set in one
packet to multiple nodes. The unicast connection separately sends one
output tag set to each node. Therefore, multi-cast connections can
decrease the communications load if one output tag set is sent to
multiple nodes.
2
2.Terms and Definitions
Term
Explanation and Definition
Originator and
To perform tag data links, one node requests the opening of a
Target
communications line called a "connection".
The node that requests to open the connection is called an "originator",
and the node that receives the request is called a "target".
Each data for communications is called an ''originator variable'' and a
''target variable''.
In Sysmac Studio, the instance number is specified in the target variable.
Tag data link
The tag data link parameter is the setting data to perform the tag data
parameter
link. It includes the data to set tags, tag sets, and connections.
RPI
An abbreviation for Requested Packet Interval.
RPI indicates the data I/O refresh cycle that is set for each connection
between the originator and the target.
3
3.Precautions
3. Precautions
(1) Understand the specifications of devices which are used in the system. Allow some
margin for ratings and performance. Provide safety measures, such as installing safety
circuit in order to ensure safety and minimize risks of abnormal occurrence.
(2) To ensure system safety, make sure to always read and heed the information provided in
all Safety Precautions and Precautions for Safe Use of manuals for each device which is
used in the system.
(3) The user is encouraged to confirm the standards and regulations that the system must
conform to.
(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 April 2015. It is subject to
change without notice for improvement.
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.
Indicates a potentially hazardous situation which, if not avoided,
may result in minor or moderate injury or property damage.
Precautions for Correct Use
Precautions on what to do and what not to do to ensure proper operation and performance.
Additional Information
Additional information to read as required.
This information is provided to increase understanding or make operation easier.
Symbol
The filled circle symbol indicates operations that you must do.
The specific operation is shown in the circle and explained in text.
This example shows a general precaution for something that must do.
4
4.Overview
4. Overview
This document describes the procedure for connecting Vision System (FH series) of OMRON
to NJ-series Machine Automation Controller (hereinafter referred to as Controller) via
EtherNet/IP and provides the procedure for checking their connection.
Hereinafter, the device connected via EtherNet/IP in Vision System is referred to as ''FH
Sensor Controller''.
Refer to Section 6. EtherNet/IP Settings and Section 7. EtherNet/IP Connection Procedure to
understand the setting method and key points to perform the tag data links for EtherNet/IP.
Additional Information
Settings which are described in 7.3. Setting up Controller are set in advance into the Sysmac
Studio compact project file (hereinafter referred to as project file). Refer to Section 9.
Appendix Procedure Using the Project File for usage method of the project file. Obtain the
latest project file from OMRON.
Name
Sysmac Studio compact project
file (Extension: csm2)
File name
OMRON_FH_EIP_EV200.csm2
Version
Ver.2.00
5
5.Applicable Devices and Device Configuration
5. Applicable Devices and Device Configuration
5.1. Applicable Devices
The applicable devices are as follows:
Manufacturer
OMRON
Name
NJ-series CPU Unit
OMRON
FH Sensor Controller
OMRON
12 Megapixel High-Speed Camera
4 Megapixel High-Speed Camera
2 Megapixel High-Speed Camera
0.3 Megapixel High-Speed Camera
Model
NJ501-[][][][]
NJ301-[][][][]
FH-1050/3050
FH-1050/3050-[]0
FH-SC12/SM12
FH-SC04/SM04
FH-SC02/SM02
FH-SC/SM
5 Megapixel Digital Camera
2 Megapixel Digital Camera
0.3 Megapixel Digital Camera
0.3 Megapixel High-Speed Camera
0.3 Megapixel Small Digital Camera
0.3 Megapixel Small Digital
Pen-Shaped Camera
Intelligent Compact Camera
FZ-SC5M2/S5M2
FZ-SC2M/S2M
FZ-SC/S
FZ-SHC/SH
FZ-SFC/SF
FZ-SPC/SP
FZ-SQ010F/SQ050F
FZ-SQ100F/SQ100N
Precautions for Correct Use
As applicable devices above, the devices with the models and versions listed in 5.2. Device
Configuration are actually used in this document to describe the procedure for connecting
devices and checking the connection.
You cannot use devices with versions lower than the versions listed in 5.2. To use the above
devices with models not listed in 5.2. or versions higher than those listed in 5.2., check the
differences in the specifications by referring to the manuals before operating the devices.
Additional Information
This document describes the procedure to establish the network connection. It does not
provide information on operation, installation or wiring method which is not related to the
connection procedure. It also does not describe the functionality or operation of the devices.
Refer to the manuals or contact the device manufacturer.
6
5.Applicable Devices and Device Configuration
5.2. Device Configuration
The hardware components to reproduce the connection procedure of this document are as
follows:
Personal computer
(Sysmac Studio installed,
OS: Windows 7)
FH-3050-20
NJ501-1500
(Built-in EtherNet/IP port)
FZ-SC2M
FZ-VS
W4S1-05C
USB mouse
FZ-M08
LAN
cable
FZ-VM
FH-VMRGB
USB cable
24 VDC
power
supply
Manufacturer
OMRON
24 VDC
power
supply
Name
NJ-series CPU Unit
24 VDC
power
supply
expression
NJ501-1500
Version
Ver.1.09
(Built-in EtherNet/IP port)
OMRON
Power Supply Unit
NJ-PA3001
OMRON
Switching hub
W4S1-05C
-
24 VDC power supply
-
Ver.1.00
(For Switching hub)
OMRON
Sysmac Studio
SYSMAC-SE2[][][]
-
Personal computer
-
Ver.1.10
(OS: Windows 7)
-
USB cable
-
(USB 2.0 type B connector)
-
LAN cable (STP (shielded,
-
twisted-pair) cable of Ethernet
category 5 or higher)
OMRON
FH Sensor Controller
FH-3050-20
OMRON
Camera
FZ-SC2M
OMRON
Camera cable
FZ-VS[]
OMRON
Monitor (analog RGB monitor)
FZ-M08
OMRON
Monitor cable
FZ-VM
OMRON
Monitor conversion connector
FH-VMRGB
-
USB mouse
-
-
24 VDC power supply
-
Ver.5.32
(For FH Sensor Controller)
-
24 VDC power supply
-
(For Monitor)
7
5.Applicable Devices and Device Configuration
Precautions for Correct Use
Update Sysmac Studio to the version specified in this clause or higher version.
If you use a version lower than the one specified in this clause, procedures described in
Section 7. and subsequent sections may not be applicable. In that case, use the equivalent
procedures described in this document by referring to the Sysmac Studio Version 1
Operation Manual (Cat. No. W504).
Additional Information
For specifications of 24 VDC power supply available for Switching hub, refer to the Switching
Hub W4S1-series Users Manual (Cat. No. 0969584-7).
Additional Information
For specifications of 24 VDC power supply available for FH Sensor Controller, refer to the
Image Processing System INSTRUCTION SHEET (Cat. No. 2285550-0).
Additional Information
For specifications of 24 VDC power supply available for Monitor, refer to the LCD monitor
INSTRUCTION SHEET (Cat. No. 1636843-6).
Additional Information
The system configuration in this document uses USB for the connection to Controller. For
information on how to install a USB driver, refer to A-1 Driver Installation for Direct USB
Cable Connection of the Sysmac Studio Version 1 Operation Manual (Cat. No. W504).
8
6.EtherNet/IP Settings
6. EtherNet/IP Settings
This section describes the specifications of parameters, global variables, tag sets, and a tag
data link table that are all defined in this document.
Hereinafter, FH Sensor Controller is referred to as "Destination Device" in some descriptions.
6.1. Parameters
This clause describes the parameters that are set in this document.
6.1.1.
EtherNet/IP Communications Settings
The parameters required for connecting Controller and Destination Device via EtherNet/IP are
given below.
Item
Controller
FH Sensor Controller
IP address
192.168.250.1
192.168.250.2
Subnet mask
255.255.255.0
255.255.255.0
6.1.2.
Setting up FH Sensor Controller
The parameters for FH Sensor Controller are given below.
Item
Set value
Fieldbus
EtherNet/IP
Output control
Handshaking (Default)
Timeout [s]
10.0 (Default)
Precautions for Correct Use
In order to prevent a phenomenon that a change in the status of each signal cannot be
detected by the target device, it is recommended that you set the Output control setting for
FH Sensor Controller to Handshaking.
When the Output control of FH Sensor Controller is set to None, the originator device may not
correctly detect a change in the status of a signal from FH Sensor Controller if RPI is longer
than the output time (ON/OFF) on FH Sensor Controller.
For details, refer to EtherNet/IP Communications Cycle (RPI) in Data Exchange with
EtherNet/IP in Communicating with EtherNet/IP in Section 2. Methods for Connecting and
Communicating with External Devices of the Vision Sensor FH/FZ5 Series Vision System
User's Manual for Communications Settings (Cat. No. Z342).
9
6.EtherNet/IP Settings
6.2. Data Types for Tag Data Links
The following data types are used for the data in the tag data links of Destination Device.
■Definition of the data type to access the signals (Unions)
This data type is used to access the control signals and status signals.
Data type name
Data type
U_EIPFlag
UNION
F
BOOL[32]
W
DWORD
■Definition of the data type to access the command area (Structures)
This data type is used to access the command area.
Data type name
Data type
Destination Device data
S_EIPOutput
STRUCT
-
ControlFlag
U_EIPFlag
Control signal (32 bits)
CommandCode
DWORD
Command code (CMD-CODE)
CommandParam1
DINT
CommandParam2
DINT
CommandParam3
DINT
Command parameter
(CMD-PARAM)
■Definition of the data type to access the response/output areas (Structures)
This data type is used to access the response/output areas.
Data type name
Data type
Destination Device data
S_EIPInput
STRUCT
-
StatusFlag
U_EIPFlag
Control output (32 bits)
CommandCodeEcho
DWORD
Command code (CMD-CODE)
ResponseCode
DWORD
Response code (RES-CODE)
ResponseData
DINT
Response data (RES-DATA)
OutputData
DINT[8]
Output data 0 to 7 (DATA 0 to 7)
Additional Information
For details on structures and unions, refer to Accessing Communications Areas Using
Variables with NJ-series Controllers in Communicating with EtherNet/IP in Section 2.
Methods for Connecting and Communicating with External Devices of the Vision Sensor
FH/FZ5 Series Vision System User's Manual for Communications Settings (Cat. No. Z342).
10
6.EtherNet/IP Settings
6.3. Global Variables
The Controller treats the data in tag data links as global variables. The settings of the global
variables are the following.
Name
Data type
EIPOutput
S_EIPOutput
EIPInput
S_EIPInput
Network
Destination Device
Data size
publish
allocation
(byte)
Output
Command code
20
Input
Response code
48
■EIPOutput Configuration
Destination Device data
Variable name
Data type
U_EIPFlag
Control signal (32 bits)
EIPOutput.ControlFlag.F
*1
BOOL[32]
EIPOutput.ControlFlag.W
Command code
(CMD-CODE)
Command parameter
(CMD-PARAM)
DWORD
EIPOutput.CommandCode
DWORD
EIPOutput.CommandParam1
DINT
EIPOutput.CommandParam2
DINT
EIPOutput.CommandParam3
DINT
*1: Details on allocation of control signal
Allocation of EIPOutput.ControlFlag.F variable
15
14
13
12
11
10
9
8
XEXE
7
6
5
4
3
2
30
29
28
27
26
25
24
23
22
21
20
19
18
ERCLR
31
1
0
STEP EXE
17
16
DSA
EXE: Command Execution Bit: Turns ON to execute a command.
STEP: Measure Bit: Turns ON to execute a measurement.
XEXE: Flow Command Request Bit: Turns ON to request execution of a command during
execution of fieldbus flow control.
ERCLR: Error Clear Bit: Turns ON to clear the ERR signal.
DSA: Data Output Request Bit: Turns ON to request the next data output.
11
6.EtherNet/IP Settings
■EIPInput Configuration
Destination Device data
Variable name
Data type
U_EIPFlag
Control output (32 bits)
EIPInput.StatusFlag.F
※1
BOOL[32]
EIPInput.StatusFlag.W
Command code
(CMD-CODE)
Response code
(RES-CODE)
Response data
(RES-DATA)
DWORD
EIPInput.CommandCodeEcho
DWORD
EIPInput.ResponseCode
DWORD
EIPInput.ResponseData
DINT
EIPInput.OutputData
DINT[8]
Output data 0 (DATA0)
Output data 1 (DATA1)
Output data 2 (DATA2)
Output data 3 (DATA3)
Output data 4 (DATA4)
Output data 5 (DATA5)
Output data 6 (DATA6)
Output data 7 (DATA7)
*1: Details on allocation of control signal
Allocation of EIPInput.StatusFlag.F variable
15
ERR
14
13
12
11
31
30
29
28
27
10
9
8
XWAIT XBUSY XFLG
26
25
24
7
6
5
4
RUN
3
OR
2
23
22
21
20
19
18
1
0
BUSY FLG
17
16
GATE
FLG: Command Completion Bit: Turns ON when command execution is completed.
BUSY: Command Busy Bit: Turns ON when command execution is in progress.
OR: Overall Judgement: Turns ON when the overall judgement is NG.
RUN: Run Mode: Turns ON while FH Sensor Controller is in Run Mode.
XFLG: Flow Command Completion Bit: Turns ON when execution of a command that was
input during the execution of fieldbus flow control has been completed. (i.e., when
XBUSY turns OFF)
XBUSY: Flow Command Busy Bit: Turns ON when execution of a command that was
input during execution of fieldbus flow control is in progress.
XWAIT: Flow Command Wait Bit: Turns ON when a command can be input during the
execution of fieldbus flow control.
ERR: Error signal: Turns ON when FH Sensor Controller detects an error signal.
GATE: Data Output Completion Bit: Turns ON when data output is completed.
12
6.EtherNet/IP Settings
Precautions for Correct Use
If the data size of tag data links for Destination Device is an odd-numbered byte, use BYTE
type to define, do not use BOOL type.
Additional Information
For details on command codes and response codes, refer to Command Details for PLC Link,
EtherNet/IP, and EtherCAT in Command Control in Section 3. Appendices of the Vision
Sensor FH/FZ5 Series Vision System User's Manual for Communications Settings (Cat.No.
Z342).
Additional Information
With Sysmac Studio, two methods can be used to specify an array for a data type.
After specifying, (1) is converted to (2) and the data type is always displayed as (2).
(1)BOOL[16] / (2)ARRAY[0..15] OF BOOL
In this document, the data type is simplified by displaying BOOL[16].
(The example above means a BOOL data type with sixteen array elements.)
13
6.EtherNet/IP Settings
6.4. Tag Sets
This clause provides the detailed settings of the tag sets to execute the processing for the tag
data links. Data in the tag sets are allocated in the following OUT No. and IN No.
■Output area (from Controller to FH Sensor Controller)
Originator variable (tag set name)
Data size (byte)
EIP002_OUT
OUT No.
1
20
Global variable name (tag name)
Data size (byte)
EIPOutput
20
■Input area (from FH Sensor Controller to Controller)
Originator variable (tag set name)
Data size (byte)
EIP002_IN
IN No.
1
48
Global variable name (tag name)
Data size (byte)
EIPInput
48
6.5. Tag Data Link Table
This clause describes the detailed settings of the tag data link table (connection settings).
On FH Sensor Controller, set the connection type to Point to Point for both input and output.
Set the timeout value so that it is longer than FH Sensor Controller's measurement processing
time.
When the measurement interval is short, the measurement processing load is high, or
command processing for operations such as scene group changing is time-consuming, FH
Sensor Controller prioritizes measurement and control processing over communication
processing. As a result, communication between an external device and FH Sensor Controller
may be temporarily interrupted, and a communication error may occur. In this case, set the
communication error timeout time longer than FH Sensor Controller's processing time.
The values in a red frame are taken from the values in EDS file of Destination Device.
Connection
Name
Connection I/O Type
RPI (ms)
Timeout Value
default_001
Consume Data From/Produce Data To
50.0
RPI x 4
Connection
I/O Type
Input/
Output
Target Variable
(Set value of
Destination
Device:
instance
number)
Consume
Data
From/Produ
ce Data To
Input
101
48
EIP002_IN
48
Output
100
20
EIP002_OUT
20
Size
(byte)
Originator Variable
(tag set name)
Size
(byte)
Connection
Type
Point to
Point
connection
Point to
Point
connection
14
7.EtherNet/IP Connection Procedure
7. EtherNet/IP Connection Procedure
This section describes the procedure for connecting FH Sensor Controller and Controller on
the EtherNet/IP network.
This document explains the procedures for setting up Controller and FH Sensor Controller
based on the factory default setting. For the initialization, refer to Section 8. Initialization
Method.
7.1. Work Flow
Take the following steps to set the tag data link for EtherNet/IP.
7.2. Setting up FH Sensor Controller
↓
7.2.1. Parameter Settings
Set up FH Sensor Controller.
Set the parameters for FH Sensor Controller.
↓
7.3. Setting up Controller
Set up Controller.
↓
7.3.1. IP Address Settings
Start Sysmac Studio and set the IP address of
Controller.
↓
7.3.2. Target Device Registration
Register the target device.
↓
7.3.3. Setting the Global Variables
Set the global variables to use for the tag data
links.
↓
7.3.4. Tag Registration
Register the tags and the tag sets.
↓
7.3.5. Setting the Connections
Set the target variable and the originator variable,
and then set the connections.
↓
7.3.6. Transferring the Project Data
Connect online and transfer the connection
settings and the project data to Controller.
↓
7.4. Checking the EtherNet/IP
Communications
Check that the EtherNet/IP tag data links are
operated normally.
↓
7.4.1. Checking the Connection Status
Check the connection status of EtherNet/IP.
↓
7.4.2. Checking the Sent and
Received Data
Check that the correct data are sent and
received.
15
7.EtherNet/IP Connection Procedure
7.2. Setting up FH Sensor Controller
Set up FH Sensor Controller.
7.2.1.
Parameter Settings
Set the parameters for FH Sensor Controller.
1
Check the positions of the
Camera
connector
connectors on FH Sensor
Controller by referring to the
right figure.
*In the Ethernet connectors,
only PORT2 (lower port) can
be used for EtherNet/IP
communications. PORT1
(upper port) and the EtherCAT
communication connector
cannot be used for
EtherNet/IP.
Ethernet connector
(PORT1)
Ethernet connector
(PORT2)
EtherCAT communication
connector (IN)
EtherCAT communication
connector (OUT)
USB connector
DVI-I connector
Power
supply
terminal
connector
2
As shown in 5.2. Device
FH Sensor Controller
Configuration, connect Camera,
Monitor, USB mouse, and 24
LAN cable
VDC power supply (For FH
Sensor Controller) to FH Sensor
Camera
USB mouse
Controller.
Connect LAN cable to PORT2
(lower port) of Ethernet
Monitor
connector.
24 VDC
power supply
Connect 24 VDC power supply
(For Monitor) to Monitor.
3
24 VDC power supply
Connect FH Sensor Controller
to Switching hub with LAN
LAN cable
cable.
Connect 24 VDC power supply
(For Switching hub) to Switching
24 VDC power supply
hub.
4
Turn ON the power supply to FH
Sensor Controller and Monitor.
16
7.EtherNet/IP Connection Procedure
5
The Language setting Dialog
Box is displayed on Monitor
connected to FH Sensor
Controller only at the initial start.
Select English and click OK.
Check that your desired
Language is selected and click
Yes.
6
Select System Settings from
the Tool Menu on the FZ-PanDA
Dialog Box that is shown on
Monitor connected to FH Sensor
Controller.
7
Select System Settings –
Startup - Startup setting from
the tree.
Select the Communication Tab
in the right figure.
8
The Communication module
select Field is displayed. Select
EtherNet/IP from the Fieldbus
pull-down list.
Then, click Apply in the lower
part of the displayed screen.
Click Close to close the System
Settings Dialog Box.
*After the data set in the System
Settings Window are saved
and then FH Sensor Controller
is restarted as shown on the
right, the settings become
enabled.
17
7.EtherNet/IP Connection Procedure
9
Select Data save from the
Function Menu.
10
The Data save Dialog Box is
11
Select System restart from the
12
The System restart Dialog Box
displayed. Click OK.
Function Menu.
is displayed. Check the contents
and click OK.
18
7.EtherNet/IP Connection Procedure
13
After restarting, select System
14
Select System Settings -
Settings from the Tool Menu.
Communication Ethernet(Normal(UDP)) from
the tree.
15
The dialog box on the right is
displayed. Select Use the
following IP address in the
Address setting 2 Field and
enter the following values.
・IP address: 192.168.250.2
・Subnet mask: 255.255.255.0
*Even if you use FH Sensor
Controller with only one
Ethernet port as typified by
FH-1050 etc., always set the
Address setting 2 Field.
After setting, click Apply.
*To change a value, click the
Button which is in the right of
each octet of IP address. The
numeric keyboard is displayed.
Enter values using the mouse.
After entering the values, click
OK on the numeric keyboard.
*How to change values
19
7.EtherNet/IP Connection Procedure
16
Select System Settings Communication - Ethernet/IP
from the tree.
17
The Setting Tab Page is
displayed. Check the following
values.
Output control: Handshaking
Timeout [s]: 10.0
Click Close to close the System
Settings Window.
18
In the same way as steps 9 and
10, select Data save from the
Function Menu.
19
In the same way as steps 11
and 12, select System restart
from the Function Menu.
20
7.EtherNet/IP Connection Procedure
7.3. Setting up Controller
Set up Controller.
7.3.1.
IP Address Settings
Start Sysmac Studio and set the IP address of Controller.
Install Sysmac Studio and USB driver in Personal computer beforehand.
1
Connect LAN cable to the
Built-in EtherNet/IP port
Personal
computer
CPU Unit
Controller
(PORT1) of Controller, and
connect USB cable to the
End Cover
Switching hub
USB cable
peripheral (USB) port. As shown
in 5.2. Device Configuration,
connect Personal computer and
Switching hub to Controller.
2
3
Power Supply Unit
LAN cable
Destination
Device
Start Sysmac Studio.
*If a confirmation dialog for an
access right is displayed at
start, execute a selection to
start.
Sysmac Studio starts.
Click New Project.
21
7.EtherNet/IP Connection Procedure
4
Project Properties Dialog Box is
displayed.
*In this document, New Project
is used as the Project name.
Check that the device used is
shown in the Category and the
Device Fields of Select Device.
Select an applicable version
from the pull-down list of
Version.
5
6
*Although 1.09 is selected in this
document for example, select
the version you actually use.
Click Create.
The New Project is displayed.
The following panes are
displayed in this window.
Toolbox
Left: Multiview Explorer
Top right: Toolbox
Bottom right: Controller Status Pane
Middle top: Edit Pane
Multiview
Explorer
Edit Pane
Controller
Status Pane
The following tab pages are
displayed at the middle bottom
of the window.
Output Tab Page
Build Tab Page
Output Tab
Page
Build Tab
Page
22
7.EtherNet/IP Connection Procedure
7
Double-click Built-in
EtherNet/IP Port Settings
under Configurations and
Setup - Controller Setup in the
Multiview Explorer.
8
The Built-in EtherNet/IP Port
Settings Tab Page is displayed
in the Edit Pane.
Check that the following settings
are made in the IP Address
Field.
IP address: 192.168.250.1
Subnet mask: 255.255.255.0
23
7.EtherNet/IP Connection Procedure
7.3.2.
Target Device Registration
Register the target device.
1
Select EtherNet/IP Connection
2
The EtherNet/IP Device List Tab
Settings from the Tools Menu.
Page is displayed in the Edit
Pane.
While the Built-in EtherNet/IP
Port Settings is being selected,
right-click and select Edit from
the menu.
3
The Built-in EtherNet/IP Port
Settings Connection Settings
Tab Page is displayed in the
Edit Pane.
4
Click the + Button in Toolbox.
24
7.EtherNet/IP Connection Procedure
5
Data fields of the target device
registration are displayed.
Enter 192.168.250.2 in the Node
address Field.
Select the following values from
the pull-down lists of Model
name and Revision.
Model name: FH Series
Revision: 1
6
Check the settings and
7
192.168.250.2 is registered in
click Add.
Target Device of Toolbox.
25
7.EtherNet/IP Connection Procedure
7.3.3.
Setting the Global Variables
Set the global variables to use for the tag data links.
1
Double-click Data Types under
Programming - Data in the
Multiview Explorer.
2
The Data Types Tab Page is
displayed.
Click the Union Side Tab.
The Union Data Type Editor is
displayed.
Click a column under the Name
Column to enter a new data
type.
Enter U_EIPFlag in the Name
Column.
3
After entering, right-click and
select Create New Member
from the menu.
4
Enter F in the Name Column.
Enter BOOL[32] in the Base
Type Column.
*After entering, the value
changes to ARRAY[0..31] OF
BOOL as shown on the right.
26
7.EtherNet/IP Connection Procedure
5
In the same way as steps 3 and
4, enter the following data in the
new columns.
Name: W
Base Type: DWORD
6
Click the Structures Side Tab in
the Edit Pane.
The Structure Data Type Editor
is displayed.
Click a column under the Name
Column to enter a new data
type.
Enter S_EIPOutput in the Name
Column.
7
After entering, right-click and
select Create New Member
from the menu.
8
Enter ControlFlag in the Name
Column.
Enter U_EIPFlag in the Base
Type Column.
9
In the same way as steps 7 and
8, enter the following data in the
new member columns.
・Name: CommandCode
Base Type: DWORD
・Name: CommandParam1
Base Type: DINT
・Name: CommandParam2
Base Type: DINT
・Name: CommandParam3
Base Type: DINT
*The members are entered in
order of the structures listed in
6.2. Data Types for Tag Data
Links.
27
7.EtherNet/IP Connection Procedure
10
After entering, right-click and
select Create New Data Type
from the menu.
Enter S_EIPInput in the Name
Column.
11
In the same way as steps 7 and
8, enter the following data in the
new member columns.
・Name: StatusFlag
Base Type: U_EIPFlag
・Name: CommandCodeEcho
Base Type: DWORD
・Name: ResponseCode
Base Type: DWORD
・Name: ResponseData
Base Type: DINT
・Name: OutputData
Base Type: DINT[8]
*The members are entered in
order of the structures listed in
6.2. Data Types for Tag Data
Links.
12
*After entering, the value
changes to ARRAY[0..7] OF
DINT as shown on the right.
Double-click Global Variables
under Programming - Data in
the Multiview Explorer.
28
7.EtherNet/IP Connection Procedure
13
The Global Variables Tab Page
is displayed in the Edit Pane.
Click a column under the Name
Column to enter a new variable.
Enter EIPOutput in the Name
Column.
Enter S_EIPOutput in the Data
Type Column.
Select Output from the Network
Publish Menu.
Check that Output is selected in
the Network Publish Column.
14
After entering, right-click and
select Create New from the
menu.
15
In the same way as steps 2 and
3, enter the following data in the
new columns.
・Name: EIPInput
Data Type: S_EIPInput
Network Publish: Input
16
Double-click Task Settings
under Configurations and
Setup in the Multiview Explorer.
The Task Settings Tab Page is
displayed in the Edit Pane.
Click VAR.
29
7.EtherNet/IP Connection Procedure
17
Click the + Button.
A new column is added.
Click the Down Arrow Button of
the Variable to be refreshed
Field (on the left side).
The variables set in this
sub-clause are displayed.
Select EIPOutput.
EIPOutput is added.
18
*The data types are displayed
automatically, so no need to be
set.
In the same way as step 17, add
the all variables set in this
sub-clause to the Variable to be
refreshed Field (on the left side).
*The data types are displayed
automatically, so no need to be
set.
30
7.EtherNet/IP Connection Procedure
7.3.4.
Tag Registration
Register the tags and the tag sets.
1
Click the Tag Set Button in the
Built-in EtherNet/IP Port
Settings Connection Settings
Tab Page.
Select the Input Tab in Tag
Sets.
2
Right-click any open space in
the Input Tab Page and select
Create New Tag Set from the
menu.
3
A new name in the Tag Set
Name Column can be entered.
Select the column newly added.
Enter EIP002_IN.
31
7.EtherNet/IP Connection Procedure
4
While the EIP002_IN is being
selected, right-click and select
Create New Tag from the menu.
A new tag name can be entered
in the EIP002_IN. Select the
column newly added.
Set the global variable of IN
No.1 listed in 6.4. Tag Sets as a
tag.
*When the first character of the
set variable is entered, the list
that starts with the character
entered is displayed.
5
Select Output Tab.
Right-click any open space in
the Output Tab Page and select
Create New Tag Set from the
menu.
6
A new name in the Tag Set
Name Column can be entered.
In the same way as step 3, enter
EIP002_OUT.
7
In the same way as step 4, set
the global variable of OUT No.1
listed in 6.4. Tag Sets as a tag.
8
Check that Tag Sets shows 2
and that the value of Tags
shows the same as the number
of the global variables set.
32
7.EtherNet/IP Connection Procedure
7.3.5.
Setting the Connections
Set the target variable (that receives the open request) and the originator variable (that
requests opening), and set the connections (tag data link table).
1
Click the Connection Button in
the Built-in EtherNet/IP Port
Settings Connection Settings
Tab Page.
2
Right-click any open space in
Connection and select Add from
the menu.
3
A new connection can be
entered. Select the column
newly added.
Select 192.168.250.2 from the
pull-down list under the Target
Device Column.
4
The default_001 is created in
the Connection Name Column.
Select Consume Data
s
From/Produce Data To from
the Connection I/O Type
pull-down list.
5
The target variable and the
originator variable can be set.
33
7.EtherNet/IP Connection Procedure
6
Click a column in Target
Variable of Input.
When you press Ctrl + Space
on the keyboard, an applicable
instance number appears.
*The instance number also
appears even when the first
character of the instance
number ''1'' is entered.
Select the instance number.
In the same way, set the target
variable of Output.
7
Click a column in Originator
Variable of Input.
The pull-down list is displayed.
Select the tag set name to use.
In the same way, set the
originator variable of Output.
8
Select Point to Point
connection from the
Connection Type pull-down list.
9
*On FH Sensor Controller, set
the connection type to Point to
Point connection for both input
and output.
Set the RPI[ms], and the timeout
value as required.
*In this document, the default
values are used for these
settings.
Precautions for Correct Use
Set RPI to 4 ms or longer on FH Sensor Controller.
34
7.EtherNet/IP Connection Procedure
Precautions for Correct Use
When the measurement interval is short, the measurement processing load is high, or
command processing for operations such as scene group changing is time-consuming, FH
Sensor Controller prioritizes measurement and control processing over communication
processing. As a result, communication between an external device and FH Sensor
Controller may be temporarily interrupted, and a communication error may occur.
In this case, set the timeout value as shown below.
Packet Interval (RPI value) X Timeout value > FH Sensor Controller’s Processing Time
For details on the timeout value of FH Sensor Controller, refer to EtherNet/IP
Communications in Communicating with EtherNet/IP in Section 2. Methods for Connecting
and Communicating with External Devices of the Vision Sensor FH/FZ5 Series Vision
System User's Manual for Communications Settings (Cat. No. Z342).
10
Check that Connections shows
1.
35
7.EtherNet/IP Connection Procedure
7.3.6.
Transferring the Project Data
Connect online and transfer the connection settings and the project data to Controller.
When you transfer a user program, configuration data, setup data, device
variables, or values in memory used for CJ-series Units from Sysmac Studio,
the devices or machines may perform unexpected operation regardless of the
operating mode of CPU Unit.
Always confirm safety at the destination node before you transfer the project
data.
1
Turn ON the power supply to
2
Select Check All Programs
3
The Build Tab Page is
Controller and Switching hub.
from the Project Menu.
displayed.
Check that "0 Errors" and "0
Warnings" are displayed.
4
5
Select Rebuild Controller from
the Project Menu.
A confirmation dialog box is
displayed. Check the contents
and click Yes.
6
Check that "0 Errors" and "0
Warnings" are displayed in the
Build Tab Page.
36
7.EtherNet/IP Connection Procedure
7
Select Communications Setup
8
The Communications Setup
from the Controller Menu.
Dialog Box is displayed.
Check that the Direct connection
via USB Option is selected for
the Connection type.
Click OK.
9
Select Online from the
Controller Menu.
A confirmation dialog box is
displayed. Check the contents
and click Yes.
*The displayed dialog depends
on the status of the Controller
used. Check the contents and
click OK or Yes to proceed with
the processing.
10
When an online connection is
established, a yellow bar is
displayed on the top of the Edit
Pane.
Additional Information
For details on online connections to Controller, refer to Section 6. Online Connections to a
Controller of the Sysmac Studio Version 1 Operation Manual (Cat. No. W504).
37
7.EtherNet/IP Connection Procedure
11
12
Select Synchronization from
the Controller Menu.
The Synchronization Dialog Box
is displayed.
Check that the data to transfer
(NJ501 in the right dialog box) is
selected.
Uncheck the Do not transfer the
EtherNet/IP connection settings
(built-in port and Unit).
Click Transfer To Controller.
13
*After executing Transfer To
Controller, Sysmac Studio data
is transferred to Controller and
the data is compared.
A confirmation dialog box on the
right is displayed. Check that
there is no problem and click
Yes.
A screen stating "Synchronizing"
is displayed.
A confirmation dialog box on the
right is displayed. Check that
there is no problem and click
No.
*Do not return to RUN mode.
38
7.EtherNet/IP Connection Procedure
14
Check that the synchronized
data is displayed with the color
specified by "Synchronized",
and that a message is displayed
stating "The synchronization
process successfully finished".
If there is no problem, click
Close.
*A message stating "The
synchronization process
successfully finished" is
displayed if the Sysmac Studio
project data coincides with the
Controller data.
15
*If the synchronization fails,
check the wiring and repeat
from step 1.
Check that ERR/ALM indicator
in the Controller Status Pane
changes to green color and that
PROGRAM mode is displayed.
Precautions for Correct Use
If changing the connection settings (tag data link table) after performing the synchronization,
the connection settings (tag data link table) are not transferred even when performing the
synchronization
again.
When transferring,
click Transfer to
Controller in the
Built-in EtherNet/IP
Port Settings
Connection
Settings Tab Page
to transfer.
39
7.EtherNet/IP Connection Procedure
7.4. Checking the EtherNet/IP Communications
Check that the EtherNet/IP tag data links are operated normally.
7.4.1.
Checking the Connection Status
Check the connection status of EtherNet/IP.
1
Check that the tag data links are
performed normally by checking the
LED indicators on Controller.
The LED indicators in normal status
are as follows:
NET RUN: Green lit
NET ERR: Not lit
LINK/ACT: Yellow flashing
(Flashing while packets are being
sent and received)
2
Check the LED indicators on FH
Sensor Controller.
The LED indicators in normal status
are as follows:
POWER: Green lit
ERROR: Not lit
NET RUN2: Green lit
LINK/ACT2: Orange flashing
(Flashing while packets are being
sent and received)
3
Select the EtherNet/IP Device List
4
While the Built-in EtherNet/IP Port
Tab.
Settings is being selected, right-click
and select Monitor from the menu.
5
The Built-in EtherNet/IP Port
Settings Connection Monitor Tab
Page is displayed.
40
7.EtherNet/IP Connection Procedure
6
Select the Connection Status Tab.
Check that a blue circle is displayed
next to the applicable connection
listed in the Connection Name
Column.
Check that the Status is 00:0000.
7
Select the Tag Status Tab.
Check that all tags in the Tag Name
Column are displayed and that
green circles are displayed next to
them. Check that the statuses for all
tags are normally resolved.
41
7.EtherNet/IP Connection Procedure
7.4.2.
Checking the Sent and Received Data
Check that the correct data are sent and received.
If you change the values of variables on a Watch Tab Page in the online state,
the connected devices to the output unit may operate regardless of the
operating mode of CPU Unit.
Sufficiently confirm safety before you change the values of variables on a
Watch Tab Page when Sysmac Studio is online with CPU Unit.
1
Select Watch Tab Page from the
2
Select the Watch1 Tab.
3
Click Input Name, and enter the
View Menu.
name of the variables for
monitoring.
When setting a new variable name,
enter the following variable names.
EIPOutput.ControlFlag.F[0]
EIPOutput.CommandCode
EIPInput.StatusFlag.F[0]
EIPInput.CommandCodeEcho
EIPInput.ResponseCode
4
Enter 00101010 in the Modify
Column of
EIPOutput.CommandCode.
(CommandCode [00101010]:
Measurement)
By pressing Enter, the value is set
and the online value of
EIPOutput.CommandCode changes
to 00101010.
42
7.EtherNet/IP Connection Procedure
5
Click TRUE in the Modify Column of
EIPOutput.ControlFlag.F[0].
The online value changes to True.
(EIPOutput.ControlFlag.F[0]:
Command Execution Bit (EXE))
6
After completing the measurement,
7
The online values of
EIPInput.StatusFlag.F[0],
EIPInput.CommandCodeEcho, and
EIPInput.ResponseCode are as
follows:
・EIPInput.StatusFlag.F[0]: True
(Command completed)
・EIPInput.CommandCodeEcho:
00101010
(The sent command code is
returned.)
・EIPInput.ResponseCode:
0000 0000
(The execution result of the
OK is displayed on Monitor.
command 0000 0000: OK or
FFFF FFFF: NG is reflected.)
43
8.Initialization Method
8. Initialization Method
This document provides the explanation of the setting procedure based on 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 Controller
To initialize the settings of Controller, it is necessary to initialize CPU Unit.
Change Controller to PROGRAM mode before the initialization. Select Clear All Memory
from the Controller Menu of Sysmac Studio. The Clear All Memory Dialog Box is displayed.
Check the contents and click OK.
8.2. Initializing FH Sensor Controller
For information on how to initialize FH Sensor Controller, refer to Initializing the Controller in
Section 1. Before Operation of the Vision Sensor FH/FZ5 Series Vision System User’s Manual
(Cat. No. Z340).
44
9.Appendix Procedure Using the Project File
9. Appendix Procedure Using the Project File
This section describes the procedure in which you use the following project file.
The project file includes the contents that are set in 7.3. Setting up the Controller.
Obtain the latest project file from OMRON.
Name
Sysmac Studio compact
project file (Extension:
csm2)
File name
OMRON_FH_EIP_EV200.csm2
Version
Ver.2.00
9.1. Work Flow
Take the following steps to make the tag data link settings for EtherNet/IP using the project
file.
Except 9.2.1. Importing the Project File enclosed in red, refer to each appropriate clause and
sub-clause for further information.
7.2. Setting up FH Sensor
Set up FH Sensor Controller.
Controller
↓
9.2. Setting up Controller
↓
7.3.1. IP Address Settings
↓
9.2.1. Importing the Project File
↓
7.3.7. Transferring the Project
Data
↓
7.4. Checking the EtherNet/IP
Communications
Set up Controller using the project file.
Start Sysmac Studio and set the IP address of
Controller.
Import the Project File to Sysmac Studio.
Connect online and transfer the connection settings
and the project data to Controller.
Check that the EtherNet/IP tag data links are operated
normally.
45
9.Appendix Procedure Using the Project File
9.2. Setting up Controller
Set up Controller using the project file.
9.2.1.
Importing the Project File
Import the Project File to Sysmac Studio.
1
2
Select Import from the File
Menu.
The Import file Dialog Box is
displayed.
Select
OMRON_FH_EIP_EV200.csm2
(project file) and click Open.
*Obtain the project file from
OMRON.
3
The OMRON_FH_EIP_EV200
project is displayed.
*If an error message is
displayed stating "Failed to
Load Descendants", change
the version of Sysmac Studio
to the version specified in 5.2.
Device Configuration or higher
version.
4
Select Change Device from the
Controller Menu.
46
9.Appendix Procedure Using the Project File
5
The Change Device Dialog Box
is displayed.
Check that the Device and the
Version Fields are set as shown
on the right.
Click Cancel.
*If the settings are different,
select the setting items from
the pull-down list and click OK.
6
If you changed the settings in
step 6, the Build Dialog Box is
displayed. Check the contents
and click Yes.
47
10.Revision History
10. Revision History
Revision
Date of revision
Revision reason and revision page
code
01
September 13, 2013
First edition
02
April 22, 2015
Revisions due to upgraded versions of Controller and
Sysmac Studio.
The procedures for EtherNet/IP connection setting changed
to that by Sysmac Studio.
Screens changed due to upgraded version of FH Sensor
Controller.
Point to Point connection set for input and output.
Handshaking set for output control confirmed.
48
2015
P576-E1-02
0415- (0913)
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement