6
Serial protocol (SCL)
General
Port settings
Baud rate: 300, 1200, 2400, 4800, 9600 or 19200.
8 data bits, none parity, 1 stop bit.
Protocols
Two different serial protocols may be used to control
X-2071. The protocol is selected in the configuraton
menu. It can be either Nokeval SCL or Ascii. In Ascii
protocol, there is no address involved, so every
display in the bus will show the same display. These
protocols are introduced in the next chapters.
SCL protocol
The SCL message consists of the actual command
supplemented with some control bytes that are
necessary to address the message to the correct
device and to detect transmission errors.
Commands for 2071
To control the display, use DISP command (use upper
case):
DISP 123456
After this command, the display will read 123456. See
more on chapter Display modes.
To control the alarm indicators A1..M2 at the front
panel, use LED command:
LED 00011X
This command will switch the three leftmost leds off
(0), light up the two next leds (1), and blink the sixth
led (X). The Conf led is not user controllable.
To read the four front panel keys, use KEYB com-
mand:
KEYB
About this command, see chapter Reading front panel
keys.
Control bytes
The general format of SCL command packet is:
<ID>command<ETX><BCC>
The first byte sent (ID) has two purposes: it selects
the device to which the command is intended, and
indicates that a completely new command is to come.
The byte is calculated by adding 128 (or 80h in
hexadecimal representation) to the address of the
device to be controlled, that is, the most significant
bit is set. If you want to command a device in address
4, the <ID> byte will be 132 (or 84h). This is a single
byte whose value is 132, do not send individual
numbers 1, 3 and 2!
The command is one of the commands explained
previously (e.g. DISP 28.5).
ETX character means End of Transmission. It
terminates the command. It is a single byte with Ascii
value 3 (03h).
BCC is a checksum. The sender calculates it from
the command and ETX bytes using XOR operation.
The id character is not involved in BCC calculation. If
you do not want to send checksum, you must switch
it off in the 2071 menu (set BCC OFF). It is
recommended to use checksum, but sometimes it is
not possible calculate it.
An example of a complete command packet (both
characters and their Ascii values in hex shown):
<80h> D I S P 0 <ETX><BCC>
80 44x49x53x50x20x30x 03 = 1D
The x represents XOR operation in BCC calculation.
Response
2071 will respond to the command using SCL
protocol. The response message is in the following
form:
<ACK>response<ETX><BCC>
Instead, if there was errors in the transmission or in
the command, the response will be:
<NAK>errorcode<ETX><BCC>
ACK is a single byte with Ascii value 6 (06h). It
indicates that the device has accepted the command.
About ETX byte, see previous chapter.
The response is dependent on the command sent.
X-2071 has empty response except for KEYB com-
mand.
BCC is calculated similarly with the command BCC,
taking all the bytes from ACK to ETX. This time 2071
will calculate the checksum, and your task is to check
it if you want to.
Error response starter NAK is a single byte with Ascii
value 21 (15h). It is followed by a single number
representing the type of error. 3 means BCC error,
while 4 indicates non-recognized command.