Actions

Difference between revisions of "%chg"

From Zenitel Wiki

(Examples)
(Examples)
Line 8: Line 8:
  
 
===Examples===
 
===Examples===
%udd(8)          - ''Returns the content of UDD variable 8''
 
%udd(%1.phy)      - ''Returns the content of UDD variable in indexed by the physical number of the event 'Owner'''
 
%udd(myLabel)    - ''Return string/value of UDD label myLabel. (wudd "myLabel" "Hello World")
 
 
 
 
  LOG “Door %1.dir is %chg(OPEN ,CLOSED)“
 
  LOG “Door %1.dir is %chg(OPEN ,CLOSED)“
 
  Result, event ON: - “Door 123 is OPEN ”
 
  Result, event ON: - “Door 123 is OPEN ”

Revision as of 14:14, 16 December 2020

AI.png

The %udd macro is used in the Event Handler to read the value of an UDD (User Defined Data variable). Text formatting parameters can be added at the end.
From AMC 11.02 also alphanumeric labeling can be used. Alphanumeric labeling will be cleared after reset.

Syntax

%chg(ON_txt,OFF_txt)

Returns "ON_txt" when the event goes ON, "OFF_txt" when the event goes OFF

Examples

LOG “Door %1.dir is %chg(OPEN ,CLOSED)“
Result, event ON: - “Door 123 is OPEN ”
Result, event OFF: - “Door 123 is CLOSED”

See also

Applications were UDD are used:

Related articles:

  • Built-in command to write to UDD: WUDD
  • Data message to write to UDD: $WUDD
  • Variable for text string: tmp


Back to Event_Handler#List_of_macros.




%chg(ON_txt,OFF_txt) returns "ON_txt" when the event goes ON, "OFF_txt" when the event goes OFF
Example: LOG “Door %1.dir is %chg(OPEN ,CLOSED)“
Result, event ON: - “Door 123 is OPEN ”
Result, event OFF: - “Door 123 is CLOSED”