Commands and functions
P.
208 of 349
Special functions
Change
Comobject - communication
object
Convert
This function reacts to changes of the supervised address or variable written to the bus.
Definition
●
Function
change
(
variable
)
Arguments
●
1 argument of arbitrary data type
Effect
●
Return value: ON, if a change of the supervised address or variable is detected. Reset to
OFF after one processing pass of the Enertex
®
EibPC.
Data type result (Return)
●
Data type b01
As a peculiarity, the change function must not depend on if statements with else branch.
Similarly to the event function (see page 168), the change function assumes the value ON only for one processing
pass and then executes the then branch of the if function. At the next pass, change returns to OFF, an the else
branch would be executed. To make programming easier for the user, the usage of the change function is restricted
by the compiler.
The change-Function is activated in next processing cycle of the change of its argument.
Example: Change
If the maximum heating output changes, the flow temperature shall be readjusted.
Implementation in the user program:
if change(HeatingMax) then write("FlowTemperature-0/0/1",HeatingNeed) endif
Definition
●
Function
comobject
(
variable1
,
variable2, [...] )
Arguments
●
all arguments are of the same data type
●
Data type: uXX, sXX and fXX, with XX arbitrary bit length defined on page 92
Effect
●
Return value: The value of the variable which has changed most recently.
Data type result (Return)
●
Data type of arguments
Example: An actuator with multiple variables – determine the status
You want to determine the status of an actuator (1 bit). The actuator is accessed through the
group addresses "GA_a-1/2/3","GA_b-1/2/4" and "GA_c-1/2/5".
If the actuator has been switched on for 3 minutes and has not yet been switched off manually,
it shall be switched off.
Implementation in the user program:
StatusActuator=comobject("GA_a-1/2/3","GA_b-1/2/4","GA_c-1/2/5")
if delay(StatusActuator==EIN,180000u64) and StatusActuator==EIN then write("GA_a-1/2/3",
AUS) endif
Definition
●
Function
convert
(
variable1
,
variable2
)
Arguments
●
2 arguments of arbitrary data type
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]