Starting up the device - Configuration
Leuze electronic GmbH + Co. KG
BCL 248i
109
8.17
Example configuration: Direct activation via the switching input
8.17.1 Task
• Reading of a 12-digit bar code in 2/5 Interleaved format
• Direct activation of the BCL 248i via a photoelectric sensor
Code sample
Code 2/5 Interleaved 12 digits with check digit
8.17.2 Procedure
Hardware, connections
The following connections must have been established:
• Voltage supply (PWR)
• PROFINET-IO (HOST) In
• Photoelectric sensor at SWI1
Required modules
Include the following modules in your project:
• Module 1023 – Decoding result 12 bytes
Parameter settings of the "device parameters"
Tab. 8.54:
Device parameters for example configuration 2
Byte
Description
Default value
Change value to
1
Code type 1
0
01: 2/5 Interleaved
4
Number of digits 3
0
12
Flow charts
Successful reading
SPS
Lichtschranke
BCL 2x8i
Die Lichtschranke wird unterbrochen.
Das Signal vom Schaltausgang der Lichtschranke
liegt am Schalteingang des Barcodelesers an und
aktiviert den Scanner.
Gelesene Barcodes werden vom Modul 1023
verarbeitet und übertragen:
Lesung abgeschlossen Bit 0.1 = 1 und Barcode
decodiert Bit 0.2 = 0.
Im Byte 1 wird die Datenlänge eingetragen, hier 11
dezimal. Das Decodierergebnis wird in den
folgenden 11 Bytes übertragen.
Interne Verarbeitung der Daten.
Der Strahl der Lichtschranke wird wieder frei und
setzt den Schalteingang des Barcodelesers auf 0.
Das deaktiviert den Scanner.
Beschreibung
Zeit
Lichtschranke von 0 → 1
Interne Verarbeitung
Lichtschranke von 1 → 0
M 1023 Bit 0.1 von 0 → 1
M 1023 Bit 0.2 = 0
M 1023 Byte 1 = Datenlänge
M 1023 Byte 2-12 Ergebnis