You can use macros to trigger specific events when specific buttons on a call station keypad are pressed or released. A macro is always linked to a button at the keypad. The 'Use_Macro' flag has to be enabled for the corresponding button.
To enable the execution of a macro
- Open the 'Digital Input Mode (Keypad)' or 'Virtual Keypad' of a station.
- Select a button and right-click with the mouse.
- Choose 'Flags' -> 'USE_MACRO'.
There is no need to enter the macros in pure text form, use the Macro definition dialog to simplify the configuration:
Configuring a keypad macro
- Open the 'Digital Input Mode (Keypad)' or 'Virtual Keypad' of a station.
- Right-click on the required button.
- Select 'Flags', then 'USE_MACRO'.
- Specify the macro in the 'Macro Definitions' dialog.
See chapter 'Play audio in zones using logic control inputs'
To define a macro
- Open the 'Macro definitions' dialog.
- Place the cursor in the 'Normal Mode' -> 'Press' text field.
- Choose a macro from the drop-down menu and specify the parameters
- Click 'Add' to apply the macro.
To add a second macro
- Place the cursor in the 'Normal Mode' -> 'Press' text field.
- Click on the 'Arrow to the right' button close to the text field.
- Choose a macro from the drop-down menu and specify the parameters
- Click 'Add' to apply the macro.
Use the arrow keys to navigate through the configured macros. The function and parameters will be decoded and displayed in the drop-down field menu. Parameter adjustments can be made here.
If the macro is placed in the 'Press' area of the field, it will run when the button is pressed, physically on a keypad or virtually via the EmulateKeypadKey function. If it is placed in the 'Release' area, it will run when you release the button.
- A macro consists of a unique macro identifier and individual parameters.
- Macros are separated by the ';' character. No blanks are allowed between macros.
- For each button, separate macros support three events when the button is pressed and three events when it is released.
- A macro which invokes a button with a defined macro is possible. The recursion depth is limited to five recursive calls, see chapter 'System limits'.
- It is possible to run another macro key with a macro, although there is a depth limit of five recursive calls.
- 16 bit values (words) must be stored in little endian format.
- Bytes are separated with a '$'.
The firmware is able to process hex strings up to four digits long. Leading zeros must be included!
Max length: the length of the macro is limited to 100 characters, if this limit is exceeded the error message appears "would exceed MaxLength of macro"
Max Emulate Keys: Maximum 5 remote EmuKey macros on one key are usable. The local usage is restricted to 10.
Example:
The definition of 'E$FE$012D' sends an EmuKey command to station 301 with 0xFE as the button index.
Parameter | Value | Description |
---|---|---|
Macro ID | E | EmuKey |
Byte 0 | FE | KeyIndex = FE |
Byte 1/2 | 012D | StationID 012D hex = 301 dec |
Macro ID | Additional params | Description | Supported button modes |
---|---|---|---|
'A' asc(65), 0x41 | Select all configured zones for this station | Select all zones while active For PlaySound and PlaySound_SD files after playing the file, the zones are cleared automatically | PlaySound_FLASH TalkButtonPlaySound_SD PushButtonSwitch L>H: 'Talk2' Button (2) |
'a' asc(97) 0x61 | Byte0: stateID MSB(b7) of stateID used to allow key but avoid further macro processing stateID=1: localAlarmState Byte1: stateValue 0: No alarm (no local alarm since start) 1 Alarm currently triggered 2 Alarm currently silenced 3 Alarm currently reset 4 Alarm stopped by BMZ 5 Alarm manually stopped StateID=2: zoneSelection Byte1: zoneSelectID 0: allow if all zones selected 1: allow if not all zones selected StateID=3: macroFlag Byte1: 0: allow if MacroFlag is set 1: allow if MacroFlag is not set | Allow key on specified state This key could be only activated if a given state is present on the local station or within the global system no further macros are processed 'Allow key only if a given state is present on the local station or within the global system' | PlaySound_SD, PlaySound_FLASH 'Talk' / 'Talk2' Button PushButton Switch L>H, Macro_mode Zone Select (2) FW1.3B5-1 supports suppressing of macro processing via MSB |
‘B’ asc(66) 0x42 | Byte0: behaviour 0=muted 1=normal 2=priority mode 0xFF=toggle between mute&normal Byte1: outputmask Byte2-3: stationID (0=SuppSelf) | Behavior set to given value 'Change the behaviour of a specific output' . In PRG mode only. | Macro_Mode |
'c' asc(99) 0x63 | Byte0: 0: Clear all states 1-240 1: Clear 5416-Alarm states 2: Reset all pressed buttons No release macros are processed 3: Reset all LEDs (not available for all modes) 251: Reset affected pressed buttons Same as 2:, but only affected buttons are cleared e.g. PT2009 clear only own buttons 252: Reset all affected LEDs 253: Reset(erase) errorLogging | Used to clear pending EN 54-16 states e.g. silencing active... 'Clear all or specific states present on this station' | Macro_Mode, 'Talk' / 'Talk2' Button, PushButton Switch L>H, Macro_mode Zone Select (2) |
‘C’ asc(67) 0x43 | Byte0: channelNo Byte1: outputmask Byte2-3: stationID (0=SuppSelf) MSB(b15) of station ID used in Switch L>H mode: Switch L>H: LED lights up if chosen channel is active | Channel set to given value 'Change the PRG-channel of a specific output‘'
MSB(b15) used in combination in L-H keymode to set channel to 1st L-H transition, and reset channel(0) to next L-H transition | Macro_Mode |
'd' asc(100) 0x64 | Byte0: activationMask Byte1: activationState | Usable to activate/deactivate the given delay setting on requested output | |
'E' asc(69) 0x45 | Byte0 KeyIndex Byte1/2: StationID (0= SuppSelf (1)) | EmuKey 'A button with the given index on the specified station is pressed or released' | Macro_Mode, TalkButton, Zone SelectPlaySound_SD PlaySound_FLASH 'Talk2' Button PushButton Switch L>H (2) Invert logic option supported |
‘l’ asc(108) 0x6C | Byte0: VarID 0=analog input value, values>127 set the LED 1=logic control input 2=logic control output 3=station error state bit 4=activeWavFileNo(local only) 5=keyState 6=MuteState (taken from outBehaviour) Byte1:inp.Number/bitNo/wavNo DigIO/AnaIn: 1..x (dep. on ID) BitNumber of req.errorBit Range: 1...32 WAVNo(0-255)0=any channel keyIndex: 136...255 outputNo(1-4) Byte2-3: stationID (0=SuppSelf) MSB(b15) of station ID used to set the yellow LED instead of the green one | ledStateInput 'Set the green LED State depending on a specific input' | Macro_Mode SID=0=SuppSelf 1 |
'L' asc(76) 0x4C | Byte0: VarID 0=AnyLED 1=redLED 2=greenLED 3=yell/orangeLED Byte1: inputNumber LED: 136…255 Byte2-3: stationID (0=SupportSelf (1)) | LEDState 'Retrieve the LEDState from a specific input' | Macro_Mode |
'N' asc(78) 0x4E | Deselect all activated zones for this station | Clear all zones 'Select no zones' | PlaySound_FLASH, PlaySound_SD, Macro_Mode 'Talk' / 'Talk2' Button PushButton Switch L>H (2) |
'p' asc(112) 0x70 | Pre- and Post-Signalisation Byte0: PreSignalisation if Press PostSignalisation if Release | 'Pre- and Post-Signalization' 0=none 1...4: 001.wav-004.wav 5: internal flash (max 3 seconds) 6…7: Synthetic sound | 'Talk', 'Talk2' Button (2) V1.2B10 supports local signalisation via MSB |
'R' asc(82) 0x52 | Reset audible warning – able to reset the local buzzer | To handle a local buzzer on audible warning. 'Reset the local buzzer' | Macro_Mode |
'S' asc(83), 0x53 | Silencing Byte0: 0... Only silence active Sound 1… F3033-compliant silencing and buzzer reset, LEDState=silence 2... EN 54-16 silencing (prepared) | While a SD-Card File is played this macro silence the sound and keep the feed 'This macro silences the sound, but keeps the feed active' | Macro_Mode PlaySound_FLASH PlaySound_SD |
'T' Asc(84) 0x54 | - | Talk key. The state of Talk-key corresponds with the state of the Keypad input state 'In addition to this button, a configured Talk button is also pressed.' | Zone Select, Macro_Mode |
't' asc(116) 0x74 | Byte0: timeout value in 10 s resolution [10...2400] s = 40 min 0 = not allowed | Talk timeout 'An active state of this button is canceled after the given timeout' | 'Talk', 'Talk2' Button (2) |
‘V’ asc(86) 0x56 | Byte0: modType (abs=1, inc=2, dec=3, useScale=4) Byte1: value in ½ dB 5=2.5dB Byte2: outputmask Byte3-4: stationID(0=SuppSelf) | Volume 'Increase or decrease the volume of the specified output channel' | Macro_Mode |
‘Y’ Asc(89) 0x59 | Set SysVar | Set specific SysVar 0...set local LEDTestMode (activates all yellow LEDs +buzzer for 5 sec) 1...set all concerned local zones Could be used together with zone keys to select all zone keys which include the zone in the pressed key 2...set Macro Flag 3...reset Macro Flag 4…set local LEDTestMode2 (activates all yellow LEDs + buzzer as long as button is pressed, needs to be configured in press and release macro) | Macro_Mode |