User Manual DEV 1951
100 Copyright DEV Systemtechnik GmbH 2004-2017
5.8.3 QEC Commands
The different commands for the communication with the device are described next.
5.8.3.1 Check Change Flag / Unit Status (C)
The command for reading the change flag is issued in the form
hexadecimal: 02 XX XX 43 03 XX
content: <STX> <address> C <ETX> <checksum>
e.g. for a device with the device address 11 connected to the serial port
hexadecimal: 02 31 31 43 03 42
content: <STX> <address=11> C <ETX> <checksum>
The change flag byte (<Cflg>) after "C" in the positive response informs whether
there are any changes in the change queue (please refer to chapter 5.8.3.2). The
C command is supposed to be sent periodically to check if any changes have been
made or if any events have occurred. The change flag byte is defined as follows:
The "Change" bit is set if there have occurred changes on the switching status of
the device, i.e. if the change queue is not empty. The "Alarm" bit is set if any (not
acknowledged) event is pending, and the "Overflow" bit is set if the change queue
is full and if an additional change has occurred before reading the change queue via
the Q command (chapter 5.8.3.2).
Note:
Since the DEV 1951 provides only (up to) two outputs, it is not possible that the
"Overflow" bit is ever set.
The change flag byte is cleared (i.e. set to 0x80) only if the queue is empty and
if there are no (not acknowledged) events.
The positive response to this command is
hexadecimal: 06 XX XX 43 8X 03 XX
content: <ACK> <address> C <Cflg> <ETX> <checksum>
e.g. for a device with the device address 11 connected to the serial port with no
changes and no "Alarm" bit set
hexadecimal: 06 31 31 43 80 03 C6
content: <ACK> <address=11> C 0x80 <ETX> <checksum>
and e.g. for the same device with changes and with the "Alarm" bit set returns
hexadecimal: 06 31 31 43 83 03 C5
content: <ACK> <address=11> C 0x83 <ETX> <checksum>