TI1 - Bit 0 in Bitmask 0x01
Ti2 - Bit 1 in Bitmask 0x02
TI3 - Bit 2 in Bitmask 0x04
AI1 - Bit 3 in Bitmask 0x08 - getinput(0)
AI2 - Bit 4 in Bitmask 0x10 - getinput(1)
AI3 - Bit 5 in Bitmask 0x20
AI4 - Bit 6 in Bitmask 0x40
AI5 - Bit 7 in Bitmask 0x80
AI6 - Bit 8 in Bitmask 0x0100
AI7 - Bit 9 in Bitmask 0x0200
AI8 - Bit 10 in Bitmask 0x0400
...
The overall Mask is the "OR" of all relevant specific inputs, so you should use 0x07f8 for 8 analog inputs. The description on the Loxone website is short, but not too bad:
getinputevent - Returns a bitmask which contains the changes of inputs (bit 0 = first input of object, starts with text inputs followed by analog inputs).
getinput - Returns the value of the analog input specified in parameter input. (0 = first analog input)
The amount of text input varies with the different program blocks (4, 8, or 16), so the bit position in the mask changes for the analog inputs. For a program with 16 inputs the first analog input AI1 - getinput(0) is using 0x08 in the bitmask. You have to adjust the masks in your code.
Kommentar