![Devantech dS1242 Скачать руководство пользователя страница 46](http://html.mh-extra.com/html/devantech/ds1242/ds1242_user-manual_2488591046.webp)
dS1242
dS1242
User Manual v4.10
Binary Command Set – continued.
0x35
Get Analogue inputs (1 byte command returning 4 bytes)
This returns all 2 possible analogue inputs. 4 bytes are returned, 2 for each analogue input.
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.
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.
46