Serial Master-Interface #H
Command group to use the 3 serial master interfaces of the module. For example to connect additional peripherals like temperature sensor
Set RS232 baud rate (Hardware Rs232 Parameter) |
Baudrate [32-Bit] |
|
Set SPI parameters (Hardware Spi Parameter) |
Frequency, Mode, DataOrder |
|
Set SPI chip select (Hardware Spi Chipselect) |
ChipSelect |
|
Set I²C parameters (Hardware I²C Parameter) |
Address, Frequency |
|
Send 8-Bit (ASCII) string (Hardware RS232/SPI/I²C Ascii) |
"String"; |
|
Send 16-Bit (Unicode) string (Hardware RS232/SPI/I²C Unicode) |
"String"; |
|
Send 32-Bit signed values (Hardware RS232/SPI/I²C Integer) |
Value, Value1... |
|
Send 32-Bit float values (Hardware RS232/SPI/I²C floaT) |
Value, Value1... |
|
Send binary data (Hardware RS232/SPI/I²C Send binary) |
Number, Data... |
|
Send binary data from register (Hardware RS232/SPI/I²C send values) |
Type, Register-ID, Number(1) |
|
Send binary data from array (Hardware RS232/SPI/I²C send array) |
Type, Array-ID, StartIndex(0), Number(all elements) |
|
Send file (Hardware RS232/SPI/I²C send File) |
<Filename> |
|
Receive data and place into send buffer (Hardware RS232/SPI/I²C Receive to buffer) |
Number [32-Bit] (max 1024) |
|
Receive 8-bit data and write it to a string register (Hardware RS232/SPI/I²C Bytes to string) |
String-ID, Number (max 250) |
|
Receive 16-bit data and write it to a string register (Hardware RS232/SPI/I²C Words to string) |
String-ID, Number (max 250) |
|
Receive binary data and write it to a register (Hardware RS232/SPI/I²C Values to register) |
Type, Register-ID, Number(1) |
|
Receive binary data and write it to an array (Hardware RS232/SPI/I²C Values to array) |
Typ, Array-ID, StartIndex(0), Number(all elements) |
|
Set RS232 baud rate
#HRP |
Baudrate |
The command sets the Baudrate (32-bit value):
Baudrate |
Error |
9600 |
+0.04 |
19200 |
-0.08 |
38400 |
+0.16 |
57600 |
-0.08 |
115200 |
+0.64 |
230400 |
-0.80 |
460800 |
+2.08 |
921600 |
-3.68 |
Set SPI parameters
#HSP |
Frequency, Mode, DataOrder |
The command sets the Frequency (15,600 ... 1,000,000 Hz), the SPI Mode (0..3) and the DataOrder of the master SPI interface.
DataOrder |
|
0 |
MSB first |
1 |
LSB first |
#HSC |
ChipSelect |
The command defines the ChipSelect setting:
ChipSelect |
|
0 |
Low |
1 |
High |
2 |
Automatic (low active) |
#HIP |
Address, Frequency |
The command sets the Address (8 Bit) of the bus subscriber to be controlled and the Frequency (3,900 ... 1,000,000 Hz).
Send 8-Bit (ASCII) string
#HRA |
(RS232) |
"String"; |
#HSA |
(SPI) |
|
#HIA |
(I²C) |
The command sends a String or individual codes as ASCII value(s) (8 bits per character).
Send 16-Bit (Unicode) string
#HRU |
(RS232) |
"String"; |
#HSU |
(SPI) |
|
#HIU |
(I²C) |
The command sends a String or individual codes as Unicode value(s) (16 bits per character).
Send 32-Bit signed values (from V1.2)
#HRI |
(RS232) |
Value, Value1... |
#HSI |
(SPI) |
|
#HII |
(I²C) |
The command sends one or more 32-bit signed integer Value(s) (little endian).
Send 32-Bit float values (from V1.2)
#HRT |
(RS232) |
Value, Value1... |
#HST |
(SPI) |
|
#HIT |
(I²C) |
The command sends one or more 32-bit float Value(s) (little endian).
#HRS |
(RS232) |
Number, Data... |
#HSS |
(SPI) |
|
#HIS |
(I²C) |
The command sends a Number of Data directly via the master interface. The data are taken over and sent directly, no interpretation, such as calculation interpretation, takes place.
Send binary data from register (from V1.4)
#HRX |
(RS232) |
Type, Register-ID, Number(1) |
#HSX |
(SPI) |
|
#HIX |
(I²C) |
The command sends a Number of register entries (Register-ID) in binary form via the master interface.
Type |
|||
7 |
Signed Byte |
1 Byte |
little endian |
8 |
Unsigned Byte |
1 Byte |
|
15 |
Signed Integer |
2 Byte |
|
16 |
Unsigned Integer |
2 Byte |
|
23 |
Signed Integer |
3 Byte |
|
24 |
Unsigned Integer |
3 Byte |
|
31 |
Signed Integer |
4 Byte |
|
32 |
Unsigned Integer |
4 Byte |
|
33 |
Float |
4 Byte |
|
115 |
Signed Integer |
2 Byte |
big endian |
116 |
Unsigned Integer |
2 Byte |
|
123 |
Signed Integer |
3 Byte |
|
124 |
Unsigned Integer |
3 Byte |
|
131 |
Signed Integer |
4 Byte |
|
132 |
Unsigned Integer |
4 Byte |
|
133 |
Float |
4 Byte |
Send binary data from array (from V1.4)
#HRY |
(RS232) |
Type, Array-ID, StartIndex(0), Number(all elements) |
#HSY |
(SPI) |
|
#HIY |
(I²C) |
The command sends a Number of array elements (Array-ID), starting with the start index, in binary form via the master interface.
Type |
|||
7 |
Signed Byte |
1 Byte |
little endian |
8 |
Unsigned Byte |
1 Byte |
|
15 |
Signed Integer |
2 Byte |
|
16 |
Unsigned Integer |
2 Byte |
|
23 |
Signed Integer |
3 Byte |
|
24 |
Unsigned Integer |
3 Byte |
|
31 |
Signed Integer |
4 Byte |
|
32 |
Unsigned Integer |
4 Byte |
|
33 |
Float |
4 Byte |
|
115 |
Signed Integer |
2 Byte |
big endian |
116 |
Unsigned Integer |
2 Byte |
|
123 |
Signed Integer |
3 Byte |
|
124 |
Unsigned Integer |
3 Byte |
|
131 |
Signed Integer |
4 Byte |
|
132 |
Unsigned Integer |
4 Byte |
|
133 |
Float |
4 Byte |
Send file
#HRF |
(RS232) |
<Filename> |
#HSF |
(SPI) |
|
#HIF |
(I²C) |
The command sends a file (<Filename>) via the master interface.
Receive data and place it into send buffer
#HRR |
(RS232) |
Number [32-Bit] (max 1024) |
#HSR |
(SPI) |
|
#HIR |
(I²C) |
The command reads a Number (32-bit value) of data from the master receive buffer and places it in the send buffer. The feedback is structured as follows:
ESC |
H |
R/S/I |
R |
Length |
Data 1 |
Data 2 |
... |
Data n |
... |
|
$1B |
$48 |
$52/$53/$49 |
$52 |
32-Bit value |
8-Bit value |
8-Bit value |
8-Bit value |
8-Bit value |
See also mstRA()
Receive 8-Bit data and write it to a string register
#HRB |
(RS232) |
String-ID, Number (max 250) |
#HSB |
(SPI) |
|
#HIB |
(I²C) |
The command reads a Number of data from the master receive buffer and writes them to the specified string register (String-ID).
See also mstRA()
Receive 16-Bit data and write it to a string register (from V1.2)
#HRW |
(RS232) |
String-ID, Number (max 250) |
#HSW |
(SPI) |
|
#HIW |
(I²C) |
The command reads a Number of data from the master receive buffer and writes them to the specified string register (String-ID).
See also mstRA()
Receive binary data and write it to a string register (from V1.4)
#HRV |
(RS232) |
Type, Register-ID, Number(1) |
#HSV |
(SPI) |
|
#HIV |
(I²C) |
The command reads a Number of data from the master receive buffer and writes them to the specified register (Register-ID).
Type |
|||
7 |
Signed Byte |
1 Byte |
little endian |
8 |
Unsigned Byte |
1 Byte |
|
15 |
Signed Integer |
2 Byte |
|
16 |
Unsigned Integer |
2 Byte |
|
23 |
Signed Integer |
3 Byte |
|
24 |
Unsigned Integer |
3 Byte |
|
31 |
Signed Integer |
4 Byte |
|
32 |
Unsigned Integer |
4 Byte |
|
33 |
Float |
4 Byte |
|
115 |
Signed Integer |
2 Byte |
big endian |
116 |
Unsigned Integer |
2 Byte |
|
123 |
Signed Integer |
3 Byte |
|
124 |
Unsigned Integer |
3 Byte |
|
131 |
Signed Integer |
4 Byte |
|
132 |
Unsigned Integer |
4 Byte |
|
133 |
Float |
4 Byte |
See also mstRA()
Receive binary data and write it to an array (from V1.4)+
#HRZ |
(RS232) |
Typ, Array-ID, StartIndex(0), Number(all elements) |
#HSZ |
(SPI) |
|
#HIZ |
(I²C) |
The command reads a Number of data from the master receive buffer and writes them, starting with the start index, into the specified array (Array-ID). An array must be defined before receiving (see #VAI, #VAF).
Type |
|||
7 |
Signed Byte |
1 Byte |
little endian |
8 |
Unsigned Byte |
1 Byte |
|
15 |
Signed Integer |
2 Byte |
|
16 |
Unsigned Integer |
2 Byte |
|
23 |
Signed Integer |
3 Byte |
|
24 |
Unsigned Integer |
3 Byte |
|
31 |
Signed Integer |
4 Byte |
|
32 |
Unsigned Integer |
4 Byte |
|
33 |
Float |
4 Byte |
|
115 |
Signed Integer |
2 Byte |
big endian |
116 |
Unsigned Integer |
2 Byte |
|
123 |
Signed Integer |
3 Byte |
|
124 |
Unsigned Integer |
3 Byte |
|
131 |
Signed Integer |
4 Byte |
|
132 |
Unsigned Integer |
4 Byte |
|
133 |
Float |
4 Byte |