UniOP Support for the Datalogic Barcode Scanner protocol (DTLG)
Date:
Ref:
Author:
June 7, 2002
UNI352-0.doc
D. Gorupec
This document defines the UniOP implementation of the Datalogic Barcode Scanner protocol.
For more information refer to the following documentation:
[1]
[2]
[3]
[4]
[5]
Project File Format Specification, UNI026-5.DOC (definition of the UniOP data types and
formats)
UniOP-OPEN Message Optimization, UNI035-1.DOC (general description of message
optimization)
UniOP-OPEN Communication Interface Specification, UNI027-2.DOC (description of the
software interface between the standard UniOP-OPEN software and the PLC-specific software)
UniOP Reserved Data Areas, UNI068-1.DOC
Address Calculation for PLCs with Inverted Order of Bytes, UNI070-0.DOC
116102347 - February 12, 2016
Copyright  2001 Sitek S.p.A. Produzioni Elettroniche. All rights reserved.
Pg. 1/8
Table of Contents
1.
PROJECT ..................................................................................................................................................... 3
2.
CONTROLLER DATA STRUCTURES .................................................................................................... 3
2.1.
3.
ACCESSIBLE DATA TYPES BY DESIGNER .................................................................................................. 3
PARAMETER DEFINITION IN THE UNIOP DESIGNER ................................................................... 4
3.1.
3.2.
CLASSIFICATION OF PARAMETERS ........................................................................................................... 4
MESSAGE OPTIMIZATION ......................................................................................................................... 5
4.
GENERIC ADDRESS .................................................................................................................................. 5
5.
PRESENTATION AND SESSION LAYER SPECIFICS ......................................................................... 5
6.
SPECIAL FORMATS .................................................................................................................................. 5
7.
CUSTOM PROCESSING ............................................................................................................................ 6
8.
DIRECT ACCESS ........................................................................................................................................ 6
9.
THE RESERVED DATA AREA................................................................................................................. 6
10.
PROTOCOL PARAMETERS................................................................................................................. 6
11.
COMMUNICATION PROTOCOL ........................................................................................................ 6
11.1.
11.2.
11.3.
11.4.
12.
ON-REQUEST DATA TRANSFER ............................................................................................................. 7
ADVANCED FUNCTIONS ....................................................................................................................... 7
CURRENT COMMUNICATION STATUS .................................................................................................. 8
HARDWARE SETTINGS ......................................................................................................................... 8
LIMITATIONS ......................................................................................................................................... 8
116102347 - February 12, 2016
Copyright  2001 Sitek S.p.A. Produzioni Elettroniche. All rights reserved.
Pg. 2/8
1. Project
Project type = 192
DLL = uplc174
Project ID = Datalogic
Project Version = V4.00
Abbreviation = DTLG
2. Controller Data Structures
The Barcode Scanner will send an ASCII string to the controller. There will be neither header nor
footer. It is supposed that the Scanner will burst the string in one single stroke. A pause will be
detected by the protocol and declared as the end of the string.
2.1. Accessible data types by Designer
The list of data types accessible by Designer:
1. Barcode string (38-byte array) – this is where the last received barcode string is saved. The
user will usually display it in ASCII form. It is possible to display the string beginning from a
mid-character, not necessary from the very first one.
2. String length (1 byte) – the length of the last received barcode string is saved here.
3. Error Code (1 byte) – the error code of the last barcode-receiving session is saved here: 1
means no error, 2 means line error.
4. String Identifier (1byte) – modulo-256 counter that is increased every time the new barcode
string is received. It makes it easier to know if the new string is received.
5. Memory buffer (550 byte) – most of the Memory buffer can be used freely. However, by
default the very beginning of this memory is used as memory holder for first four data-types
(see explanation bellow). Also address range from 420 to 470 is used for special purposes
(see advanced functions for details).
First four data-types (Barcode string, String length, Error code and String identifier) are actually
mapped to the Memory buffer. By default the String Identifier is mapped to Memory buffer at offset
address 0, the Error code is mapped to Memory buffer at offset 1, the Sting Length is mapped to
Memory buffer at offset 2 and the Barcode string is mapped to the Memory buffer at offset range 3 to
40.
It means that, by default, it is the same if you read either String Identifier or Memory buffer offset
address 0 or if you, for example, read either Barcode string or Memory buffer at offset address 3. The
reason why such duplication is implemented can be found in data transfers.
116102347 - February 12, 2016
Copyright  2001 Sitek S.p.A. Produzioni Elettroniche. All rights reserved.
Pg. 3/8
3. Parameter definition in the UniOP Designer
This chapter deals with the definition of parameter fields to be performed in the PC-based
configuration support.
3.1. Classification of parameters
Numeric
Date
Time
PLC Data
Barcode String, Memory buffer
Bit
Byte
Binary
BCD
Word
Binary
BCD
ASCII
String Length, Error Code, String Identifier
Bit
Byte
Binary
BCD
Bargraph
Barcode String, Memory buffer
Byte
Binary
BCD
Word
Binary
BCD
String Length, Error Code, String Identifier
Byte
Binary
BCD
Message
Barcode String, Memory buffer
Bit
Byte
Binary
BCD
Word
Binary
BCD
String Length, Error Code, String Identifier
Bit
116102347 - February 12, 2016
Copyright  2001 Sitek S.p.A. Produzioni Elettroniche. All rights reserved.
Pg. 4/8
Byte
Binary
BCD
Dynamic attribute
Same as Message
Symbol
Not yet implemented
Special formats
No special format
3.2. Message optimization
Not used.
4. Generic Address
SlaveID
DeviceCode
Offset
Lo
-------Hi
SlaveID
DeviceCode
Offset
Slave identification number
0 – barcode string
2 – string length
3 – error code
4 – string identifier
5 – memory buffer
Offset of character in the barcode string or offset of the
memory buffer
5. Presentation and session layer specifics
6. Special formats
No special formats.
116102347 - February 12, 2016
Copyright  2001 Sitek S.p.A. Produzioni Elettroniche. All rights reserved.
Pg. 5/8
7. Custom processing
No custom processing.
8. Direct Access
Not used.
9. The Reserved Data Area
The Memory Buffer can be used for RDA
10. Protocol Parameters
Byte
Parameter
0
1
Key Update
UniOP Status Update Options
2
PLC Status Update Options
3
4
N
LED Update
Dummy
Reserved
Values
Number of bytes of Key Update
Bit 0 Time Update 0=NO, 1=YES
Bit 1 USW Update 0=NO, 1=YES
Bit 2 PGNR Update 0=NO, 1=YES
Bit 0 PGNR Update 0=NO, 1=YES
Bit 1 PCW Update 0=NO, 1=YES
Number of bytes for led update
Not used
The purpose of the update options is to control the size of the PLC memory that must be allocated for
the RDA (Reserved Data Area), as well as to pass other information necessary for correct protocol
operation.
Key Update: specifies the number of bytes that UniOP will write to the PLC memory to update the
key status table. 0 means no Key Update at all. When a number 2, 4, 6 or 8 is specified, the first 2, 4,
6 or 8 bytes of the Key Buffer are written to the PLC memory.
UniOP Status Update Options: define which status information UniOP will write to the PLC.
Example: If the configuration Time Update = 0, PGNR Update = 1, PCW Update = 1 is selected,
UniOP will write only 4 bytes containing the PCW and the number of the current page.
PLC Status Update Options and LED Update: define how many bytes are reserved in the PLC
memory for this PLC control information.
11. Communication protocol
The UniOP is slave. The UniOP waits for string sent by the controller.
116102347 - February 12, 2016
Copyright  2001 Sitek S.p.A. Produzioni Elettroniche. All rights reserved.
Pg. 6/8
11.1. On-request data transfer
The Datalogic protocol has the ability to handle the Mailbox itself (without any need for programming).
To use this feature, the Mailbox must be placed in the Memory Buffer at offset of 420. If made so, the
UniOP will execute the Job 1 data transfer just after it receives the barcode string from the Datalogic
Barcode Scanner.
11.2. Advanced functions
1. The Data Buffering (storing more than just one barcode string into the UniOP memory).
2. Thanks to the Data Buffering it is possible to show a short history of received strings on
UniOP display (not only the very last received string) without need for any special controller
programming (or even without any controller at all).
The general idea is to make it possible to place the Storage Structure anywhere in the Memory Buffer
– not only at the very beginning of the Memory Buffer. By placing newly received strings dynamically
on different locations it is possible to keep old strings intact when a new string is received. Also,
placing the Storage Structure back to an old location, the Barcode String, String Length, Error Code
and the String Identifier will be turned into old data.
In addition, it is possible to have the protocol itself automatically change the placement of the Storage
Structure just before a new string is stored. For such an application, the minimal and the maximal
allowed location and the length of the Storage Structure must all be defined. Address range from 460
to 469 of the Memory Buffer is used for advanced programming.
Offset
460-461
Description
Memory valid indicator (2-byte string)
Default
‘OK’
FIXED TO STRING ‘OK’. IF THIS STRING IS CHANGED THE UNIOP WILL
CLEAR THE MEMORY BUFFER NEXT TIME POWERED UP.
462-463
464-465
466-467
468
469
Storage Structure Location (word)
Points to the Storage Structure. This is the location in the Memory Buffer
where the Storage Structure is placed.
Min. Location (word)
If the Data Buffering is used, it points to the minimum offset address allowed
for the first byte of the Storage Structure. Otherwise it has no meaning.
Max. Location (word)
If the Data Buffering is used it points to the maximum offset address allowed
for the first byte of the Storage Structure. Otherwise it has no meaning.
Storage Structure Length (byte)
It tells to UniOP how many bytes of the Storage Structure must be cleared to
zero before the newly received string is placed over the old one.
If the Data Buffering is enabled, it also tells the UniOP for how much the
Storage Structure Location pointer must be increased (if the Max. Location is
not yet reached).
Enable Data Buffering (byte)
0 – the Data Buffering disabled
1 – cyclical Data Buffering enabled. When the Storage Structure Location
reaches the Max. Location it is re-pointed to the Min. Location and starts
filling the buffer from the beginning overwriting the old data.
3 – scrolling Data Buffering enabled. When the Storage Structure Location
116102347 - February 12, 2016
Copyright  2001 Sitek S.p.A. Produzioni Elettroniche. All rights reserved.
0
0
400
0
0
Pg. 7/8
reaches the Max. Location value it stays fixed but every time a new string is
received the old data is scrolled back and the oldest string is lost.
11.3. Current Communication Status
Current communication status is displayed in the system page of the UniOP. It should be provided by
the DLLGetPLCStatus service of the protocol implementation. Beside the string describing current
state of the communication, there is an additional error code representing the last (which may not be
the current one) error encountered. The codes are:
00
05
06
07
11
NO ERROR
TIMEOUT ERR
No response for a long time – should never
happen
RESPONSE ERROR
BCC error
GENERAL COMMUNICATION ERROR Should never happen
LINE ERROR
Parity error or similar
11.4. Hardware settings
Default communication parameters are: 9600,N,8,1
12. Limitations
No special limitations.
116102347 - February 12, 2016
Copyright  2001 Sitek S.p.A. Produzioni Elettroniche. All rights reserved.
Pg. 8/8