2KN and 4K Families Host Mode Programming Manual (ENG)
2KN and 4K Families Host Mode Programming Manual (ENG)
Ed.: 07/2017
© 2009 – 2017 Datalogic S.p.A. and/or its affiliates ALL RIGHTS RESERVED. Without limiting the
rights under copyright, no part of this documentation may be reproduced, stored in or introduced into a
retrieval system, or transmitted in any form or by any means, or for any purpose, without the express
written permission of Datalogic S.p.A. and/or its affiliates.
Datalogic and the Datalogic logo are registered trademarks of Datalogic S.p.A. in many countries,
including the U.S.A. and the E.U.
ID-NET and Genius are trademarks of Datalogic S.p.A. and/or its affiliates. All other trademarks and
brands are property of their respective owners.
Datalogic shall not be liable for technical or editorial errors or omissions contained herein, nor for
incidental or consequential damages resulting from the use of this material.
07/07/17
CONTENTS
iii
iv
HOST MODE PROGRAMMING
1
An alternative method of programming the 2KN family and the DS4800 laser scanners is by
sending programming strings.
These strings must be transmitted from the Host system to the device either on the auxiliary
RS232 serial interface, the main RS232/RS485 serial interface or the Ethernet System
Socket (Serial models with CBX TCP/IP Module or Built-in Ethernet models). This is called
Host Mode Programming.
In order to send the programming strings, it is necessary to switch the reader into Host
Mode.
Serial Interfaces
The programming commands and strings must be sent to the reader at the programmed
baud rate of the selected interface (e.g. if the baud rate of the Auxiliary interface is
programmed at 9600 bps the command must be sent at 9600 bps).
Once the programming session has started on one of the interfaces, the others are disabled
until programming is over.
Ethernet Interfaces
To send the command strings to the reader over the Ethernet TCP/IP port you must connect
to the reader. The default parameters are given below.
1
2KN-4K FAMILY HOST MODE PROGRAMMING
2
2 PROGRAMMING COMMANDS
From now on the device is in the CONNECTED state. Normal data flow is inhibited
until it comes back to the IDLE state.
This means:
After entering this command, the device responds with the third reply message and
then waits for one or more programming strings as shown in Chapter 3 and 4.
2
PROGRAMMING COMMANDS
2
3
2KN-4K FAMILY HOST MODE PROGRAMMING
2
Normally programming sequences do not involve this message except for the occasions
listed below:
4. Protocol Error
When Host sends wrong messages like unexpected escape sequences.
4
PROGRAMMING COMMANDS
2
HOST DEVICE
<ESC> [ C
(Enter Host Mode)
<ESC> H <CR><LF>
<ESC> ] B
(Enter Terminal Mode)
<ESC> R <CR><LF>
<ESC> c M <B0H> 0
(Enter Programming Mode)
<ESC> c <CR><LF>
.
.
.
5
2KN-4K FAMILY HOST MODE PROGRAMMING
2
HOST DEVICE
.
.
.
<ESC> d M <B0H> 0
(Exit Programming Mode)
<ESC> d <CR><LF>
<ESC> I A <space>
(Exit Terminal Mode)
<ESC> K <CR><LF>
<ESC> [ A
(Exit Host Mode)
<ESC> X <CR><LF>
6
PROGRAMMING STRINGS
3
3 PROGRAMMING STRINGS
3.1 DEFINITIONS
Shortcut (SHC)
The complete parameter path has been replaced by the short description (shortcut or shc).
This allows implementation of shorter programming strings. The shortcuts have the following
format:
Shortcut [#Depth]
Where:
Example:
7
2KN-4K FAMILY HOST MODE PROGRAMMING
3
Integer (Type = 0)
Range
Minimum and maximum values allowed for the parameter.
Shortcut: 79
Type: 0
Label: Timeout (ms)
Range: 40 to 15.000
Default: 100
Enumeration (Type = 1)
Item List
List of the values allowed for the parameter.
List of the values allowed for the parameter (i.e. 0 = first entry of the list, 1 = second entry of
the list).
Shortcut: 31
Type: 1
Label: Operating Mode Selection
Item List: 0 = On Line
1 = Automatic
3 = Test
4 = Continuous
Default: 0 (Entry 0 On Line)
8
PROGRAMMING STRINGS
3
String (Type = 2)
Length
Minimum and maximum number of characters allowed for this parameter.
Shortcut: 522
Type: 2
Label: Device Name
Length: 0 to 128
Default: Empty string
Where:
Length
List of the allowed values of the parameter
Shortcut: 6
Type: 3
Label: Header String
Length: 0 to 128
Default: <STX>
XXX.YYY
Range
Minimum and maximum values allowed for the parameter.
The sign can be omitted if the parameter value is not negative.
9
2KN-4K FAMILY HOST MODE PROGRAMMING
3
SS<space>SHC:VALUE<CR><LF>
Where:
After entering this command, the device responds with the proper reply message and then
waits for one or more programming strings.
If the programming is correct, the device updates the configuration and confirms with the
following message:
Y<space>VALUE<CR><LF>
Where:
If programming contents are wrong (i.e. a typing error in the file) or due to a transmission
error, the device replies with the following message and programming data will not be
updated in this case:
N<space>ERRCODE<CR><LF>
Where:
For information on Error Codes see the "Error Codes Table" in the Appendix.
10
PROGRAMMING STRINGS
3
GS<space>SHC<CR><LF>
Where:
After entering this command, the device responds with the proper reply message and then
waits for one or more programming strings.
If the programming is correct, the device updates the configuration and confirms with the
following message:
Y<space>VALUE<CR><LF>
Where:
If programming contents are wrong (i.e. a typing error in the file) or due to a transmission
error, the device replies with the following message:
N<space>ERRCODE<CR><LF>
Where:
For information on Error Codes see the "Error Codes Table" in the Appendix.
11
2KN-4K FAMILY HOST MODE PROGRAMMING
3
SR<space>L<space>PASSWORD<CR><LF>
Where:
After entering this command, the device responds with the proper reply message and then
waits for one or more programming strings.
If the programming is correct, the device updates the configuration and confirms with the
following message:
Y<space>L<CR><LF>
If programming contents are wrong (i.e. a typing error in the file) or due to a transmission
error, the device replies with the following message and programming data will not be
updated in this case:
N<space>ERRCODE<CR><LF>
Where:
For information on Error Codes see the "Error Codes Table" in the Appendix.
NOTE: To set the INSTALLER level (the only one available outside the
Datalogic Company) use:
SR<space>1<space>STHD<CR><LF>
12
PROGRAMMING STRINGS
3
E<space>MODE<CR><LF>
Where:
If the programming is correct, the device updates the configuration and confirms with the
following message:
Y<space>MODE<CR><LF>
Where:
If programming contents are wrong (i.e. a typing error in the file) or due to a transmission
error, the device replies with the following message and programming data will not be
updated in this case:
N<space>ERRCODE<CR><LF>
Where:
For information on Error Codes see the "Error Codes Table" in the Appendix.
13
2KN-4K FAMILY HOST MODE PROGRAMMING
3
The 'Restore Default Configuration' programming command must have the following
format:
SD<space>DEFNUM<CR><LF>
Where:
0 = Factory Default
After entering this command, the device responds with the proper reply message and then
waits for one or more programming strings.
If the programming is correct, the device updates the configuration and confirms with the
following message:
Y<space>DEFNUM<CR><LF>
Where:
DEFNUM: Default
If programming contents are wrong (i.e. a typing error in the file) or due to a transmission
error, the device replies with the following message:
N<space>ERRCODE<CR><LF>
Where:
For information on Error Codes see the "Error Codes Table" in the Appendix.
14
PROGRAMMING STRINGS
3
HOST DEVICE
.
.
.
SS<space>SHC1:VALUE1<CR><LF>
(Set parameter 1)
Y<space>VALUE1<CR><LF>
SS<space>SHC2:VALUE2<CR><LF>
(Set parameter 2)
Y<space>VALUE2<CR><LF>
E<space>MODE<CR><LF>
(Data Storage)
Y<space>MODE<CR><LF>
.
.
.
Figure 3 - Two Parameters Programming Session With Data Storage
15
2KN-4K FAMILY HOST MODE PROGRAMMING
3
3.6 EXAMPLES
-1-
Set Minimum Label Length parameter in CODE LABEL SETTING #2 folder:
Shortcut: 3
Type: 0 (Integer)
Range: 0 to 60
Value: 4
SS<space>3#2:4<CR><LF>
After entering the programming string, the reader responds with the message:
Y<space>4<CR><LF>
-2-
Set Operating Mode Selection parameter in OPERATING MODES folder:
Shortcut: 31
Type: 1 (Enumeration)
Item List: 0 = On Line
1 = Automatic
3 = Test
4 = Continuous
Value: 0 (Entry 0 On Line)
SS<space>31:0<CR><LF>
After entering the programming string, the reader responds with the message:
Y<space>0<CR><LF>
-3-
Set Device Name parameter in USER INFORMATION SECTION folder:
Shortcut: 522
Type: 2 (String)
Length: 0 to 128
Value: 2KN_FAMILY
SS<space>522:2KN_FAMILY<CR><LF>
After entering the programming string the reader responds with the message:
Y<space>2KN_FAMILY<CR><LF>
16
PROGRAMMING STRINGS
3
-4-
Set Header String parameter in DATA FORMAT folder:
Shortcut: 6
Type: 3 (Binary String)
Length 0 to 128
Default: HEADER (HEX value: 48H 45H 41H 44H 45H 52H )
SS<space>6:6<space>484541444552<CR><LF>
After enter the programming string, the reader responds with the message:
Y<space>6<space>484541444552<CR><LF>
-5-
Get value of Digital Output 2 Activation Event parameter in DIGITAL OUTPUT LINES
SETTING folder:
Shortcut: 24
Type: 1 (Enumeration)
Current Value: 2 (Entry 2 Partial Read)
GS<space>24<CR><LF>
After entering the programming string, the reader responds with the message:
Y<space>2<CR><LF>
-6-
Get value of No Read String parameter in CODE DEFINITION folder:
Shortcut: 9
Type: 3 (Binary String)
Current Value: Empty string
GS<space>9<CR><LF>
After entering the programming string, the reader responds with the message:
Y<space>0<CR><LF>
17
2KN-4K FAMILY HOST MODE PROGRAMMING
4
4 PARAMETERS LIST
LED INDICATION
Partial Read Is 5037 1 0 = No Read
Treated As 1 = Good Read
Multiple Read is 5036 1 0 = No Read
treated as 1 = Good Read
18
PARAMETERS LIST
4
19
2KN-4K FAMILY HOST MODE PROGRAMMING
4
20
PARAMETERS LIST
4
21
2KN-4K FAMILY HOST MODE PROGRAMMING
4
22
PARAMETERS LIST
4
23
2KN-4K FAMILY HOST MODE PROGRAMMING
4
24
PARAMETERS LIST
4
25
2KN-4K FAMILY HOST MODE PROGRAMMING
4
26
PARAMETERS LIST
4
27
2KN-4K FAMILY HOST MODE PROGRAMMING
4
VERIFIER
Enable 5121 1 0 = Disable
1 = Enable
Verifier Code 5126 3 Length: 1 to 60
Store Input 5124 1 1=1
2=2
Active Level 5127 1 0 = Active Closed
1 = Active Open
Right Code Tx 5560 1 0 = Disable
1 = Enable
Wrong Code Tx 5123 1 0 = Disable
1 = Enable
Wrong String Tx 5122 1 0 = Disable
1 = Enable
Wrong String 5128 3 Length: 1 to 128
28
PARAMETERS LIST
4
29
2KN-4K FAMILY HOST MODE PROGRAMMING
4
FOCUS (DS4800)
Locked Position 5203 1 0 = Unlocked
(cm/in) 25 = 25/9.84
26 = 26/10.24
27 = 27/10.63
28 = 28/11.02
29 = 29/11.42
30 = 30/11.81
31 = 31/12.20
32 = 32/12.60
33 = 33/12.99
34 = 34/13.39
35 = 35/13.78
30
PARAMETERS LIST
4
31
2KN-4K FAMILY HOST MODE PROGRAMMING
4
32
PARAMETERS LIST
4
33
2KN-4K FAMILY HOST MODE PROGRAMMING
4
34
PARAMETERS LIST
4
RECONSTRUCTION PARAMETERS
Stacked Codes 504 1 0 = Disable
Enhancement 1 = Enable
DATA FORMAT
Header TX Start 505 1 0 = With Data
1 = After Reading Phase
On
Termination after No 506 1 0 = Disable
Read Message 1 = Enable
Message TX selection 507 1 0 = On Decoding
(On Line 1 = After Reading
Operating Mode) Phase Off
2 = Delayed TX Line
Message TX 543 1 0 = On Decoding
Selection (Automatic 1 = After Reading
Operating Mode) Phase Off
Physical Encoder 5554 1 0 = Active Closed
1 = Active Open
35
2KN-4K FAMILY HOST MODE PROGRAMMING
4
36
PARAMETERS LIST
4
37
2KN-4K FAMILY HOST MODE PROGRAMMING
4
38
PARAMETERS LIST
4
39
2KN-4K FAMILY HOST MODE PROGRAMMING
4
40
PARAMETERS LIST
4
41
2KN-4K FAMILY HOST MODE PROGRAMMING
4
CBX GATEWAY
Type 5303 1 0 = None
1 = Profibus
2 = DeviceNet
3 = Ethernet/IP
(Ethernet/IP - TCP/IP)
4 = CC-Link
5 = CANopen
6 = Profinet (Profinet IO
– TCP/IP)
8 = Modbus TCP (Modbus
TCP - TCP/IP)
9 = Ethernet TCP/IP
10 = EtherCAT
42
PARAMETERS LIST
4
43
2KN-4K FAMILY HOST MODE PROGRAMMING
4
44
PARAMETERS LIST
4
45
2KN-4K FAMILY HOST MODE PROGRAMMING
4
46
PARAMETERS LIST
4
47
2KN-4K FAMILY HOST MODE PROGRAMMING
4
48
PARAMETERS LIST
4
49
2KN-4K FAMILY HOST MODE PROGRAMMING
4
50
PARAMETERS LIST
4
51
2KN-4K FAMILY HOST MODE PROGRAMMING
4
52
PARAMETERS LIST
4
53
2KN-4K FAMILY HOST MODE PROGRAMMING
4
54
PARAMETERS LIST
4
55
2KN-4K FAMILY HOST MODE PROGRAMMING
4
4.11 DIAGNOSTICS
56
PARAMETERS LIST
4
57
2KN-4K FAMILY HOST MODE PROGRAMMING
4
ACTIONS
TX Mode 5096 1 0 = On Timeout
1 = With Code"
TX Refresh 5092 1 1 = 1 sec
2 = 2 sec
5 = 5 sec
10 = 10 sec
20 = 20 sec
30 = 30 sec
60 = 1 min
300 = 5 min
Message Position 5095 1 0 = Append to Code
1 = Replace Code
2 = Insert before the
Code
Aux 5093 1 0 = Disable
1 = Enable
Main 5094 1 0 = Disable
1 = Enable
Fieldbus 5358 1 0 = Disable
1 = Enable
UserSocket#1 Serial Models with CBX 5354 1 0 = Disable
TCP/IP Modules 1 = Enable
UserSocket#2 Serial Models with CBX 5357 1 0 = Disable
TCP/IP Modules 1 = Enable
Modbus TCP Serial Models with CBX 5601 1 0 = Disable
BM2x0 Modules 1 = Enable
UserSocket#1 Built-in Ethernet Models 5818 1 0 = Disable
1 = Enable
58
PARAMETERS LIST
4
FORMAT
Header String 5101 3 Length: 1 to 128
Terminator String 5102 3 Length: 1 to 128
No Failure String 5604 3 Length: 0 to 32
Node Identification 5253 3 Length: 1 to 128
Diagnostic Message 5080 1 0 = Internal Numeric
Format Messages
1 = User Defined
Messages
59
2KN-4K FAMILY HOST MODE PROGRAMMING
4
60
PARAMETERS LIST
4
4.12 STATISTICS
61
2KN-4K FAMILY HOST MODE PROGRAMMING
A
This special command can be used to send Serial Motor On and Serial Motor Off strings (for
Energy Saving purposes) or Serial Start String and Serial Stop String (for Serial On Line
operating mode option) to a Slave device in an ID-NET™ reading system layout.
The 2KN Family and the DS4800 'Send String To Slave Device #N' special command must
have the following format:
Where:
This means:
62
SPECIAL COMMANDS AND TABLES
A
OPERATING MODES
Operating Mode Must be Automatic and Continuous if Host Application Protocol
Selection Type Crisplant.
Must be Continuous if Code Combination Single Label.
Must be Automatic and Continuous if Scanner Cluster Topology
Role Master Synchronized.
Must be Automatic and Continuous if Scanner Cluster Topology
Role Slave Synchronized.
On Line Options Must be Serial On Line if Host Application Protocol Type =
Crisplant.
Stop Phase Edge Must be Leading if Extended Phase Enable
(only for On Line 2
Input)
ACK/NAK Protocol Not available if Operating Mode Selection On Line.
Not available if Scanner Cluster Topology Role Slave
Synchronized.
Quality Counters Not available if Operating Mode Selection On Line and
Automatic.
Not available if Scanner Cluster Topology Role Slave
Synchronized.
63
2KN-4K FAMILY HOST MODE PROGRAMMING
A
STATISTICS
Enable Not available if Local Device Alternative Network Setting Slave
RS232 (Type A).
Not available if Scanner Cluster Topology Role Slave
Synchronized.
Not available if Operating Mode Selection On Line.
64
SPECIAL COMMANDS AND TABLES
A
CODE INTERPRETATION
COMMAND PARSING
-3 Parameter does not exist.
-4 Invalid range.
-8 Wrong syntax error.
-9 Wrong shortcut error.
-12 Path not found.
-13 Unknown command.
-14 Too many parameters in the programming string.
-15 No command is present in the programming string.
-16 Wrong number of parameters in the programming string.
-17 Unexpected error.
-19 One or more parameters are not applicable.
PARAMETERS PROGRAMMING
3 The current Path is not valid.
7 The current Path is a Folder
8 Parameter Type is not correct.
9 Parameter Value is not correct.
12 One or more Control Rules are not satisfied.
13 Access denied.
65
2KN-4K FAMILY HOST MODE PROGRAMMING
A
ASCII TABLE
66
SPECIAL COMMANDS AND TABLES
A
67