Datalogic | DS6500-100-012 | PROFIBUS Fam6K

November 2005
PROFIBUS FAM6K
Table of Contents
1.
OVERVIEW ................................................................................................................................................3
1.1
1.2
2.
DESCRIPTION ............................................................................................................................................3
PROFIBUS-DP ..........................................................................................................................................4
BUS COMMUNICATION............................................................................................................................5
2.1
DATA EXCHANGE ......................................................................................................................................5
2.2
GENIUS™ SETTINGS ..................................................................................................................................6
2.2.1
Bus Communication Parameters....................................................................................................6
2.3
DATALOGIC FLOW CONTROL MODE (FCM).................................................................................................8
2.3.1
Flow Control drivers......................................................................................................................10
2.3.2
FCM with DAD Driver ...................................................................................................................11
2.3.2.1
2.3.2.2
2.3.2.3
2.3.2.4
2.3.2.5
2.3.2.6
2.3.2.7
2.3.2.8
2.3.2.9
2.3.3
2.3.3.1
Control Field............................................................................................................................................ 12
SAP Field ................................................................................................................................................ 13
Length Field ............................................................................................................................................ 13
Data Transmission from DS6X00 to PLC................................................................................................ 14
Data Transmission from PLC to DS6X00................................................................................................ 17
Resynchronisation................................................................................................................................... 18
Fragmentation and Reassembling .......................................................................................................... 20
SAP Services .......................................................................................................................................... 22
DAD internal queues ............................................................................................................................... 22
FCM with DPD Driver ...................................................................................................................23
Control Field............................................................................................................................................ 24
2.4
DATA CONSISTENCY................................................................................................................................25
2.4.1
Data Consistency with DAD Driver...............................................................................................25
2.4.2
Data Consistency with DPD Driver...............................................................................................27
3.
DIGITAL I/O CONDITIONING..................................................................................................................28
3.1
DIGITAL INPUT CONDITIONING ..................................................................................................................29
3.1.1
Phase Echo ..................................................................................................................................30
3.2
DIGITAL OUTPUT CONDITIONING ..............................................................................................................31
3.2.1
Phase Trigger ...............................................................................................................................31
3.3
READING PHASE VIA PROFIBUS ................................................................................................................32
4.
NETWORK CONFIGURATION................................................................................................................33
4.1
GSD FILE ...............................................................................................................................................33
4.2
GSD INSTALLATION ................................................................................................................................34
4.3
SCANNER PROGRAMMING VIA GSD FILE ..................................................................................................36
4.3.1
Project Modules ............................................................................................................................36
5.
EXAMPLE APPLICATION.......................................................................................................................41
5.1
INSTALLING THE SCANNER TO THE NETWORK ...........................................................................................42
5.2
LOADING THE DEMO APPLICATION PROGRAM ...........................................................................................42
5.3
NETWORK CONFIGURATION DESCRIPTION ................................................................................................45
5.3.1
Block Descriptions ........................................................................................................................47
5.4
EXAMPLE OF DATA EXCHANGE ................................................................................................................50
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 2 of 2
1. Overview
1.1 Description
Profibus is the world’s most popular FieldBus.
Profibus is the most widely accepted international networking standard. Nearly universal in
Europe and also popular in North America, South America and parts of Africa and Asia. Profibus
can handle large amounts of data at high speed and serve the needs of the majority of automation
applications.
Profibus was created under German Government leadership in co-operation with automation
manufacturers (Siemens) in 1989. Today it is commonly found in Process Control, large assembly
and material handling machines. Just a single-cable which is able to wire multi-input sensor blocks,
pneumatic valves, complex intelligent devices, smaller sub-networks, operator interfaces and many
other devices.
The ISO/OSI reference model describes communications between the stations of a
communication system: if a communication system does not require some specific functions, the
corresponding layers have no purpose and are bypassed. Profibus uses layers 1, 2 and 7.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 3 of 3
1.2 Profibus-DP
Basically Profibus is available in different versions:
• Profibus-DP (Decentralized Periphery)
Multiple masters are possible with Profibus-DP, in which case each slave device is
assigned to one master. This means that multiple masters can read inputs from the device
but only one master can write outputs to that device.
• Profibus-FMS
It is a peer to peer messaging format, which allows masters to communicate with one
another. Just as in Profibus-DP, up to 126 nodes are available and all can be masters if
desired. FMS messages consume more overhead than DP messages.
• Profibus-PA
PA protocol is the same as the latest Profibus-DP except that voltage and current levels are
reduced to meet the requirements of intrinsic safety (Class I div. II) for the process industry.
Datalogic supports Profibus-DP only, since this version has been specifically designed for
factory automation. System version must be of this type.
Main features:
• Maximum Number of Nodes: 126
• Distance: 100m to 24 Km (with repeaters and fibre optic transmission)
• Baud rate: 9600 to 12M bps
• Messaging formats: Polling, Peer-to-Peer
From here on we will refer to Profibus-DP only.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 4 of 4
2. Bus Communication
2.1 Data Exchange
Master Profibus is usually a PLC (Siemens S7 or others). Sometimes it could be a PC-based
device as well.
DS6X00-10X-012 device is always Slave in the Profibus network.
Basically two shared memory areas (Exchange Areas) exist between SLAVE and MASTER so
both devices provide information to each other. Exchange areas are physically placed on the
DS6X00 Profibus card.
Read
Write
INPUT
AREA
Master
Slave
OUTPUT
AREA
PLC
Write
DS6X00
Read
Exchange Areas
Input and output areas always refer to the Master: this means that the scanner writes to the
Input buffer and the PLC writes to the Output buffer.
Dimensions of exchange areas can be set to different values by the PLC through the GSD file:
the built-in Profibus models DS6300 / DS6400 / DS6500 allow up to 120 bytes for the Input Area
and 32 bytes for the Output Area.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 5 of 5
2.2 Genius™ Settings
The Genius™ SW Configuration Tool allows complete parameterisation of Profibus
communication.
In order to enable Profibus connectivity, the Data Tx parameter must be selected first (as
default):
2.2.1 Bus Communication Parameters
The Slave is identified over the Profibus network by setting its own address (Node Address
parameter). This value, which is unique for each slave, should match the address specified while
configuring your network, so that the PLC is able to detect the Slave properly.
Data Flow Control enables a powerful way to manage and optimise communication with the
Profibus Master. A dedicated program running on the PLC is required to take advantage of this
feature (see details in the "Datalogic Flow Control Mode (FCM)" paragraph).
Final implementation should make use of Datalogic Flow Control to obtain maximum
reliability and optimal synchronisation between Master and Slave. As a first approach, Data
Flow Control = Disable is the suggested way to check the HW/SW configuration of the Profibus
network.
Within the Bus Communication section Baud Rate, Master Input Area Size and Master Output
Data Size are read only, as these parameters are decided by the Profibus Master.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 6 of 6
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 7 of 7
2.3 Datalogic Flow Control Mode (FCM)
The Datalogic Flow Control Mode is a powerful way to manage and optimise the
communication with the Profibus Master. By enabling the FCM a few bytes of the exchange areas
are reserved for driver operations and the rest are used by the application layer.
The reserved bytes are used to implement many different features such as:
• Flow-control and corresponding buffering in both directions
• Fragmentation and reassembling of data longer than the exchange area sizes
• Synchronisation of flow control numbers
• Service Access Point oriented communication
• Length information
Note: If the Datalogic Flow Control is disabled, all the bytes of the exchange areas are used by
the application layer. The input area is updated whenever a new reading event has to be
transferred to the Master station.
In this situation, the Master must read the input area before it changes due to a new
message, typically new barcode occurrence.
Moreover, two occurrences of the same barcode cannot be understood, since the input
area does not change.
In addition, if application data is longer than input area sizes, data is automatically
truncated.
FCM can be selected by means of the Data Flow Control parameter.
Basically three options are available:
DAD Driver
FCM compatible with "Flow Control = Anybus" used in new Datalogic
devices
DPD Driver
FCM compatible with "Flow Control = Profibus" used in MX4000-1100
Disable
No Datalogic Flow Control
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 8 of 8
Although both drivers implement the same above features, two options are currently available
to obtain the maximum compatibility towards different Datalogic family devices.
See the cross reference table below about supported FCM:
6K Family
DS6300-100-011
DS6300-105-011
DS6400-100-011
DS6400-105-011
DS6500-100-011
DS6500-200-011
DS6500-105-011
DS6500-205-011
CBOX Family
CBOX-300 Profibus-DP
CBOX-310 Profibus-DP with Display
MX Family
MX4000-1100
MX4000-1100 SB2498 12MB/s
Article Number
931351020
931351070
931351095
931351105
931401004
931401005
931401014
931401015
Article Number
93A301000
93A301030
DAD Driver
X
X
X
X
X
X
X
X
DAD Driver
X
X
935151010
935151040
X
DPD Driver
X
X
X
X
X
X
X
X
DPD Driver
X
X
X
When FCM is utilised, the Data Consistency option can be enabled to improve the overall
safety in data communication. This option is mandatory if Master Input Area size exceeds 32 bytes.
See details in the next paragraphs.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 9 of 9
2.3.1 Flow Control drivers
The Flow Control driver is a layer that is built upon the intrinsic DP data exchange mechanism.
Basically such a layer is required because the intrinsic DP Profibus mechanism is not message
oriented.
In the following figure the complete Stack is represented:
PLC
(Master)
DS6X00
(Slave)
Application Program
Application Program
DAD (or DPD) Layer
DAD (or DPD) Layer
Profibus DP
Profibus DP
Profibus FDL
Profibus FDL
RS485
RS485
Two Flow Control drivers are available:
DAD Driver
Compatible with Flow Control = Anybus
DPD Driver
Compatible with Flow Control = Profibus
As described previously, they can be selected separately on DS6X00 by means of the
Genius™ configuration tool. Obviously, the corresponding driver must be implemented on the PLC
side.
The DAD driver should be the preferred solution for brand new installations.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 10 of 10
2.3.2 FCM with DAD Driver
In order to implement the flow controlled version
of the driver, exchange areas must be congruently
compiled in both directions.
Read
Write
INPUT
AREA
Master
Slave
OUTPUT
AREA
PLC
Write
DS6X00
Read
Exchange Areas
From now on we refer to the Input Area as a buffer made up of InputAreaSize bytes:
IN[0]
IN[1]
IN[2]
…
IN[InputAreaSize - 1]
and to the Output Area as a buffer made up of OutputAreaSize bytes:
OUT[0]
OUT[1]
OUT[2]
…
OUT[OutputAreaSize - 1]
Only the first three bytes are used by the DAD Driver layer in both buffers:
Control Field
(byte 0)
used to issue and control the driver primitives such as flowcontrol, fragmentation and resynchronisation.
Service Access Point Field
(byte 1)
used to distinguish among different services and to provide
future expandability. (Since this SAP definition is introduced by
the DAD Driver, it must not be confused with the SAP that is
defined by the international standard).
Length Field
(byte 2)
contains the number of bytes used by the application layer:
Length Field ≤ (InputAreaSize – 3) for the Input Area
Length Field ≤ (OutputAreaSize – 3) for the Output Area.
Exchange Input/Output Area buffer
0
1
2
3
…
…
N
Application Data
byte 2 = Length Field
byte 1 = SAP Field
byte 0 = Control Field
The Application Data buffer holds useful information, typically the barcode messages,
processed by the application program. IN[3] contains the first significant byte of the Application
Data buffer (the same first byte you would see if DS6X00 transmitted the barcode buffer onto the
Auxiliary port instead of the Profibus interface).
The structure of the application buffer and its length strictly depend on the selected data format
on the DS6X00. Barcode messages longer than (InputAreaSize – 3) will be split in pieces through
an automatic fragmentation process (see details in the "Fragmentation and Reassembling"
paragraph).
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 11 of 11
2.3.2.1
Control Field
This is the core of the flow controlled communication.
The Input Area structure reserves bit 0 and bit 1 of IN[0] for handshake purposes while the
Output Area structure, which is symmetrical, reserves bit 0 and 1 of OUT[0].
At any time the Master station can make a resynchronization request by means of bit 2 of the
Output Area. This process, which resets the synchronization numbers (bit 0 and bit 1 of both Input
and Output areas), has to be acknowledged by the Slave on bit 2 of the Input Area.
Bit 3 is used to control a fragmentation sequence in both directions.
Control Field byte of Input Area
1
0
0
IN[0]
0
Bit 0 = TxBufferFull
Bit 1 = RxBufferEmpty
Bit 2 = Resync Acknowledge
Bit 3 = More Bit
IN[0].bit0
IN[0].bit1
IN[0].bit2
TxBufferFull toggles when Slave has made available new Input Area data
RxBufferEmpty toggles when Output Area data has been read by Slave
Resync Acknowledge set to 1 as an acknowledge to a resync request. With
this bit, the master can detect a slave is on line.
More Bit is 1 when this is not the last piece of a fragmentation sequence while
it is 0 when this is the last piece
Set to 0, 0, 0, 1 when DAD messaging protocol is used
IN[0].bit3
IN[0].bit4,5,6,7
Control Field byte of Output Area
1
0
0
OUT[0]
0
Bit 0 = TxBufferEmpty
Bit 1 = RxBufferFull
Bit 2 = Resync Request
Bit 3 = More Bit
OUT[0].bit0
OUT[0].bit1
OUT[0].bit2
OUT[0].bit3
OUT[0].bit4,5,6,7
TxBufferEmpty must toggle when Input Area data has been read by Master
RxBufferFull must toggle when Master makes available new Output Area
data
Resync Request set to 1 for one second to resynchronize the slave. After
resynchronization, all 4 handshake bits are set to 0
More Bit must be 1 when this is not the last piece of a fragmentation
sequence and it must be 0 when this is the last
Set to 0, 0, 0, 1 when DAD messaging protocol is used
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 12 of 12
2.3.2.2
SAP Field
SAP (Service Access Point) is an identifier that is used to implement multiple services sharing
the same communication channel between two remote stations.
The following values have been defined:
SAP = 0
Used to transfer information messages between DS6X00 and PLC
SAP = 255 Reserved for driver services (see details in the "SAP Services” paragraph)
All other SAP values are free and they could be used by dedicated application programs after
agreement between the application programs themselves.
2.3.2.3
Length Field
The Application layer uses all or a part of the remaining bytes of the Exchange Area buffers
that are not used by the DAD Driver. The Length Field is introduced to keep the information of how
many bytes are really used by the Application Layer.
A fragment that is not the last one of a fragmentation sequence must fill this field with
[InputAreaSize – 3] (or [OutputAreaSize - 3]), depending on whether it is an Input/Output fragment.
Otherwise this field gets a value that is less than or equal to [InputAreaSize – 3].
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 13 of 13
2.3.2.4
Data Transmission from DS6X00 to PLC
This paragraph describes how it is possible to exchange messages with flow control. The
communication mechanism is simple:
IN[0].bit0 [ A ] is used by DS6X00 to notify that “Slave has written a new data so
Master can read it”
OUT[0].bit0 [ B ] must be used by PLC to notify that “Master has read last data so
Slave can send next message”
This happens each time bit A (or B) changes its state (toggles). Bit level doesn’t matter, only
the transition has to be considered.
Input Area
0
A
1
“I’ve written new data”
2
3
…
PLC
InputAreaSize - 1
Output Area
0
DS6X00
B
1
“I’ve read present data”
2
3
…
OuputAreaSize - 1
The following state machine shows data transmission from Slave to Master. Please note that
each cycle transfers two data messages.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 14 of 14
A indicates IN[0].bit0 [ TxBufferFull ]
B indicates OUT[0].bit0 [ TxBufferEmpty ]
A=0 B=0
Init state after power up
α
Master reads data2
then gives acknowledge
Slave writes data1 then
gives notification
A=0 B=1
A=1 B=0
δ
β
Slave writes data2 then
gives notification
A=1 B=1
Master reads data1 then
gives acknowledge
γ
Let’s analyse a typical data exchange based on the following settings:
Flow Control = DAD Driver
Input Area Size = 16
Output Area Size = 8
After power up Input and Output areas are generally filled by zero. According to DAD driver
implementation, Input area has Control Field = 80Hex and SAP = 00Hex.
Input
Area
Output
Area
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
Also PLC must set the Control Field of Output area properly, as long as DAD messaging
protocol is utilised.
Input
Area
Output
Area
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
DS6X00 reads a barcode “123456”. Let’s assume standard data formatting with <STX> as
header and <CR><LF> as terminators. DS6X00 toggles bit A.
Input
Area
Output
Area
81Hex 00Hex 09Hex 02Hex 31Hex 32Hex 33Hex 34Hex 35Hex 36Hex 0DHex 0AHex 00Hex 00Hex 00Hex 00Hex
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
PLC detects transition of bit A so now it can read incoming data (it copies 9 bytes in its
memory from IN[3] on) then toggles bit B as acknowledge.
Note: before the acknowledge, all further barcodes read by DS6X00 are buffered.
Input
Area
Output
Area
81Hex 00Hex 09Hex 02Hex 31Hex 32Hex 33Hex 34Hex 35Hex 36Hex 0DHex 0AHex 00Hex 00Hex 00Hex 00Hex
81Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
DS6X00 reads a barcode “10DL” and toggles bit A.
Input
Area
Output
Area
80Hex 00Hex 07Hex 02Hex 31Hex 30Hex 44Hex 4CHex 0DHex 0AHex 00Hex 00Hex 00Hex 00Hex 00Hex
00Hex
81Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 15 of 15
PLC reads new data message (it copies 7 bytes in its memory from IN[3] on) then toggles bit B
as acknowledge.
Input
Area
Output
Area
80Hex 00Hex 07Hex 02Hex 31Hex 30Hex 44Hex 4CHex 0DHex 0AHex 00Hex 00Hex 00Hex 00Hex 00Hex
00Hex
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
DS6X00 performs No Read and toggles bit A. Let’s assume <CAN> as Global No Read
character.
Input
Area
Output
Area
81Hex 00Hex 04Hex 02Hex 18Hex 0DHex 0AHex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
PLC reads new data message (it copies 4 bytes in its memory from IN[3] on) then toggles bit B
as acknowledge.
Input
Area
Output
Area
81Hex 00Hex 04Hex 02Hex 18Hex 0DHex 0AHex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
81Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
Data exchange continues…
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 16 of 16
2.3.2.5
Data Transmission from PLC to DS6X00
Analogous to the previous paragraph, flow control works even when data are coming from the
Master towards the Slave. The communication mechanism is based on the same concepts:
OUT[0].bit1 [ C ] must be used by PLC to notify that “Master has written new data
so Slave can read it”
IN[0].bit1 [ D ] is used by DS6X00 to notify that “Slave has read data so Master can
send next message”
This happens each time bit C (or D) changes its state (toggles). Bit level doesn’t matter, only
the transition has to be considered.
Input Area
0
D
1
“I’ve read present data”
2
3
…
PLC
InputAreaSize - 1
Output Area
0
DS6X00
C
1
2
3
“I’ve written new data”
…
OuputAreaSize - 1
The following state machine shows data transmission from Master to Slave. Please note that
each cycle transfers two data messages.
C indicates OUT[0].bit1 [ RxBufferFull ]
D indicates IN[0].bit1 [ RxBufferEmpty ]
C=0 D=0
Init state after power up
α
Slave reads data2 then
gives acknowledge
Master writes data1
then gives notification
C=0 D=1
C=1 D=0
δ
β
Master writes data2
then gives notification
C=1 D=1
Slave reads data1 then
gives acknowledge
γ
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 17 of 17
2.3.2.6
Resynchronisation
The resynchronisation process restarts the messaging protocol from a predefined state.
It may be used either at the Master startup to detect if the Slave is on line or during normal
operations in case of errors requiring a protocol reset procedure.
The process is based on bit two:
OUT[0].bit2 [ E ] must be used by PLC to request the Resynchronisation
IN[0].bit2 [ F ] is used by DS6X00 to acknowledge the request
Input Area
0
F
1
“Let’s do it”
2
3
…
InputAreaSize - 1
PLC
Output Area
0
DS6X00
E
1
2
3
“Let’s Resynchronise”
…
OuputAreaSize - 1
The following state machine shows the resynchronisation cycle, requested by the PLC and
performed together with DS6X00:
E indicates OUT[0].bit2 [ Sync Request ]
F indicates IN[0].bit2 [Sync Acknowledge ]
E=0 F=X
E=1 F=X
α
Correct data
exchange
Error
β
UNSYNCHRONIZED
Sync request
begin
Sync acknowledge
begin
E=0 F=1
E=0 F=0
Init state after power up
ε
Sync acknowledge
end
δ
E=1 F=1
Sync request
end
γ
SYNCHRONIZED
OUT[0].bit0, OUT[0].bit1 reset
by PLC
IN[0].bit0, IN[0].bit1 reset
by DS6X00
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 18 of 18
Let’s analyse the resynchronisation process, starting from the previous data exchange
discussed in “Data Transmission from DS6X00 to PLC”…
Input
Area
Output
Area
81Hex 00Hex 04Hex 02Hex 18Hex 0DHex 0AHex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
81Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
PLC requests resynchonisation by setting bit E = 1.
Input
Area
Output
Area
81Hex 00Hex 04Hex 02Hex 18Hex 0DHex 0AHex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
85Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
DS6X00 detects the request and so it resets IN[0].bit0 and IN[0].bit1. Then it gives an
acknowledge back to the PLC by means of bit F.
Input
Area
Output
Area
84Hex 00Hex 04Hex 02Hex 18Hex 0DHex 0AHex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
85Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
PLC has to reset OUT[0].bit0 and OUT[0].bit1 before completing its request with bit E = 0.
Input
Area
Output
Area
84Hex 00Hex 04Hex 02Hex 18Hex 0DHex 0AHex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
DS6X00 completes the acknowledge process by setting bit F = 0.
Input
Area
Output
Area
80Hex 00Hex 04Hex 02Hex 18Hex 0DHex 0AHex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
Now Flow Control has been returned to a predefined state. All data exchange bits in the
Control Field are surely zero and data transmission can proceed safely.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 19 of 19
2.3.2.7
Fragmentation and Reassembling
The fragmentation process is activated whenever Application Data cannot be contained in the
related exchange area. Basically long messages are split into pieces which are transmitted
separately. Reassembling allows the reconstruction of the whole messages.
DS6X00 already implements these functions in the DAD layer, while the PLC needs a
congruent management.
The fragmentation is based on the More Bit (bit 3) in the Control Field byte.
More Bit = 0 indicates that all the information is included within the current message. When
Application Data is longer than (exchange area size – 3), the first partial message is transmitted
having More Bit = 1. Following fragments keep More Bit = 1 and only the last piece will have More
Bit = 0 again. Thanks to this mechanism, the receiver station may detect the last piece and so
reassemble the entire information.
Some notes:
DS6X00 can manage application messages up to 256 bytes
Intermediate fragments have Length Field = (exchange area size – 3)
Last fragment has Length Field ≤ (exchange area size – 3)
Bit0 and bit1 of both Input and Output areas are independently managed for any fragment
The following figures show how the Control Byte changes according to the fragmentation
process. Both data flow directions are considered.
Slave sends fragmented data packets, Master receives and gives acknowledge:
OUT[0]
80Hex
80Hex
80Hex
IN[0]
81Hex
89Hex
Time
80Hex
81Hex
88Hex
Ack
piece 1
piece 1
(first)
81Hex
Ack
piece 2
piece 2
Ack
piece 3
piece 3
(last)
Master sends fragmented data packets, Slave receives and gives acknowledge:
OUT[0]
80Hex
IN[0]
Time
8AHex
80Hex
88Hex
82Hex
piece 1
(first)
82Hex
80Hex
piece 2
Ack
piece 1
82Hex
piece 3
(last)
Ack
piece 2
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Ack
piece 3
Page 20 of 20
Let’s analyse a fragmented data exchange based on the following settings:
Flow Control = DAD Driver
Input Area Size = 16
Output Area Size = 8
After power up Input and Output areas are generally filled by zero. According to DAD driver
implementation, Input area has Control Field = 80Hex and SAP = 00Hex.
Input
Area
Output
Area
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
Also PLC must set the Control Field of Output area properly, as long as DAD messaging
protocol is utilised.
Input
Area
Output
Area
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
DS6X00 reads a barcode with content “1234567890abcde1234567890abcde”. Let’s assume
standard data formatting with <STX> as header and <CR><LF> as terminators. In this
condition since the whole message cannot be included in Input Area, DS6X00 transmits first
fragment "<STX>1234567890ab" only (setting More Bit = 1) then it toggles bit A.
Input
Area
Output
Area
89Hex 00Hex 0DHex 02Hex 31Hex 32Hex 33Hex 34Hex 35Hex 36Hex 37Hex 38Hex 39Hex 30Hex 61Hex 62Hex
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
PLC detects transition of bit A so now it can read first incoming fragment (it copies 13 bytes in
its memory from IN[3] on) then toggles bit B as acknowledge.
Input
Area
Output
Area
89Hex 00Hex 0DHex 02Hex 31Hex 32Hex 33Hex 34Hex 35Hex 36Hex 37Hex 38Hex 39Hex 30Hex 61Hex 62Hex
81Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
DS6X00 detects transition of bit B so it sends second fragment "cde1234567890“ (still More
Bit = 1) and toggles bit A.
Input
Area
Output
Area
88Hex 00Hex 0DHex 63Hex 64Hex 65Hex 31Hex 32Hex 33Hex 34Hex 35Hex 36Hex 37Hex 38Hex 39Hex 30Hex
81Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
PLC reads second fragment (it copies 13 bytes in its memory from IN[3] on) then toggles bit B
as acknowledge.
Input
Area
Output
Area
88Hex 00Hex 0DHex 63Hex 64Hex 65Hex 31Hex 32Hex 33Hex 34Hex 35Hex 36Hex 37Hex 38Hex 39Hex 30Hex
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
DS6X00 sends third (last) fragment "abcde<CR><LF>“ (finally More Bit = 0) and toggles bit A.
Input
Area
Output
Area
81Hex 00Hex 07Hex 61Hex 62Hex 63Hex 64Hex 65Hex 0DHex 0AHex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
PLC reads last fragment (it copies 7 bytes in its memory from IN[3] on) and now the
reassembling can be completed. Then it toggles bit B as acknowledge.
Input
Area
Output
Area
81Hex 00Hex 07Hex 61Hex 62Hex 63Hex 64Hex 65Hex 0DHex 0AHex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
81Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
Whole message has been completely transmitted.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 21 of 21
2.3.2.8
SAP Services
FLUSH QUEUE is the unique driver service currently available. It performs flushing of the
internal queues and may be issued at any time.
FLUSH QUEUE Service
Request:
Action:
Response:
Flush data buffers
(issued by the Master station to DS6X00)
Flush all information from previous decoding phases
Command accepted / Command rejected (generated by DS6X00 toward Master)
Application data areas must be formatted as follows:
Request Command
Flush data buffer
byte 3
'[' (5B Hex)
byte 4
'F'(46 Hex)
Command accepted
Command rejected
byte 3
'A' (41 Hex)
'C' (43 Hex)
byte 4
' '(20 Hex)
' '(20 Hex)
Response Command
2.3.2.9
DAD internal queues
DS6X00-10X-012 has two internal queues (one for each direction) to keep the application
events: input queue and output queue.
The input queue is used when a new message (generally a barcode) has to be transmitted by
D6X000 before the Master station has generated all the acknowledge handshakes for each
previous transmission.
The output queue is rarely used at the moment.
The queues are sized in the following way:
50 elements of 120 bytes each for input queue (data flow from Slave to Master)
26 elements of 32 bytes each for output queue (data flow from the Master to Slave)
The queues may be flushed by the Master station through the SAP=255 primitive. This is
generally done at the Master startup if the Master station wants to cancel all the previous buffers
that were generated before its startup. However, the Master station is free to decide not to cancel
them.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 22 of 22
2.3.3 FCM with DPD Driver
In order to implement the flow controlled version
of the driver, exchange areas must be congruently
compiled in both directions.
Read
Write
INPUT
AREA
Master
Slave
OUTPUT
AREA
PLC
Write
DS6X00
Read
Exchange Areas
This driver supports all the features listed in the “FCM with DAD Driver” paragraph and
implements all the handshake mechanisms previously discussed.
Differently from DAD Driver, DPD implement the further Profibus Station Address Field and
Control Field must have bit7 set to zero (see par. 2.3.3.1).
The first four bytes are used by the DPD Driver layer in both buffers as follows:
used to issue and control the DPD Driver primitives such as
flow-control, fragmentation and resynchronisation.
Control Field
(byte 0)
Profibus Station Address Field contains the information of the selected DS6X00 address of
the Profibus network.
(byte 1)
Service Access Point Field
(byte 2)
used to distinguish among different services and to provide
future expandability. (Since this SAP definition is introduced
by the DPD Driver, it must not be confused with the SAP that
is defined by the international standard).
Length Field
(byte 3)
contains the number of bytes used by the application layer:
Length Field ≤ (InputAreaSize – 4) for the Input Area
Length Field ≤ (OutputAreaSize – 4) for the Output Area.
Exchange Input/Output Area buffer
0
1
2
3
4
…
…
N
Application Data
byte 3 = Length Field
byte 2 = SAP Field
byte 1 = Profibus Station Address Field
byte 0 = Control Field
The Application Data buffer holds the information starting from byte IN[4] and the fragmentation
process is managed by DS6X00 when barcode messages are longer than (InputAreaSize – 4).
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 23 of 23
2.3.3.1
Control Field
Differently from DAD Driver, just note that Control Field must have bit7 set to zero.
Control Field byte of Input Area
0
0
0
IN[0]
0
Bit 0 = TxBufferFull
Bit 1 = RxBufferEmpty
Bit 2 = Resync Acknowledge
Bit 3 = More Bit
IN[0].bit0
IN[0].bit1
IN[0].bit2
TxBufferFull toggles when Slave has made available new Input Area data
RxBufferEmpty toggles when Output Area data has been read by Slave
Resync Acknowledge set to 1 as an acknowledge to a resync request. With
this bit, the master can detect a slave is on line.
More Bit is 1 when this is not the last piece of a fragmentation sequence while
it is 0 when this is the last piece
Set to 0, 0, 0, 0 when DPD messaging protocol is used
IN[0].bit3
IN[0].bit4,5,6,7
Control Field byte of Output Area
0
0
0
OUT[0]
0
Bit 0 = TxBufferEmpty
Bit 1 = RxBufferFull
Bit 2 = Resync Request
Bit 3 = More Bit
OUT[0].bit0
OUT[0].bit1
OUT[0].bit2
OUT[0].bit3
OUT[0].bit4,5,6,7
TxBufferEmpty must toggle when Input Area data has been read by Master
RxBufferFull must toggle when Master makes available new Output Area
data
Resync Request set to 1 for one second to resynchronize the slave. After
resynchronization, all 4 handshake bits are set to 0
More Bit must be 1 when this is not the last piece of a fragmentation
sequence and it must be 0 when this is the last
Set to 0, 0, 0, 0 when DPD messaging protocol is used
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 24 of 24
2.4 Data Consistency
When Flow Control (either DAD or DPD Driver) is used, the Data Consistency option is
available.
If enabled, the driver implements a specific mechanism to guarantee consistency of both
transmitted and received data over the entire size of the exchange area.
2.4.1 Data Consistency with DAD Driver
As shown in the following figure, the application layer copies the Control Field byte in the last
position of the exchange area. In this way, as the Control Field changes from message to
message, the whole message is consistent as long as the first and last bytes are matching.
Exchange Input/Output Area buffer
0
1
2
3
N
…
Application Data
Length Field
SAP Field
Control Field
…copy…
From the practical point of view, a complete message in the Input area could be considered
consistent as soon as the PLC verifies that IN[0] is equal to IN[InputAreaSize - 1].
The PLC should take care to double OUT[0] in OUT[OutputAreaSize - 1] to let the driver check
the consistency.
Due to the new byte used by the DAD driver, barcode messages longer than (InputAreaSize –
4) will be split into pieces through an automatic fragmentation process.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 25 of 25
Let’s analyse a fragmented and consistent data exchange based on:
Flow Control = DAD Driver
Data Consistency = Enable
Input Area Size = 16
Output Area Size = 8
After power up Input and Output areas are generally filled by zero. According to DAD driver
implementation, Input area has Control Field = IN[0] = IN[15] = 80Hex and SAP = 00Hex.
Input
Area
Output
Area
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 80Hex
00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex
PLC must set Control Field = OUT[0] = OUT[7] = 80Hex according to DAD messaging protocol
with Data Consistency.
Input
Area
Output
Area
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 80Hex
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 80Hex
DS6X00 reads a barcode with content “1234567890abcde1234567890abcde”. Let’s assume
standard data formatting with <STX> as header and <CR><LF> as terminators. DS6X00
transmits first fragment "<STX>1234567890a" only (setting More Bit = 1) then it toggles bit A.
Input
Area
Output
Area
89Hex 00Hex 0CHex 02Hex 31Hex 32Hex 33Hex 34Hex 35Hex 36Hex 37Hex 38Hex 39Hex 30Hex 61Hex 89Hex
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 80Hex
PLC detects transition of bit A so now it can read first incoming fragment (it copies 12 bytes in
its memory from IN[3] on) then toggles bit B as acknowledge.
Input
Area
Output
Area
89Hex 00Hex 0CHex 02Hex 31Hex 32Hex 33Hex 34Hex 35Hex 36Hex 37Hex 38Hex 39Hex 30Hex 61Hex 89Hex
81Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 81Hex
DS6X00 detects transition of bit B so it sends second fragment "bcde12345678“ (still More Bit
= 1) and toggles bit A.
Input
Area
Output
Area
88Hex 00Hex 0CHex 62Hex 63Hex 64Hex 65Hex 31Hex 32Hex 33Hex 34Hex 35Hex 36Hex 37Hex 38Hex 88Hex
81Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 81Hex
PLC reads second fragment (it copies 12 bytes in its memory from IN[3] on) then toggles bit B
as acknowledge.
Input
Area
Output
Area
88Hex 00Hex 0CHex 62Hex 63Hex 64Hex 65Hex 31Hex 32Hex 33Hex 34Hex 35Hex 36Hex 37Hex 38Hex 88Hex
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 80Hex
DS6X00 sends last fragment "90abcde<CR><LF>“ (finally More Bit = 0) and toggles bit A.
Input
Area
Output
Area
81Hex 00Hex 09Hex 39Hex 30Hex 61Hex 62Hex 63Hex 64Hex 65Hex 0DHex 0AHex 00Hex 00Hex 00Hex 81Hex
80Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 80Hex
PLC reads last fragment (it copies 9 bytes in its memory from IN[3] on) and now the
reassembling can be completed. Then it toggles bit B as acknowledge.
Input
Area
Output
Area
81Hex 00Hex 09Hex 39Hex 30Hex 61Hex 62Hex 63Hex 64Hex 65Hex 0DHex 0AHex 00Hex 00Hex 00Hex 81Hex
81Hex 00Hex 00Hex 00Hex 00Hex 00Hex 00Hex 81Hex
Whole message has been completely transmitted.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 26 of 26
2.4.2 Data Consistency with DPD Driver
Here the application layer still copies the Control Field byte in the last position of the exchange
area. Data exchange structure appears slightly different, as shown in following picture:
Exchange Input/Output Area buffer
0
1
2
3
4
…
N
Application Data
Length Field
SAP Field
Profibus Address Station Field
…copy…
Control Field
If the DPD driver is used, barcode messages longer than (InputAreaSize – 5) will be split into
pieces through an automatic fragmentation process.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 27 of 27
3. Digital I/O Conditioning
This function offers the possibility to use the scanner I/O as remote peripherals of the Host:
Digital Output Conditioning allows the PLC to force the level of the three physical
DS6X00 outputs
Digital Input Conditioning allows the DS6X00 to notify the status of its four physical
inputs to the PLC
Some of the provided benefits are:
Profibus Master knows the status of each single scanner input, i.e a parcel is coming, an
oversized piece of baggage has been detected or a piece of baggage has reached the data
Tx line and so on…
Profibus Master is able to force the scanner in reading mode
Profibus Master is able to modify the scanner outputs status depending on the received
barcode message (sorting application)
No dedicated sw on the scanner is necessary to manage its I/Os.
DS6X00 digital I/O conditioning is activated whenever one of the below parameters is checked:
DS6X00 digital I/Os are thus mapped over the first byte of both Input and Output exchange
areas, as depicted in the next paragraphs.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 28 of 28
3.1 Digital Input Conditioning
Note: The I/O Conditioning function works independently from the Flow Control options.
Without any Flow Control driver, the following Input mapping is available:
Exchange Input Area buffer
0
1
…
N
Application Data
Digital Input Status Field
0
0
0
IN[0].bit0 = Input #1
IN[0].bit1 = Input #2
IN[0].bit2 = Input #3
IN[0].bit3 = Input #4
IN[0].bit7 = Phase Echo
With Flow Control drivers, the Input area structure is as follows:
Digital Input Conditioning with DAD driver buffer
0
1
2
3
4
…
Digital Input Conditioning with DPD driver buffer
N
0
1
2
3
4
5
…
N
Application Data
Application Data
DAD Reserved Fields
Digital Input Status Field
DPD Reserved Fields
Digital Input Status Field
The Digital Input Status Field is continuously updated by the DS6X00 according to the status of
the physical inputs of the scanner. Only the selected inputs are mirrored, like Input#1 and Input#3
in the figure below:
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 29 of 29
3.1.1 Phase Echo
The Phase Echo bit indicates the status of the reading phase remotely activated on the
DS6X00.
This function allows the Master to obtain feedback about the current reading activation via the
Profibus network.
The Phase Echo parameter can be enabled once the Start Input From Bus parameter is
selected. See details in the “Reading Phase via Profibus” paragraph.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 30 of 30
3.2 Digital Output Conditioning
Note: The I/O Conditioning function works independently from the Flow Control options.
Without any Flow Control driver, the following Output mapping is available:
Exchange Output Area buffer
0
1
2
3
4
…
N
Application Data
DAD Reserved Fields
Digital Output Status Field
0
0
0
0
OUT[0].bit0 = Output #1
OUT[0].bit1 = Output #2
OUT[0].bit2 = Output #3
OUT[0].bit7 = Phase Trigger
With Flow Control drivers, the Output area structure is as follows:
Digital Output Conditioning with DPD driver buffer
Digital Output Conditioning with DAD driver buffer
0
1
2
3
4
…
N
0
1
2
3
4
5
…
N
Application Data
Application Data
DAD Reserved Fields
Digital Output Status Field
DPD Reserved Fields
Digital Output Status Field
The Digital Output Status Field can be set by the PLC at any time, then the DS6X00 physical
outputs will change accordingly. Only the selected outputs are thus controlled.
3.2.1 Phase Trigger
The Phase Trigger bit is used by the Master to force the reading phase of the scanner. Reading
activation is provided through the Profibus network so there is no need of external photocells or I/0
signals.
Phase Trigger is active once the Start Input From Bus parameter is selected. See details in the
“Reading Phase via Profibus” paragraph.
Note: an alternative way to open and close each reading phase via Profibus is letting the
DS6X00 operate in Serial On Line mode and then send the user programmable Serial Start String
and Serial Stop String through the PLC.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 31 of 31
3.3 Reading Phase via Profibus
This implementation requires few steps:
1)
Connect the scanner with the Genius™ configuration tool
2)
Check the Start Input from Bus parameter in the Operating Modes folder so the scanner
understands that the phase trigger is going to be provided via Profibus
3)
Send the modified configuration to the DS6X00 permanent memory (Eeprom)
Now the reading phase of the scanner is controlled as follows:
•
Reading phase starts as soon as the Master sets OUT[0].bit7
•
Reading phase stops as soon as the Master clears OUT[0].bit7
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 32 of 32
4. Network Configuration
4.1 GSD file
A GSD file is a readable ASCII text file that contains a complete description of the specific
device. Basically GSD includes both general info (i.e. vendor and device name, hw/sw releases)
and device specific info (Input and Output area size, communication parameters, scanner setup
parameters and so on).
Powerful configuration tools (i.e. Siemens SIMATIC Manager) are available to setup a Profibus
network. Based on the GSD files, these allow easy configuration of Profibus networks with devices
from different manufacturers.
Note: firstly a GSD file must be installed into the PLC environment in order to let a new device
be identified and to work on the Profibus network. Follow the instructions in the “GSD Installation”
paragraph.
DS6X00 is equipped with the following files:
DTL_07F0.GSD
DS6000.DIB
DS6000DI.DIB
DS6000SF.DIB
Device description file
Custom identification icons
The GSD file is a certified part of the device and must not be changed manually. This file is also
not changed by the configuration tool.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 33 of 33
4.2 GSD Installation
The first action that must be done is to add the DS6X00 as a new Profibus-DP Slave among
the catalogue of suitable devices for the PLC.
1. Install the new GSD file...
2. Find the GSD file…
(GSD and *.DIB files must be in the same directory)
3. Update Catalogue…
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 34 of 34
4. Find new device…
A new DS6000 device will appear in the PLC catalogue under
Additional Field Devices
ID Systems
Datalogic
Profibus-DP
DS6X00 folder
5. Insert the device in the Profibus network…
The easy drag&drop function allows inserting the DS6X00 device in your own network
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 35 of 35
4.3 Scanner Programming via GSD File
The major benefit of the GSD file is to setup the scanner by means of the Profibus Master
without the using the Genius™ program: it is possible to select the barcodes, the scanner
operating mode and many other relevant parameters.
Different scanner parameters are grouped in Project Modules that can be used to create
custom configurations. The User should include the desired modules in his own PLC project and
select the proper values for each parameter. Once completed, the PLC will automatically program
the scanner at each power on and also any time it is re-discovered on the network (reconnected).
Since the scanner configuration is stored in the PLC, scanner replacement operations become
extremely easy and quick.
4.3.1 Project Modules
Three types of modules are available:
•
•
•
[IOMCxx] modules
[IOMxx] modules
[Mxx] modules
I/O module with Data Consistency over the whole string
I/O module with Data Consistency over bytes/words
Scanner Parameters module
Modules overview:
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 36 of 36
At least one I/O module is required to set the dimensions of both the Input and Output
exchange areas. If needed, one or more [IOMCxx] (or [IOMxx]) modules can be combined.
Scanner parameterisation is optional. In this case, the [M1] Operating Mode module must
always be present.
It is suggested to use the [M21] Restore Default module first, to allow a congruent
configuration. All of the available modules, except the I/O modules, are generally executed in the
same order in which they are inserted.
Let’s see the details of each module:
[M1] Operating Mode module
Parameter
Operating Mode
Options
"On Line 1In"
"On Line 2In"
"On Line 1In/Timeout"
"On Line ProfiBus"
"On Line ProfiBus/Timeout"
"Serial On Line"
"Serial On Line/Timeout"
"Continuous"
"Test"
"Packtrack"
"Automatic"
[M2] Start Input module
[M3] Stop Input module
Parameter
Presence Sensor
PS Active Level
Options
"Input 1"
"Input 2"
"Input 3"
"Input 4"
"Active Closed"
"Active Open"
[M4] OnLine Timeout Options module
Parameter
Timeout
Options
"40(ms)"
"50(ms)"
"70(ms)"
"100(ms)"
"150(ms)"
"200(ms)"
"500(ms)"
"1000(ms)"
"2000(ms)"
"3000(ms)"
"4000(ms)"
"5000(ms)"
"7000(ms)"
"10000(ms)"
"12000(ms)"
"15000(ms)"
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 37 of 37
[M5] Automatic Mode Options module
[M6] Continuous Mode Options module
Parameter
Code Filter Depth
Threshold
Options
"0"
"1"
"2"
"3"
"4"
"5"
"6"
"7"
"8"
"9"
"10"
"15"
"20"
"25"
"30"
"35"
"40"
"45"
"50"
"10 scans"
"20 scans"
"50 scans"
"80 scans"
"100 scans"
"150 scans"
"200 scans"
"250 scans"
"300 scans"
"350 scans"
"400 scans"
"500 scans"
"750 scans"
"1000 scans"
"5000 scans"
"10000 scans"
"15000 scans"
"20000 scans"
"30000 scans"
[M7] Packtrack Mode Options module
Parameter
Physical Encoder
Tx Edge
Max Number Of Packs
Options
"Enable"
"Disable"
"Trailing"
"Leading"
"2" … "15"
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 38 of 38
[M8] Reading Parameters module
Parameter
Reading Mode
Overflow Ratio
Beam Shutter
Options
"Reconstruction"
"Linear"
"0" … "50"
"Disable"
"Triggered"
"Enable"
[M10] Profibus Settings module
Parameter
Flow Control
Data Consistency
Input 1
Input 2
Input 3
Input 4
Phase Echo
Output 1
Output 2
Output 3
Options
"Disable"
"DAD Driver"
"DPD Driver"
"Enable"
"Disable"
"Enable"
"Disable"
"Enable"
"Disable"
"Enable"
"Disable"
"Enable"
"Disable"
"Enable"
"Disable"
"Enable"
"Disable"
"Enable"
"Disable"
"Enable"
"Disable"
[M11] Code Label Setting 1 … [M15] Code Label Setting 5 modules
Parameter
Code Type
Label Length
Options
"Code 128"
"Interleaved 2 of 5"
"Code 39"
"Code EAN 128"
"EAN-13"
"EAN-8"
"UPC-A"
"UPC-E"
"All EAN_UPC"
"CODABAR"
"Code 93"
"Variable"
"1" … "48"
[M21] Restore Default module
Parameter
<No Parameters>
Options
<No options>
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 39 of 39
A typical scanner programming project is as follows:
Here you have:
[IOMC4] module to set the Input/Output exchange areas.
[M21] module to restore the scanner configuration to Default.
[M10] module to define possible Flow Control protocol and/or Data Consistency options.
[M1] module to select the scanner operating mode, i.e. OnLine mode.
[M2] module to indicate which digital Input provides the trigger.
See also details of the demo project in the following chapter.
Complete parameter descriptions are available in the Genius™ On Line Help.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 40 of 40
5. Example Application
This chapter describes how to connect a DS6X00-10X-011 barcode reader to a network
Mastered by a Siemens S7 PLC.
It is intended to be used along with its accompanying S7 project, scanner configurations and
GSD file as a demonstration of Profibus connectivity.
The Application program implements complete data collection by using the DPD Driver
protocol.
System Layout
DS6X00-10X-011 Settings
Nothing to do. Scanner has to be taken out from the box and just plugged into the network.
Default Profibus address = 125DEC
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 41 of 41
5.1 Installing the Scanner to the Network
Follow the instructions in the “GSD Installation” paragraph.
5.2 Loading the Demo Application Program
The Demo Application Program has been designed by means of the Siemens SIMATIC STEP7
V5.1 and has been tested on the Siemens S7 PLC.
1. Run the Siemens SIMATIC STEP7
program.
2. Retrieve… (Import) the Demo Program.
3. Select Archive… (attached file is called Ex_6K_v1.zip)
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 42 of 42
We suggest using the default Destination Directory (S7proj)
4. Open the project. After unzipping (click Yes to confirm).
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 43 of 43
5. Transfer Demo Application Program to the PLC
Select all the Organising Blocks then press the Download icon to transfer sw & hw
configuration to your PLC.
Note: the Demo Application Program was tested with CPU 313-2-DP. In order to avoid possible
incompatibilities, the 300 series CPU is recommended.
In any case, the present PLC sw program can be easily adapted to your actual hw/sw
configurations.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 44 of 44
5.3 Network Configuration Description
The basic situation is depicted below:
The PLC communicates with the unique DS6X00 set with address 125DEC. No further devices
are expected to be present on the Profibus-DP network.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 45 of 45
[IOM4] module set the exchange areas as follows:
Input area size = 32 byte
[ mapped from I20 (E20) to I51 (E51) ]
Output area size = 8 byte
[ mapped from Q10 (E10) to Q17 (E17) ]
[M21] Restore Default assures consistent programming of the
scanner even if configuration has been modified previously.
[M1] Operating Mode selects OnLine as the operating mode of the scanner (as default, Input1 is
the trigger).
[M10] Profibus Settings enables the Flow Control handshake:
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 46 of 46
5.3.1 Block Descriptions
The Demo project is made up of the following blocks:
OB1 - Organising Block
OB82 - Organising Block
OB86 - Organising Block
OB100 - Organising Block
OB122 - Organising Block
"Main Program Sweep (Cycle)"
"I/O Point Fault"
"Loss Of Rack Fault"
"Complete Restart"
"Module Access Error"
FB1 - Function Block
DB1 - Data Block
"Flow Control Implementation"
"Data Buffer"
SFC21 - System Function Call
"FILL": initialise a destination memory area with the content
of a starting memory area.
VAT Input Data
VAT Output Data
Variable Table to check incoming Data
Variable Table to check outgoing Data
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 47 of 47
VAT Input Data
Variable Table to check incoming Data
Basically you can check the shared Input area where the scanner writes data to the PLC.
Refer to the "Data Consistency with DPD Driver" paragraph for details.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 48 of 48
VAT Output Data
Variable Table to check outgoing Data
Through this table you will see how many barcodes have been received and the last barcode sent
from the reader and moved to the temporary Local Buffer.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 49 of 49
5.4 Example of Data Exchange
To check the behaviour of Demo Program it is useful switching Step7 to OnLine mode and
having a look at the VAT Input Area and the VAT Output Area.
After power on, starting values should be as follows:
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 50 of 50
Let's give a 1st trigger to the scanner making a NoRead.
1st message (NoRead) will be sent to the PLC.
Note Bit 0 toggling.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 51 of 51
Let's give a 2nd trigger to the scanner making another NoRead.
2nd message (NoRead) will be sent to the PLC.
Nothing seems to change but note Bit 0 toggling and barcode counter increasing.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 52 of 52
Let's give a 3rd trigger to the scanner reading "10DL" on the DL Barcode Test Chart.
3rd message ("10 DL") will be sent to the PLC.
Bit 0 toggles and barcode counter increases.
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 53 of 53
Let's give a 4th trigger to the scanner reading "03 $DL" on the DL Barcode Test Chart.
4th message ("03 $DL") will be sent to the PLC.
Bit 0 toggles and barcode counter increases.
Procedure cyclically continues...
PROFIBUS Fam6K
This documentation is property of DATALOGIC.
Reproduction in whole or in part is forbidden without the written consent of DATALOGIC.
Page 54 of 54
Download PDF

advertising