11SOLO2 User’s Manual Revision 0.9
39
In case of an error, the reply string is in the following format:
Error X: reason
[enter]
X
is the error code, and
reason
is an explanation. See Error Codes at the end of this section.
Because all Text Mode replies end with a
CR
or
LF
(or both), a text reply contains tabulations when many
elements need to be separated in the string. This is useful when exporting data to a spreadsheet.
3.4.1.3 Binary Mode rules:
Binary commands (“Handles”) are much faster since the values are not converted for human
comprehension and less data needs to be transferred. They are expected to be sent with the correct
number of parameters. Otherwise, an error message will be returned. The binary commands are two-
byte words, and all the following parameters are four-byte double words. The command is executed when
the device receives the expected amount of data for the command handle and all the parameters.
Binary data are sent from the PC in big-endian format. That is the data is sent in chunks of 2 or 4 bytes
with the most significant byte sent first. You can program the commands in decimal for sending from the
PC. The 11SOLO2 send data in big endian format, that is, the most significant byte comes first. You may
need to convert to little-endian depending on the software and computer you are using.
Binary command example
(backlight ON):
Command Parameter
Text mode
*BKL 1
Binary mode
in decimal
1003 1
2 byte word
4 byte word
Byte: 1st 2nd
1st 2nd 3rd 4th
in Hex, big endian
03 EB
00
00 00 01
EB 03
01
00 00 00
as sent by PC in little endian
Replies to binary commands are also in binary mode, and have a four-byte header and a variable amount
of parameters. The header contains two words. The first word is the error indicator: 10= success,
11=error. The second word is an indicator of the size (in bytes) of the reply parameters or, in the case of
an error, the error number.
An example of how you can use the binary commands is shown below in pseudocode.
Structure {
Definition of variables
WORD Handle
Reserves address space of a 2 byte word to store the
variable Handle
DWORD ParameterA []
Reserves address space of one 4 byte word to store
ParameterA. (4 byte word is a double word)
DWORD ParameterB [6]
Reserves address space of 6 double words to store an
array of 6 parameters called ParameterB
} PackedData
Standa Ltd. All rights reserved