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)

#HRP

Baudrate [32-Bit]

Set SPI parameters

(Hardware Spi Parameter)

#HSP

Frequency, Mode, DataOrder

Set SPI chip select

(Hardware Spi Chipselect)

#HSC

ChipSelect

Set I²C parameters

(Hardware I²C Parameter)

#HIP

Address, Frequency

Send 8-Bit (ASCII) string

(Hardware RS232/SPI/I²C  Ascii)

#HRA

"String";

#HSA

#HIA

Send 16-Bit (Unicode) string

(Hardware RS232/SPI/I²C Unicode)

#HRU

"String";

#HSU

#HIU

Send 32-Bit signed values

(Hardware RS232/SPI/I²C Integer)

#HRI

Value, Value1...

#HSI

#HII

Send 32-Bit float values

(Hardware RS232/SPI/I²C floaT)

#HRT

Value, Value1...

#HST

#HIT

Send binary data

(Hardware RS232/SPI/I²C Send binary)

#HRS

Number, Data...

#HSS

#HIS

Send binary data from register

(Hardware RS232/SPI/I²C send values)

#HRX

Type, Register-ID, Number(1)

#HSX

#HIX

Send binary data from array

(Hardware RS232/SPI/I²C send array)

#HRY

Type, Array-ID, StartIndex(0), Number(all elements)

#HSY

#HIY

Send file

(Hardware RS232/SPI/I²C send File)

#HRF

<Filename>

#HSF

#HIF

Receive data and place into send buffer

(Hardware RS232/SPI/I²C Receive to buffer)

#HRR

Number [32-Bit] (max 1024)

#HSR

#HIR

Receive 8-bit data and write it to a string register

(Hardware RS232/SPI/I²C Bytes to string)

#HRB

String-ID, Number (max 250)

#HSB

#HIB

Receive 16-bit data and write it to a string register

(Hardware RS232/SPI/I²C Words to string)

#HRW

String-ID, Number (max 250)

#HSW

#HIW

Receive binary data and write it to a register

(Hardware RS232/SPI/I²C Values to register)

#HRV

Type, Register-ID, Number(1)

#HSV

#HIV

Receive binary data and write it to an array

(Hardware RS232/SPI/I²C Values to array)

#HRZ

Typ, Array-ID, StartIndex(0), Number(all elements)

#HSZ

#HIZ



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


Set SPI chip select

#HSC

ChipSelect

The command defines the ChipSelect setting:

ChipSelect

0

Low

1

High

2

Automatic (low active)


Set I²C parameters

#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

#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

#HRT

(RS232)

Value, Value1...

#HST

(SPI)

#HIT

(I²C)

The command sends one or more 32-bit float Value(s) (little endian).



Send binary data

#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

#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

#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

#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

#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

#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