Analogue Input #H

Command group to parametrize and read out the analog input of the module. The module has four 12-bit analog inputs. If the analog input changes, a macro can be started, see #MHA.

Read analogue input

(Hardware Analog Read)

#HAR

Channel(0), Number(4)

Set limits/threshold

(Hardware Analog Limit)

#HAL

Channel, Limit1, Limit2, Limit1 [Channel+1], Limit2 [Channel+1], ...

Set hyteresis

(Hardware Analog Hyteresis)

#HAH

Channel, Hysteresis , Hysteresis [Channel+1], ...

Set user value

(Hardware Analog User)

#HAU

Channel, AnalogCount1, UserValue1, AnalogCount2, UserValue2



Read analogue input

#HAR

Channel(0), Number(4)

The command reads out one or more (Number) of analog channels (starting with Channel [0 ... 4]) and places the value in the send buffer. The feedback is structured as follows:

ESC

H

A

R

Channel

Number

Value 1

Value 2

...


$1B

$48

$41

$52

8-Bit value

8-Bit value

16-Bit value

16-Bit value

...

#HAR 0,2

...


See also analog(a)


Set limits/threshold

#HAL

Channel, Limit1, Limit2, Limit1 [Channel+1], Limit2 [Channel+1], ...

For each analog input (Channel), 2 threshold values can be set to call macros (#MHA). The Limits are given in ADC counts.


Set hysteresis

#HAH

Channel, Hysteresis , Hysteresis [Channel+1], ...

Set the Hysteresis for the respective Channel in ADC counts. The default value for each channel is 4. Only after the hysteresis has been exceeded is the respective defined macro is called.


Set user value

#HAU

Channel, AnalogCount1, UserValue1, AnalogCount2, UserValue2

The analog channel returns a value between 0 and 4095. The value range of the output can be adjusted individually with these settings.