Professional Documents
Culture Documents
Applications
The quickest way to
the best solution
The infrastructure
To transfer the barcodes to The CP 340 prepares the S7-CPU with CP 340
the S7-CPU there is a CP 340 RS232C signals coming from
in the central rack (for point- the scanner and transfers
to-point link-up). This is inde- them via a backplane bus to MPI RS 232
pendent of manufacturer, i.e. the S7-CPU. PG/PC
various types of scanner (with
In this application a fixed
RS232C interface) by all
reputable manufacturers can barcode scanner by SICK and ... Fixed or hand
scanners by
various
manufacturers
be linked using this module. a DATALOGIC handscanner Fixed barcode scanner Handscanner
340. Barcode
The procedure
Barcode
User interface
The user interface (DB3) gives The date and time refer to the
you the characters of the moment when the barcode
barcode requested. But re- was written to the ring buffer.
member: there is only ever The data is in bytes 2 and 3
one data entry in the user (month/day), the time consists
interface at a time. The pay- of bytes 4-7
load data is always output (hour/minute/second/hun-
with a marker and the date dredth of a second).
and time.
The payload data is output as
The user is ensured that it is a a string with the length set at
complete data record by the 254. This length can be modi-
presence of the marker "D"
fied by the user at any time.
(byte 0).
Documentation structure
A1 As well as the software application software devel- Section B takes you step-by-
Applikationsbeschreibung blocks needed to make up the oped and the main specifica- step through the installation
whole application, you will tions. and start-up of the applica-
A2
Funktionsmechanismen also get detailed documenta- tion.
tion. This is divided into four
Section A2 describes the Section C, containing the
main parts.
B functions of all the compo- annotated code elements, is
Step-by-Step
nents in detail. If you want to of interest if you want to take
start up the application and the software and expand or
test it first using step-by-step adapt it to your set-up.
C
Programmcode
instructions, you can skip
Section A2.
Technical specifications
Downloadable elements
Topic Contents Description
Reading and processing of barcodes with Documentation 67 pages including:
SIMATIC S7-CPU • Introduction to barcodes
and serial CP 340
• Description of installation and operating principles
• Step-by-Step instructions
• Diagrams
Code (STEP7) BarcoCP: Load memory: 5.6 Kbytes, user memory: 3.7 Kbytes
• FB P_RCV (receive function block for CP 340)
• DB 99 (instance DB of FB P_RCV)
• FC 1 (monitors ring buffer overspill)
• FC 40 (ring buffer management)
• DB 1 (receive block for barcodes)
• DB 2 (ring buffer storage)
• DB 3 (user interface, allows access to data in ring buffer)
Applications
with the SIMATIC
Card
Applications
System Utilities