Escolar Documentos
Profissional Documentos
Cultura Documentos
Application note
A203600, English
Version 1.0.0
2 General
http://www.wago.com
Technical Support
Phone: +49 (0) 571/8 87 5 55
Fax:
+49 (0) 571/8 87 85 55
E-Mail: support@wago.com
Every conceivable measure has been taken to ensure the correctness and
completeness of this documentation. However, as errors can never be fully
excluded we would appreciate any information or ideas at any time.
We wish to point out that the software and hardware terms as well as the
trademarks of companies used and/or mentioned in the present manual are
generally trademark or patent protected.
Application note
A203600
Table of Contents
TABLE OF CONTENTS
1 Important comments ................................................................................. 4
1.1
Legal principles...................................................................................... 4
1.1.1 Copyright ............................................................................................... 4
1.1.2 Personnel qualification .......................................................................... 4
1.1.3 Intended use ........................................................................................... 4
1.2
Range of validity.................................................................................... 5
1.3
Symbols ................................................................................................. 5
2
Description.................................................................................................. 6
4 Solution ....................................................................................................... 7
4.1
Configure the SICK IVC 2D Camera for EtherNet/IP .......................... 7
4.1.1 SICK IVC Communication Setup Tool ................................................. 9
4.2
Enable the WAGO 750-871 Controller for EtherNet/IP ..................... 11
4.3
Program the 750-871 to send Explicit EtherNet/IP Messages............. 12
Application note
A203600
4 Important comments
1 Important comments
To ensure fast installation and start-up of the units described in this
manual, we strongly recommend that the following information and
explanation is carefully read and adhered to.
Application note
A203600
Important comments
1.3 Symbols
Danger
Always observe this information to protect persons from injury.
Warning
Always observe this information to prevent damage to the device.
Attention
Marginal conditions must always be observed to ensure smooth operation.
ESD (Electrostatic Discharge)
Warning of damage to the components by electrostatic discharge. Observe
the precautionary measure for handling components at risk.
Note
Routines or advice for efficient use of the device and software optimization.
More information
References to additional literature, manuals, data sheets and INTERNET
pages
Application note
A203600
6 Description
2 Description
The purpose of this document is to provide an example of interfacing a WAGO 750-871
ETHERNET Controller with a SICK IVC-2D camera using EtherNet/IP protocol. In this
example, the WAGO 750-871 communicates with the SICK IVC-2D via explicit EtherNet/IP
messaging. The SICK IVC-2 responds to messages originated by the WAGO 750-871, allowing
the 750-871 to read and write variable data from the camera.
3 Reference Material
This procedure was tested with the following hardware and software:
System Layout
SICK IVC-2D
192.168.0.79
Programming
Terminal
192.168.0.10
WAGO 750-871
192.168.0.82
NOTE: This procedure assumes that the WAGO 750-871 has a valid IP address and is
installed on a working network along with the SICK IVC-2D camera and the
programming terminal. If necessary, please refer to WAGOs Application Note
A202900 for assigning a static IP address to the WAGO 750-871.
Application note
A203600
Solution
4 Solution
There are three main steps in setting up the system:
1) Configure the SICK IVC 2D Camera for EtherNet/IP
2) Enable the WAGO 750-871 Controller for Ethernet/IP
3) Program the WAGO 750-871 to send Explicit EtherNet/IP Messages
IVC Studio and the SICK IVC 2D camera. It only focuses on configuring
variables in the camera, so they can be accessed via EtherNet/IP from the
WAGO 750-871 controller. For more information on the SICK IVC products,
please refer to their respective manuals.
In IVC Studio 2.8 there are six EtherNet/IP assembly instances defined - three input
and three output. The assemblies are of different sizes to fit different applications.
The input and output assembly for each type contains the same number of each data
type and are of the same length. The three assemble types are named: Allround,
No strings and Small. This example uses the Small assembly.
Assembly
Type
Description
Allround
All types
Represented
More room for
Numbers
Small set with
all types
No strings
Small
Application note
A203600
Input assembly
Instance (to IVC
device)
100
Output assembly
Instance (from
IVC device)
101
Size
102
103
470
106
107
174
494
8 Solution
The layout for each assembly type is listed below. The data is in its order of occurrence in the
assembly instance. An EtherNet/IP assembly is similar to a data structure object, which is
made up of various data types and lengths.
Allround Assembly (100 & 101)
No. of
Type
values
SINT
10
INT
10
DINT
10
REAL
10
SSTRING
6
Camera Parameter
Name
SINT0 9
INT0 9
DINT0 9
REAL0 9
SSTRING0 5
Camera Parameter
Name
SINT0 9
INT0 9
DINT0 9
REAL0 9
SSTRING0 5
Start Byte
Offset
0
10
30
70
110
Total Size
Start Byte
Offset
0
50
150
270
Total Size
Start Byte
Offset
0
10
30
70
110
Total Size
Type Size
1 byte
2 bytes
4 bytes
4 bytes
64 bytes
494 bytes
Type Size
1 byte
2 bytes
4 bytes
4 bytes
470 bytes
Type Size
1 byte
2 bytes
4 bytes
4 bytes
64 bytes
174 bytes
NOTE: IVC Studio 2.6 SR1 uses a different Small Assembly, which is 172 bytes long.
Application note
A203600
Solution
Application note
A203600
10 Solution
In the example above three input values and four output values are mapped. The first input
value is mapped from SINT0, which is the first SINT (short integer) in the input assembly, to
table index V0. The next two are mapped from REAL0 and REAL1 to table index V1 and V2,
respectively. The output values, representing position, area and volume in this example, are
mapped from table index V9 - V12 to INT0 and INT1 (which are the first and second integers
in the output assembly), and to REAL0 and REAL1.
Type: Data type of the parameter in the assembly
Parameter: The parameter in the assembly
Destination: Destination parameter in the IVC (only table values allowed)
Source: Source parameter in the IVC (constant, table value or step result allowed)
Name: User defined name
Preview(HEX): Shows actual raw format. This column will be automatically updated
when the communication window opens and closes, but can be manually updated by
clicking the Get preview(Hex) value command button.
Application note
A203600
Solution
11
Run a web browser (e.g. Microsofts Internet Explorer) on the programming terminal.
In the address bar enter the IP address of the 750-871 ETHERNET Controller and hit
Enter.
The 750-871s internal webpage should appear. If it does not, check that you have an Ethernet
link to the 750-871s Ethernet port, and that the IP address of the programming terminal is in
the same subnet as the 750-871.
Click the Port hyperlink in the left browser frame. The following dialog will appear:
Application note
A203600
12 Solution
Application note
A203600
Solution
13
3) This program will use a user-defined data structure to organize the data between the 750871 controller and the SICK IVC 2D camera. Click on the Data Types tab in the lower
left-hand corner.
Type in the name of the new data type as SmallCameraData, and click OK
Enter the following member variables between the key words STRUCT and
END_STRUCT like below:
TYPE SmallCameraData :
STRUCT
SINTx:ARRAY [0..9] OF BYTE;
INTx:ARRAY [0..9] OF INT;
DINTx:ARRAY [0..9] OF DINT;
REALx:ARRAY [0..9] OF REAL;
STRINGx: STRING(63);
END_STRUCT
END_TYPE
NOTE: To avoid typing errors, copy the above text to the Windows clipboard
Application note
A203600
14 Solution
The program code for interfacing with the camera will be put into a function block for
organization and re-usability. To create a new function block, click on the POUs tab in
the lower left-hand corner of CoDeSys and then double-click on the POUs folder in the
POU view. Select Project..Object Add.. from the top menu bar.
Application note
A203600
Solution
Enter the following variables in the declaration window for the function block
SickIVP_UpdateSmall_Instance.
VAR_INPUT
strIpAddress:
END_VAR
VAR_IN_OUT
utReadData:
*)
utWriteData:
data*)
END_VAR
VAR_OUTPUT
xReadError:
xWriteError:
END_VAR
STRING;
BOOL;
BOOL;
VAR
EthernetIpFB:
aDataIn:
aDataOut:
wLength:
dwTimeOut:
wStep:
END_VAR
EML_UCMM_REQ;
ARRAY [1..2000] OF BYTE;
ARRAY [1..2000] OF BYTE;
WORD;
DWORD := 4000;
WORD:= 1;
When complete, the variable declaration window should look like the screen capture
below.
Application note
A203600
15
16 Solution
NOTE: To avoid typing errors, copy the above text to the Windows clipboard
Application note
A203600
Solution
When complete, the program should look similar to the screen capture:
Application note
A203600
17
18 Solution
Application note
A203600
Internet:
http://www.wago.com