dS2824
dS2824
User Manual v4.09
0x35
Get Analogue inputs (1 byte command returning 16 bytes)
This returns all eight possible analogue inputs. 16 bytes are returned, 2 for each analogue in-
put.
Byte 1 byte 2
for example:
0x02 0x3E
combined to 0x023E, or 574 decimal for input 1.
Byte 3 byte 4
0x01 0xFB
combined to 0x01FB, or 507 decimal for input 2.
Bytes 5 – 14 follow in a similar way.
Byte 15 byte 16
0x03 0x2C
combined to 0x032C, or 812 decimal for input 8.
If the input is configured as a digital port then the input will be 0 or 1.
0x36 0x01
Get Counters (2 byte command – returning 8 bytes)
This command is used to get the counters. The second byte is the counter number, counter 1
in this case.
The first 4 bytes returned is the current counter value. This 32-bit (4 bytes) value is returned
high byte first. The second group of 4 bytes returned is the capture register for this counter,
also a 32-bit (4 byte) value returned high byte first.
0x37 0xnn 0xnn 0xnn 0xnn Update all relays (5 byte command returning 1 byte)
This command is used to update all relays with one command returning an ACK/NACK byte.
ACK=0, NACK=non-zero. If a bit is high (1), the corresponding relay will be turned on. If a bit
is low (0) the corresponding relay will be turned off. This command therefore affects all relays.
The bit order is the same as the Get Relay command.
Byte 2
Byte 3
Byte 4
Byte 5
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
7
6
5
4
3
2
1
0
32 31 30 29 28 27 26 25
24 23 22 21 20 19 18 17
16 15 14 13 12 11 10
9
8
7
6
5
4
3
2
1
0x38 0xnn 0xnn 0xnn 0xnn Set selected relays (5 byte command returning 1 byte)
Set only those relays with a corresponding high in the bit pattern returning an ACK/NACK byte.
ACK=0, NACK=non-zero. Same bit order as command 0x37 above.
Relays with a corresponding low (0) are NOT affected and remain on/off as previously set.
0x39 0xnn 0xnn 0xnn 0xnn Clear selected relays (5 byte command returning 1 byte)
Clears only those relays with a corresponding high in the bit pattern returning an ACK/NACK
byte. ACK=0, NACK=non-zero. Same bit order as command 0x37 above.
Relays with a corresponding low (0) are NOT affected and remain on/off as previously set.
Copyright
© 2016-2021,
Devantech Ltd.
All rights reserved.
48