0 оценок0% нашли этот документ полезным (0 голосов)
1K просмотров32 страницы
Applications and Tools Flexible Decoding and Processing of Data Matrix Codes with S7-1200 with 57-1200, HawkEye HE40, PC Access and KTP600 Configuration Example x27 January 2010 Answers for industry.
Applications and Tools Flexible Decoding and Processing of Data Matrix Codes with S7-1200 with 57-1200, HawkEye HE40, PC Access and KTP600 Configuration Example x27 January 2010 Answers for industry.
Авторское право:
Attribution Non-Commercial (BY-NC)
Доступные форматы
Скачайте в формате PDF, TXT или читайте онлайн в Scribd
Applications and Tools Flexible Decoding and Processing of Data Matrix Codes with S7-1200 with 57-1200, HawkEye HE40, PC Access and KTP600 Configuration Example x27 January 2010 Answers for industry.
Авторское право:
Attribution Non-Commercial (BY-NC)
Доступные форматы
Скачайте в формате PDF, TXT или читайте онлайн в Scribd
Flexible Decoding and Processing of Data Matrix Codes with S7-1200
with 57-1200, HawkEye HE40, PC Access and KTP600
Configuration Example x27 • January 2010
SIEMENS
Answers for industry.
Industry Automation and Drives Technologies Service & Support Portal
This article is taken from the Service Portal of Siemens AG, Industry Automation and Drives Technologies. The following link takes you directly to the download page of this document.
examples do not represent customer-specific solutions. They are only intended to provide support for typical applications. You are responsible for ensuring that the described products are used correctly. These application examples do not relieve you of the responsibility of safely and professionally using, installing, operating and servicing equipment. When using these application examples, you recognize that we cannot be made liable for any damage/claims beyond the liability clause described. We reserve the right to make changes to these application examples at any time without prior notice. If there are any deviations between the recommendations provided in this application example and other Siemens publications - e.q, Catalogs - the contents of the other documents have priority.
We do not accept any liability for the information contained in this document.
Any claims against us - based on whatever legal reason - resulting from the use of the examples, information, programs. engineering and performance data etc., described in this Application Example shall be excluded. Such an exclusion shall not apply in the case of mandatory liability, e.g. under the German Product Liability Act ("Produkthaftungsgesetz"), in case of intent, gross negligence, or injury of life, body or health, guarantee for the quality of a product, fraudulent concealment of a deficiency or breach of a condition which goes to the root of the contract ("wesentliche Vertragspflichten"). The damages for a breach of a substantial contractual obligation are, however, limited to the foreseeable damage, typical for the type of contract, except in the event of intent or gross negligence or injury to life, body or health. The above provisions do not imply a change of the burden of proof to your detriment.
It is not permissible to transfer or copy these application examples or excerpts of them without having prior authorization from Siemens Industry Sector in writing.
4
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with 57-1200 V1.0, Entry ID: 40603943
Table of Contents
Table of Contents
Warranty and Liability " 4
1 Automation Task 6
1.1 Application automation task 6
1.2 List of components 7
2 Automation Solution 9
2.1 Wiring diagram 9
2.2 Scanning and processing of Data Matrix code 10
2.3 Communication with the code scanner 13
2.4 "HawkEye4x" function block 18
3 Configuration 19
3.1 Installing and wiring hardware 19
3.2 Connect 87-1200 with PG/PC 20
3.3 Load project in the 87-1200 CPU1214C 21
3.4 Load project into the SIMATIC Panel KTP600 22
3 .. 5 Using PC runtime instead of the panel 23
3.6 Initializing and configuring the HawkEye scanner with Data Matrix
codes 24
3.7 Configuring the PC Access OPC server 26
3.8 Configuring Microsoft Access 28
3.9 Generating own Data Matrix code 29
3.10 Operation of the application via HM I 30
Code Elements 32
]
t
~
i 4
;(
0
'" 5
o
-c
.
.
G
0;
@
'"
~
u History 33
CE-X27· Flexible Decoding and Processing of Data Matrix Codes with 87·1200 V1.D. Entry ID: 40603943
5
1 Automation Task
1 Automation Task
1.1 Application automation task
At a company's goods receipt delivered goods are to be recorded by the HawkEye HE40 Data Matrix code scanner.
The scanner is to transfer the read data via a serial connection using a RS232 communication module CM1241 to a S7-1200 controller (CPU1214C). To be able
to scan bulky goods it will furthermore be possible to buffer the read data, whilst there is no connection to the controller. In this case, the reading of the buffered data will take place automatically after restoring the connection to the controller.
To identify the recorded products, the program of the S7-1200 is to pass on the read ID code to a PC via the Ethernet interface. The OPC server PC ACCESS installed there presents the connecting link to a downstream database (e .. g. MS ACCESS), in which the product description of the read code is searched in the selected language. The product description is then re-transferred via the OPC server back to the S7 -1200 controller and is then displayed on a Basic Panel KTP600.
Parallel to the reading process of each product a time stamp it to be recorded in the database.
STEP7 Basic v10.5 is to be used as configuration tool for the control program and the HMI.
Figure 1-1
Goods receipt; checking of goods
Combined this leads to the following scenarios:
•
scanning and displaying of Data Matrix Code
registration and evaluation of Data Matrix Code by means of database scanning and buffering of data in Data Matrix code scanner
•
•
6
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with 87-1200 V1.0. Entry 10: 40603943
1 Automation Task
Figure 1-2
PC database Microsoft ACX;ESS
Ethernet
" RS232 I
1 Power Su~ .. ly
2 CM1241 RS232
3 S7-1200 CPU 1214C 4 Switch CSM 1277
5 KTP600 PN
6 HawkEye HE40
8 Microsoft ACCESS database
7 PC Access
1.2
List of components
Products Table 1-1
Components Qty MLFB I Order number Note
1. PM1207 Power supply 1 6EP1332-1 SH71
2. RS232 communication module CM1241 1 6ES 7241-1 AH30-0XBO
3. S7-1200 CPU1214C 1 6ES7214-1AE30-0XBO DCfDCfDC
4. Compact Switch Module CSM1277 1 6GK7277-1AAOO-OAAO
5. Basic KTP600 panel (color, PN) 1 6AV6647-0AD11-3AXO optional
6. SIMATIC HE 40 handheld code reader 16GF 3020-0HE40-0XX4 The order numbers
optional: Optional: listed relate to the EU
• HE 40T .6GF 3020-0HT40-0XX4 plug-in power pack
with RS232 interface
• HE 45 .6GF 3020-0HE45-0XX4
• HE 45T .6GF 3020-0HT45-0XX4 Note A basic panel KTP600 is not absolutely necessary. To simulate the user interface, PC runtime from STEP7 Basic can be used.
CE-X27· Flexible Decoding and Processing of Data Matrix Codes with 87·1200 V1.0, Entry 10: 40603943
7
1 Automation Task
Accessories Table 1-2
Component Cty MLFB I Order number Note
1. 1 9S0 mAH Ll-ion .battery module 16GF 3020-0AC40-0AB2 For wireless scanning
far SIMATIC HE40(T) I HE45(T)
2. Battery charger (2-bay) with EU power 16GF 3020-0AC40-0AA3
supply for SIMATIC HE40lHE45
3. Ethernet connection cables between 26XV18 70-3QH20
KTP600, S7 -1200 CPU and PC Note More information on the HawkEye handheld code reader can be found here:
SIMATIC HawkEye 40/45
Programming package Table 1-3
Component Qty MLFB I Order number Note
1. STEP 7 Basic Vm5 1 6ES7822-0AAOO-OYAO
2. OPC Server PC Access 1 6ES7840-2CC01-0YXO From v1.0 SP4
3. Microsoft Access 1 OPC Client Note PC Access SP4 can also be downloaded here:
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with 87-1200 V1.0. Entry 10: 40603943
2 Automation Solution
2 Automation Solution
2.1 Wiring diagram
87-1200 PM1270 + CM1241 + CPU1214C + C8M1277
Figure 2-1
1----...// ~
Data flow from controller to PC database Figure 2-2
PC database
MSAccess database
(Ope client)
1
PC Access (OPC server
It .
1"-
CSMI271 CPU 1214C
F-
-I L-...I Ethernet network CE-X27 - Flexible Decoding and Processing of Oala Malrix Codes with 37-1200 Vl.D, Entry 10: 40603943
9
2 Automation Solution
2.2 Scanning and processing of Data Matrix code
To provide a rough overview, a simplified functionality of this process is shown below,
Figure 2-3
o
HawKl:.ye HI::4U
L......J
CM1241 + CPU 1214C
Table 2-1
No Function
1. The Data Matrix code is scanned.
2. The code reader captures the image,. "decodes" the information and outputs this
information at the serial interface of the reader.
If the code reader is not connected with the 57-1200 it will store the data in the
internal buffer. When it is connected with the S7-1200 all data from the internal
buffer is read and consecutively output via the serial interface.
3. The RS232 communication module collects the information and buffers it.
4. The S7-1200 reads the information from the RS232 communication module and
provides this information to the PC database via Industrial Ethernet and PC
Access.
5. The PC searches the database for scanned information and returns the product
designation to the controller as plain text. In addition, the flow of goods is
archived.
6. The basic panel KTP60D displays the scanned product 10 and the product
designation which was returned from the database. Scanning the Data Matrix code
The optical detection of the Data Matrix code corresponds to the basic functionality of a camera.
To enable scanning also under difficult lighting conditions, the Data Matrix code is illuminated by means of LEOs.
10
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with S7-1200 Vi.0, Entry 10: 40603943
2 Automation Solution
Scanning the Data Matrix code requires the laser beam of the scanner to be aligned to the center of the Data Matrix code. The laser beam appears when pressing the button on the HawkEye.
Decoding and output of the Data Matrix code
The code reader analyzes the matrix by means of the specification for Data Matrix code and converts the information to an ASCII string.
Figure 2-4
II q 12345678
The start of the ASCII string with the data is delimited with a comma as a prefix and the end of the string is delimited with a <CR><LF> (carriage return and line feed = enter and line feed) as suffix.
Figure 2-5
q 12345678 q ,12345678<CR><LF>
The data is sent via the serial interface.
Receiving and processing information
The sample program has contigured the S7-11UU in such a way that all data starting with a comma and ending with a <CR> is received.
First of all the data is buffered in the RS232 communication module. Only when the data is read from the RS232 communication module by the S7-1200 controller, due to the control program, will the actual string be extracted, stored in DB1 and therefore provided to the PC database.
Figure 2-6
,12345678<CR><LF> c==>
~B1.DBB5 .12345678··
L
The S7-1200 will now wait that the database assigns a string to the read code, consisting of the product designation and provide it to the S7-1200 again as plain text.
Data exchange between PC and 57-1200
The OPC server "PC Access" provides data exchange between PC and S7-1200. Taking the restrictions below into account, PC Access can be used for the data exchange with a S7-1200.
• Only the DB1 data block can be accessed
• The data block must be declared "non-symbolic"
• To address the variables in the data block the syntax of the S7-200 is obligatory (V, VB, VW, VD)
CE-X27· Flexible Oecoding and Processing of Data Matrix Codes with 37·1200 V1.0, Entry 10: 40603943
11
2 Automation Solution
OPC server and database
The OPC server uses the Ethernet connection and can access the data of the S7- 1200. In tum the data is provided to an OPC client (database MS Access) for read and write access.
The database also evaluates the communication status consisting of two bytes, in addition to the string. If the "New String" and "Search database" command is detected, the string is read from the OPC server.
Figure 2-7
Database PC
MS Access Database
Visual Basic Scri'pt (Ope client)
.. Read 1Ntien char1ge of variables im ope server • Evaruation: which variables have changed?
• Execute relevant commend
r-r-
[
I
PC database
PC Access OPC server
IISS!;' DB1.DSBS ,,12345678"
" c
."
~~I
~~ ~llt
~J LL~I~I~~~~~~~_j::~::::~::l_~~~_j
~~. _I.
~~ ~~~o
=:8 ::::~ '.J,," <"\
€ ~ Searching the database
$ EI
~ ~ After detecting the "Read" command of the communication interface, the database
.~ - ... - ..
reads the string and searches tor it in the database. I he data in the database is archived. If the string is found, the product designation is written to the OPC server. In the "buffered scanning" mode the product designation is not transferred,
Figure 2-8
Database PC
MS Access Database
Visual Basic Script (ope client)
• The "Search" command e.ecute. the "Select" command at the datab.s •
• When the string is found the product description i. p •••• d on to the OPC server
PC database
PC-Access OPC Server
VB87 ~ [lBI ,[lBB·57 "Cup"
S7-1200
12
CE-X27 - Flexible Decoding and Processing of Oata Matrix Codes with 87-1200 V1.0, Entry 10: 40603943
2 Automation Solution
Information on the touch panel
The basic panel KTP600 is used to display selected data of the 87-1200. The last string sent to the database and the corresponding plain text is displayed
In the "buffered scanning" mode the product designation is not displayed.
2.3 Communication with the code scanner
Communicating with the 87-1200 controller via the communication module with the code scanner is performed by integrating the "Point to Point (PIP)" communication blocks.
Configuration of port
For data of the code scanner to be received via the PtP communication module the port has to be configured according to the specifications of the code scanner. This can be done via the static initial configuration In the properties of the device configuration or, like in this example, via the control program using the "PORT_CFG" block.
Figure 2-9
#PORT_CfG_ Instance
-------1,EN
END!---DONE
ERROR
STATUS
%M10Q,Q "First_Cycle" ,REQ
#PORT PORT
,PROTOCOL .. - BAUD ,PARITY _IDATABITS
, .. _ 5TOPBITS
FLOWCfRL .. ~XONCHAR XOFFCHAR ~ WAITIlME
The "Port" block parameter specifies the communication module via which the code scanner is connected. Other important parameters are
• Baud rate
• Parity
• Data bits
• Stop Bits
These parameters are stored in the instance data block of "PORT _ CFG" (Figure 2-10). A rising edge on the "REO" input enables the configuration change. In this example, this happens in the first cycle, when the controller is switched from STOP to RUN.
CE-X27· Flexible Decoding and Processing of Data Matrix Codes with 87·1200 Vl.0, Entry ID: 40603943
To clearly detect the data from the code scanner, the conditions which identify the beginning and the end of a receiving message have to be configured. This can be done via the static initial configuration in the properties of the device configuration or, like in this example, via the control program using the "RCV_CFG" block.
Figure 2-11
It RCV_CfG_ lnstence
RCV_CFG
------EN
ENO _
DONE ......
%M1000
"First_CYCle" - REQ #PORT _ PORT
_ CONDITIONS
ERROR -I .. " STATUS _
The "Port" block parameter specifies the communication module via which the code scanner is connected. The "CONDITIONS" data structure indicates the initial and end conditions for receiving messages. These parameters are stored in the instance data block of "RCV _ CFG" (Figure 2-12). A rising edge on the "REO" input enables the configuration change. In this example, this happens in the first cycle, when the controller is switched from STOP to RUN.
14
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with 87-1200 V1.0, Entry ID: 40603943
2 Automation Solution
Figure 2-12
15 '" RCV_CFG _ instance RCV_ CfG
16 .... Input
17 REQ Baal false
1 B PORT PORT
19 '" CONDITIONS CONDITIONS
20 '" START snuct
21 STARTCOND Ulnt
22 IDLETIME Ulnt 0
23 STARTCHAR Byt.e 8#lM2C
24 '" SEQ I ARRAVll.4] of SL ....
25 CTL BYTE B#16#00
26 STR ARRAV[l ... 5] of Char
27 PAD BYTE 8#16#00
28 '" END struct
29 ENDCOND Ulnt 32
30 MAXLEN Ulnt 80
31 N Ulnt 0
."
~~I 32 LENGTHSIZE Ulnt 0
00 > 33 LENGTHM Ulnt 0
~ 0'
.::::J ;>.
Th~ 34 ROITIME Ulnt 0
·c ~
Ii 35 MSGTIME Ulnt 0
Ij~ 36 CHARGAP Ulnt 12
-<"', 37 ... SEQ Struct
~~
. ,
oDE 38 CTL BYTE BIol161ol1D
tile-
@ "
~~ 39 STR ARRAVll.5] of Char
-c 0
;"''; 40 Output
t, ~ '"
uf 41 DONE Baal false
u
42 ERROR Boo! Ielse
43 STATUS Word WIol16#OOOO In this example the start condition is as follows:
• detecting a start signal - STARTCOND = 1
• thp. start character is a comma - STARTCHAR = HEOX#2C
The end condition is configured as follows:
• detecting a character string of a maximum of 5 characters - ENDCOND = 32
• taking into account the fifth character from the 5-digit character string - SEQ.CTL = HEX#10 (binary: 0001_0000)
• the fifth character to be considered is <CR> - SEQ.STR[5] = '$R'
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with 87-1200 Vl.0, Entry 10: 40603943
2 Automation Solution
More detailed explanations on the end conditions by character string
Each character of the end character strings, which can be up to 5-digits, can be taken into account or ignored. Selection is via activation bits. Character 1 is bit 0, character 2 is bit 1, etc. When one bit is enabled, the character of the message has to match the character of the configured end character string in this place,
The last relevant character is always on the very right. This means that the fifth character of the character string corresponds to the last character which is to be detected. Subsequent characters are rejected.
Table 2-2 shows the evaluation of a message, as it is performed in this configuration example. Green fields display the configured start and end conditions. Red fields are ignored in the end conditions,
Table 2-2
Activation bits of 5- 01 2 3 4
digit character string
for end condition 00 0 0
Stored message in 57- ,A B C 0 E F <CR>
1200 Table 2-3 shows an example of a different possible end condition where the second and fifth character of the end character string have to match. The first, third and fourth character is ignored, so it can be arbitrary.
Table 2-3
Activation bits of 5- 01 2 3 4
digit character string
for end condition 01 0 0
Stored message in 87- ,A B C 0 E F <CR>
1200 15
16
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with S7-1200 Vi.0, Entry 10: 40603943
2 Automation Solution
Transferring messages from the buffer of then communication module to the data block of the 87·1200
The RS232 communication module can buffer up to a maximum of 1KB of data. The "ReV PTP" data block is needed to be able to transfer the data from the buffer of the RS232 communication module to the data block of the S7-1200.
Figure 2-13
#RCV _PTP _ Instance
RI,..V_I-'If-'
--------1"EN END 1------
#.statl_11:V EN R NDR #NDR
#PORT PORT ERROR #Error
P#DB2.DBX12.0 STATUS #Statu5
BYTE 80 • BUFFER LENGTH - #Length
~--------~
The "Port" block parameter specifies the communication module via which the code scanner is connected. If new data IS available in the buffer of the communication module, then the NDR output is set to "1". The data can now be received by a positive edge on the EN_R input and can be written into the receive buffer of the 87 -1200. The length of the data in the receive buffer is output on the LENGTH output. The value on the STATUS output indicates the reason for the ending the data receipt. A list of possible reasons can be found in the S7-1200 manual.
Since the received data in this configuration example is strings, a string with a total length of 80 bytes is indicated on the BUFFER block parameter.
The first byte of a string always contains the total length of the string, in this case the value "80". The second byte in a string always contains the length information of the data currently in the string. To avoid that both length information is not overwritten, the start address on the BUFFER block parameter has to be moved by two bytes. This means that data can only be written from the third byte on. The length information of the current data has to be copied from the LENGTH output to the second byte of the receive buffer string.
Indicating the start address is non-symbolic. The data block of the receive buffer has to be declared "non-symbolic" when creating it.
Example:
If the string starts with a total length of 80 bytes on the ro" byte in the data block, then byte 10 contains the value of the total length and byte 11 the value of the actual length. The data IS located from byte 12 to byte 94. The specification of the BUFFER block parameter is as follows:
P#DB2.DBX12.0 BYTE 80
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with 37-1200 Vl.D, Entry 10: 40603943
17
2 Automation Solution
2.4 "HawkEye4x" function block
The "HawkEye4x" function block included in delivery, facilitates the configuration of the communication parameters described in chapter 2.3.
The "Port" block parameter specifies the communication module via which the code scanner is connected. The start character is indicated as a hexadecimal code on the "StartChar" block parameter. The end character has to be indicated in ASCII code on the "EndChar" block parameter.
The "NDR" output signals the presence of new data. If there is a fault on the RS232 module, this output will display "Error". Via "Status" the reason for ending the message receipt is output A list of possible reasons can be found in the S7-1200 manual.
On the "rcv_Buffer" output a receipt buffer has to be Indicated, which is located in data block 1. The buffer is a string data type with a total length of 80 (String[80])_ The problem of the length information has already been taken care of (see page 17).
18
3 Configuration
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with S7-1200 V1.0, Entry 10: 40603943
Configuration
Installing and wiring hardware
No
Instruction
3.1
3
Table 3-1
Comment/picture
1. Mount the PM1207, the CM1241, the CPU1214C and the CMS1277 onto a top hat rail
2. Connect the controller, the switch and the touch See Figure 2-1. panel with the DC 24V supply voltage of the
PM1207
3. Connect the controller, the touch panel and the See Figure 2-2.
PC using the Ethernet cable and the switch
4. Connect the code scanner with the RS232 communication module and the plug-in power pack
5. Plug the reader into the pistol grip handle and connect the cable.
6. Connect ali earth connections with earth.
Note At this point it is assumed that the necessary software has been installed on your computer and that you are familiar with handling the software.
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with 87 -1200 Vl.D, Entry 10: 40603943
3 Configuration
19
3.2
Connect 57-1200 with PG/PC
Table 3-2
No
Instruction
1. Connect your development system (PGIPC) to the S7-1200 CPU, using an Ethernet cable.
2. Open the network connection in the control panel of the PGIPC.
3.
Open the properties of the network connection.
4.
Open the Internet Protocol (TCP/IP) Properties
5.
In the "General" tab mark "Use the following IP address" and enter the address:
IP address: 192.168.0.100 • Subn et: 255.255.255.0
6. Confirm with OK to close all windows
Comment/picture
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with 87-1200
Select the "PLC_1" device in project navigation and open the device configuration
Comment/picture
4.
Check the device configuration and if necessary adjust your hardware, Enter the following IP address:
IP address: 192,168.0.1 • Subn et: 255.255255,0
5.
Check whether the system memory byte 100 is active
For this purpose click CPU (1) and then properties (2).
• Then select "System and clock memory" (3).
Enable the system memory byte and set as location MB100 (4)
6. Load the project into the CPU
Select CPU, press right mouse button and select "Download to device" -7 "All"
• After loading set CPU to "RUN"
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with 87 -1200 V1,0, Entry 10: 40603943
21
3 Configuration
3.4 Load project into the SIMATIC Panel KTP600
Table 3-4
Comment/picture
No
Instruction
1. • Connect KTP600 basic panel with a DC 24V power supply
• Connect your development system (PG1PC) with the KTP600 basic panel using an Ethernet cable
2.
After the "bootloader" sequence, select the "Transfer' button.
Beforehand, make sure that the IP address entered in the panel corresponds with the assigned IP address in the project.
• IP address: 192.168.0.2
• Subn et: 255.255.255.0
The panel is now ready for loading the project.
Transfer I]
Stan
Control Panel
3.
Click HMI_1 [KTP600] with the right mouse in the
project navigation
4. Select "Download to device" 7 "All"
5.
Tick the "Action" column and click "Download"
~--~.-
..... -""---
-<qm----_.
·r til
o!lI, ,
6.
The HMI project is loading. The panel starts automatically after completion.
Once the S7~1200 project was successfully loaded, connect the KTP600 basic panel with the 87-1200 CPU1214C, using an Ethernet cable.
7.
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with 87-1200 Vi.0, Entry ID: 40603943
22
3 Configuration
3.5 Using PC runtime instead of the panel
Apart from programming a controller, STEP? Basic V1 0.5 also offers the visualization of the project. The software supports all currently available basic panels with Ethernet interface.
[f no panel is available, the panel can also be simulated by the integrated PC runtime.
For convenient operation of the project, a HMI project was integrated which can also be simulated via PC runtime.
To make the simulation executable please proceed as follows:
Table 3-5
No
Instruction
Commentipicture
1.
Go to the control panel of your programming device and set the PGJPC interface as follows:
[pillametliellllg Ihra NDI S -C~ m~ f(:P/jp' ProIClkoil (RfC·l00;:n
2.
Go back to the STEP7 Basic project
*,ap10
3.
Mark "HMI 1 [KTP600]" in project navigation
• Subsequently click the "Start runtime" icon
Fill"
Oeviel!!:t
QO
..- _JCEj:/_:\lIdo IfMdn~dNGI'!
CE-X27· Flexible Decoding and Processing of Data Matrix Codes with 37·1200 V1,0, Entry 10: 40603943
23
3 Configuration
3.6 Initializing and configuring the HawkEye scanner with Data Matrix codes
The scanner has to be set up before using it for the first time. The scanner is set up by scanning special codes and is done in two steps.
Scan the following codes successively. After each Data Matrix code, wait for the scanner feedback.
Initializing
Table 3-6 Initializing the code scanner
No
DMC
Instruction
1.
Reset to factory settings
• 8 data bits
• 1 stop bit
• Baud rate: 57600 • No parity
2.
Delete start and end characters
3.
Save
The setup can be checked with an interface analyzer (e.q., HyperTerminal). Settings: 8N1, 57600 or 4800.
Note
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with S7-1200 V1.0, Entry ID: 40603943
24
3 Configuration
Configuring
Table 3-7 Configuring the code scanner
No
DMC
Explanation
1.
Add comma before each string Attention: scan only once!
2
Save
3.
Add CR and LF after string Attention: scan only oncel
4.
Save
5.
4800 bits per second
M09'i_OI
.. _ ........ .--.- I!!!!!!!!!!
6.
Save
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with 87 -1200 V1.0, Entry ID: 40603943
25
3 Configuration
3.7 Configuring the PC Access OPC server
Table 3-8
No I
Step
Figure/short note
1.
Unzip the file from Table 4-1 no. 2
CEx27 PC Access v1dO.zip
2.
Open the unzipped project with PC Access
'.pca
3. 4.
Save the PC Access project again
Open the settings for the PC/PG interface (1 +2) and check the settings (3+4). Ensure that the used Ethernet interface (TCP/IP) of your PC is used as an access point.
I iiM1Md§¥,,,,wi'J.P.ip'·ih;
Net'I'P\.C .••
__ -=-fJ~
le:':':!f
,tp:.mhn.'II .... ~
26
5.
Subsequently. open the CPU settings
(1 +2) and check them (3-5) too. The settings used here relate to the 57-1200 and should look like this:
• IP address: 192.168.0.1
• TSAP Local: 10.00
TSAP Remote: 03.01
kW ...... --
... ""---
~Q
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with S7-1200 Vi.0, Entry ID: 40603943
No
Step
'diffl!#i#ljfl,.reWi¥,iF'4;';;;;
fI.e [Oit 'View :5J:.5lu:l; Tools Ii!tl
~-'--+ r.IH~~ .. ~·~_~m~~---------
l~PAlh.~ Il~.r68_0 1 ~
T ....
3 Configuration
6. Check the ope communication to the controller. Use drag & drop to move the configured variables to Test Client (bottom part of the PC Access window).
7. Now start Test Client
In the "Value' column the values should r~-
now be displayed, "Quality" of the - -_ .. _--
- -
variables should change to the "Good"
status.
J
SES W ~~
~.J::;_........;.. -
8. Save and close PC Access. CE-X27· Flexible Decoding and Processing of Data Matrix Codes with 87·1200 V1.0, Entry ID: 40603943
27
3 Configuration
3.8 Configuring Microsoft Access
Table 3-9
No Step Figure/short note
1. Unzip the file from Table 4-1 no. 3 CEx27 Database v1dO.zip
2. Open the unzipped project with *.mdb
Microsoft Access
Confirm the security dialog boxes with
'Yes" or "Open"
3. The previously configured OPC server r--- :--,
starts automaticallv, .d~1:r':E~~:~i5.:';!cp- .. a_., ....... 1 4. Subsequently, the following window appears.
Go to the "Product Manager" view.
5.
In the "Product Manager" screen form you can assign designations for the codes as plain text.
denotation ;;;='/english
;;;_- "
__,__, Scanner ID d t t·
~ eno a Ion
--'-...J
~ german
--'--'
2B
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with 87-1200 V1.0, Entry 10: 40603943
3 Configuration
3.9 Generating own Data Matrix code
On the Internet page below own Data Matrix codes can be created which can then be added to the database.
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with 37-1200 V1.0, Entry 10: 40603943
29
3 Configuration
3.10
Operation of the application via HMI
The application can be easily and intuitively operated via the HMI user interface, included in delivery, Once the database was loaded and the OPC server is active, the codes can be scanned.
Structure of the user interface Soft keys
• Soft key F1 goes to the start screen
• Soft key F5 registers the database again when the connection between CPU and running. database was interrupted
• F6 soft key changes between German and English
Left bar
• Change of language
• Change between the "Single scan" and "Buffered scan" mode
Upper section
Status of database Please scan Search in database Busy ...
Finished
• Status of S7-1200 Wait...
New data available
Error on RS232 module with respective status code
• Number of scans
Lower section
•
Display of scanned data
The "Single scan" mode also displays found product in plain text
•
3D
CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with S7-1200 V1.0. Entry 10: 40603943
3 Configuration
Figure 3-1
Configuratton ex.nple X27
F!.1tito dtcodlng Uld procumg of Om ~ Coda
CE-X27 - Flexible Decoding and Processing of Data Malrix Codes with 37-1200 V1.0, Entry 10: 40603943
31
4 Code Elements
4
Code Elements
The software examples are available on the HTML page from which you have downloaded this document
Table 4-1
No File name Contents
1. CE_x27 _S7-1200_1I1dO.zip STEP 7 Basic V10.5 project
2. CE_x27 _PC-Access_ v1 dO.zip PC Access Project
3. CE~x27 ~Database.zip MS Access Data Base 32
CE-X27 - Flexible Decoding and Processing of Oata Matrix Codes with S7-1200 V1.0, Entry 10: 40603943
5 Histor
5
H" t
IS or I
Version Date Modification
V1.0 27.01. 010 First edition CE-X27 - Flexible Decoding and Processing of Data Matrix Codes with 87 -1200 V1.0, Entry 10: 40603943