The text of a manual · part 22 of 25
Dragon D131/M131 Reference Manual: 6 MESSAGE FORMATTING
Pages 179 to 183 of 212, from Dragon D131/M131 Reference Manual
The original document is the PDF (2.2 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
Filed in the catalog under the Datalogic MBC-3000
Page 179
MESSAGE FORMATTING
6
MESSAGE FORMATTING
The system always provides gun to host data communication using the following message formatting: Output Message from Dragon™ D131 or Dragon™ M131 Stand Alone Towards Host [Header] [Gun_Addr] [Gun_Addr_delimiter] ] [Cradle_Addr] [Cradle_Addr_delimiter] [Time stamp] [Ts_delimiter] [Code ID] [Code Length] CODE [Terminator] [Items in square brackets are optional.]
Output Message from Dragon™ M131 STAR-System™ Towards Host [Time stamp] [Ts_delimiter] [Header] [Code ID] [Code Length] CODE [Terminator] [Items in square brackets are optional.]
For Dragon™ M131 models with display, if the RS232 interface is selected for communication between the Host and the OM-30X0 cradle, then the following additional communications between Host and Gun can occur: •
The Host can send messages to any gun associated with that cradle to control the Gun's display, LEDs and beeper.
•
The Gun can send up to 3 user-defined characters to the Host using the 3 command keys on the gun.
These communications and their relative message formatting are detailed in the following paragraphs.
6.1
MESSAGES FROM HOST TO GUN
The general format is: [Gun_Addr] [Gun_Addr_delimiter] MESSAGE CR
NOTE: •
If you have enabled the Gun Address Stamping or the Gun Address Delimiter, you must specify them in every message.
171
Page 180
DRAGON™ D131/M131
•
If you have not enabled the Gun Address Stamping or the Gun Address Delimiter, you must not specify them. In this case all messages will be implicitly addressed to the 'binded' gun of the cradle directly connected to the serial line.
•
The gun can only receive messages only if two-way mode is enabled. (See par. 5.9.3, “Transmission Mode”, command is on page 133).
•
Messages cannot start with '$+' because they would be interpreted as a configuration command.
•
You can send a message to the gun only while it is on. This happens when it has sent a message to the host and the radio timeout has not yet expired. (See par. 5.9.1, "Radio Protocol Timeout"; command is on page 132).
•
If you want to control the gun's beeper from the host, you will also probably want to disable the good transmission beep that is emitted when the code is received from the cradle. (See command on page 87).
The message field can store plain text and escape sequences. •
Escape sequences are interpreted as commands.
•
Plain text is directly printed on the display. If writing beyond the end of line, the display does not wrap automatically. Extra characters are ignored. Control characters are not interpreted (i.e. LF, FF, etc.).
6.1.1
Cursor Control
ESC [ n A ESC [ n B ESC [ n C ESC [ n D ESC [ G ESC [ r ; c H ESC D ESC E ESC M •
172
Up n rows, no scroll Down n rows, no scroll Right n columns Left n columns CR Move to row r, column c (ESC[1;1H is the upper left character position of the display) Down 1 row, with scroll CR and cursor down 1 row with scroll Up 1 row and scroll
NOTES: Since CR is used as the message terminator, you must use ESC [ G or ESC E to print a CR.
Page 181
MESSAGE FORMATTING
•
The cursor row position is not affected by the currently selected font. The display always has 4 rows, so when writing with the large font, actually two rows are written to: the current one and the one below it. You will need two ESC E commands to step from one row to the next when using the large font.
•
The cursor column position is affected by the currently selected font. Therefore, column 6 is 36 pixels from the left border only if you last selected the 6x8 font; otherwise it could be 48 or 72 pixels from the left border.
6.1.2
Font Selection
ESC [ 0 m ESC [ 7 m ESC # 4 ESC # 5 ESC # 7
6.1.3 ESC [ 0 K ESC [ 1 K ESC [ 2 K ESC [ 0 J ESC [ 1 J ESC [ 2 J
6.1.4 ESC [ 0 q ESC [ 1 q ESC [ 2 q ESC [ 3 q ESC [ 4 q ESC [ 5 q ESC [ 6 q ESC [ 7 q ESC [ 8 q ESC [ 9 q
Normal mode Reverse mode Large font: subsequent characters are written on the current row and the row below it using the 12x16 font which allows for two rows of eight characters on the display. Normal font: subsequent characters are written using the 6x8 font which allows for four rows of sixteen characters on the display. Medium font: subsequent characters are written using the 8x8 font which allows for four rows of twelve characters on the display.
Clearing Display From cursor position to end of line inclusive From beginning of line to cursor position (not inclusive) Entire line From cursor position to end of display inclusive From beginning of display to cursor position (not inclusive) Entire display; moves cursor to upper left corner on display
LED and Beeper Control Emit short High tone + short delay Emit short Low tone + short delay Emit long Low tone + short delay Emit good read tone Emit bad tx tone Wait 100 ms Turn on the green LED Turn off the green LED Turn on the red LED Turn off the red LED
173
Page 182
DRAGON™ D131/M131
The LED control escape sequences are intended to activate the LEDs for short periods of time and can be used in combination with the Beeper. The LED and Beeper will be controlled by the system after the entire command sequence is interpreted. Example: ESC [ 6 q ESC [ 3 q ESC [ 7 q
Turns on the green LED, emits a good read tone, and turns off the green LED.
ESC [ 6 q ESC [ 5 q ESC [ 7 q
Turns on the green LED for 100 ms and then turns off the green LED.
6.1.5
Setting RTC
ESC [ 0 p d d m m y y ESC [ 1 p h h m m
6.2
Set date to day, month, year Set time to hours, minutes; automatically set to 00.
seconds are
MESSAGES FROM GUN COMMAND KEYS
The Dragon™ M131 series guns with display have 3 command keys that can each be associated with a character to send to the host. By pressing the keys on the gun, the associated character with its relative message formatting is sent to the Host. For example, keys can be used to select items from a menu sent to the gun display by the application program. The general format is: [Header] [Gun_Addr] [Gun_Addr_delimiter] ] [Cradle_Addr] [Cradle_Addr_delimiter] [Time stamp] [Ts_delimiter] [Code ID] [Code Length] KeyID [Terminator] [Items in square brackets are optional.]
The messages are handled by the system as if they were barcodes, that's why KeyID can have so many fields appended to it. If in your application there is some chance of reading a 1-char barcode identical to KeyID, the way you can distinguish between the two is to enable the Code ID: The KeyID is the only 1-character long EAN 8 code. Refer to par. 5.3 for a compete description of the optional message fields in square brackets.
174
Page 183
MESSAGE FORMATTING
The default characters associated with each key (KeyID) are shown in the following table: Default Key Identifiers
▲
Key
KeyID
(left) Key
'<'
ENTER
(center) Key
'='
▼
(right) Key
'>'
175