Commands and functions
P.
234 of 349
GetAddress
Gaimage
Getganame
Definition
●
Function
getaddress
(
Groupaddress
)
Arguments
●
Groupaddress
any imported (or manually given) Group Address
Effect
●
The function is returning the unsigned 16-Bit Value of the groupaddress as its address
number.
Data type result (Return)
●
u16
At 12:00 AM the Group Address 1/1/27 shall be read and at 12:30 a 10% value shall be written
to the same group address
[EibPC]
a=getaddress("Dimmer-1/1/27")
if htime(12,00,00) then read(address(a)) endif
if htime(12,30,00) then write(address(a),16) endif
Note:
Normally you don't need this function, you could directly code read("Dimmer-1/1/27") etc. This function is provided for
enhanced coding styles.
Definition
●
Function
gaimage
(
Number
)
Arguments
●
Number
of data type u16
Effect
●
The function is returning the actual image of a group address stored in the Enertex®
EibPC. The group address of the telegram is given with the variable named
Number
. The
binary data of the telegram is converted into a string (see
convert
) and given as the return
value of this function.
Data type result (Return)
●
c1400
Note:
The
Number
is calculated as address= [main group] x 2048+[middle group] x 256 + [subgroup]. As an example with
[main group]=5, [middle group]=3 and [subgroup]=11 the telegramm imaga of '5/3/11' is addressed. You have to
calculate this number by yourself or you can use the function
getaddress.
Definition
●
Function
getganame
(
Groupaddress, Coding)
Arguments
●
Groupaddress
any imported Group Address
●
Coding
with the usual designation, e.g. $ UTF-8 $ c14 as c14 string, is used to directly
convert the GA to any system encoding.
Effect
●
The function returns the name of the group address in the Enertex® EibPC format when
this group address has been imported into the application program (ESF import)
Data type result (Return)
●
c1400
The name of a group address should be stored as a text in the standard Windows encoding
(iso8859-15) in a variable.
// MyVar=$"VentilateWorking-0/0/2"$
MyVar=getganame("VentilateWorking-0/0/2",$utf-8$c14)
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]