Actions

Inputs as Key Matrix (ICX-AlphaCom)

From Zenitel Wiki

Revision as of 12:16, 10 August 2023 by Asle (talk | contribs)
AI.png

Use Inputs As Key Matrix

If there is a need for more than the 6 inputs available, it is possible to combine inputs in a diode matrix and use the Event Handler to process. By for example using 3 physical inputs it is possible to get 7 virtual inputs.

The different options are:

  • 2 Inputs (input 1-2, Virtual Inputs 1-3)
Input 2 Input 1 Virtual Input triggered
0 1 Virtual Input 1
1 0 Virtual Input 2
1 1 Virtual Input 3
0 0 Inputs released


  • 3 Inputs (input 1-3, Virtual Inputs 1-7):
Diode matrix when using 3 inputs to activate 7 DAK keys
Input 3 Input 2 Input 1 Virtual Input triggered
0 0 1 Virtual Input 1
0 1 0 Virtual Input 2
0 1 1 Virtual Input 3
1 0 0 Virtual Input 4
1 0 1 Virtual Input 5
1 1 0 Virtual Input 6
1 1 1 Virtual Input 7
0 0 0 Inputs released


  • 4 Inputs (input 1-4, Virtual Input 1-15):
Input 4 Input 3 Input 2 Input 1 Virtual Input triggered
0 0 0 1 Virtual Input 1
0 0 1 0 Virtual Input 2
0 0 1 1 Virtual Input 3
0 1 0 0 Virtual Input 4
0 1 0 1 Virtual Input 5
0 1 1 0 Virtual Input 6
0 1 1 1 Virtual Input 7
1 0 0 0 Virtual Input 8
1 0 0 1 Virtual Input 9
1 0 1 0 Virtual Input 10
1 0 1 1 Virtual Input 11
1 1 0 0 Virtual Input 12
1 1 0 1 Virtual Input 13
1 1 1 0 Virtual Input 14
1 1 1 1 Virtual Input 15
0 0 0 0 Inputs released

The Virtual Input actions are configured from the Event Handler.

Events

Two events are required to process inputs as a matrix. Shown below are the events required for 15 inputs (2^4). You can expand this to 63 inputs (2^6) if required.

On button press

Here, we use the serial nature of the Event Handler to process the individual inputs.
By assigning a bitwise value to the input, we can add this value to a UDD associated with the physical number.
As each successive input is processed by the event handler, a total sum is derived.

ICX Matrix1.PNG


Action commands:

IF %op(%sev(1),=,1)
!Input 1
WUDD %1.PHY %op(%udd(%1.PHY),+,1)
ENDIF
IF %op(%sev(1),=,2)
!Input 2
WUDD %1.PHY %op(%udd(%1.PHY),+,2)
ENDIF
IF %op(%sev(1),=,3)
!Input 3
WUDD %1.PHY %op(%udd(%1.PHY),+,4)
ENDIF
IF %op(%sev(1),=,4)
!Input 4
WUDD %1.PHY %op(%udd(%1.PHY),+,8)
ENDIF


On button release

Here, we again rely on the serial processing of the input release.
First we check if the UDD has a value other than 0.
Then we check the value of the UDD and process the required command. This can be a $DD, $DIAL_DAK, $SM or any other DP command.
After the first round of processing, the UDD is returned to 0 so that successive input release commands do not execute.

ICX Matrix2.PNG


Action commands:

IF %udd(%1.phy)
IF %op(%udd(%1.phy),=,1)
!Virtual Input 1
$DD L%1.DIR L101
ENDIF
IF %op(%udd(%1.phy),=,2)
!Virtual Input 2
$DD L%1.DIR L102
ENDIF
IF %op(%udd(%1.phy),=,3)
!Virtual Input 3
$DD L%1.DIR L103
ENDIF
IF %op(%udd(%1.phy),=,4)
!Virtual Input 4
$DD L%1.DIR L104
ENDIF
IF %op(%udd(%1.phy),=,5)
!Virtual Input 5
$DD L%1.DIR L105
ENDIF
IF %op(%udd(%1.phy),=,6)
!Virtual Input 6
$DD L%1.DIR L106
ENDIF
IF %op(%udd(%1.phy),=,7)
!Virtual Input 7
$DD L%1.DIR L107
ENDIF
IF %op(%udd(%1.phy),=,8)
!Virtual Input 8
$DD L%1.DIR L108
ENDIF
IF %op(%udd(%1.phy),=,9)
!Virtual Input 9
$DD L%1.DIR L109
ENDIF
IF %op(%udd(%1.phy),=,10)
!Virtual Input 10
$DD L%1.DIR L110
ENDIF
IF %op(%udd(%1.phy),=,11)
!Virtual Input 11
$DD L%1.DIR L111
ENDIF
IF %op(%udd(%1.phy),=,12)
!Virtual Input 12
$DD L%1.DIR L112
ENDIF
IF %op(%udd(%1.phy),=,13)
!Virtual Input 13
$DD L%1.DIR L113
ENDIF
IF %op(%udd(%1.phy),=,14)
!Virtual Input 14
$DD L%1.DIR L114
ENDIF
IF %op(%udd(%1.phy),=,15)
!Virtual Input 15
$DD L%1.DIR L115
ENDIF
WUDD %1.phy 0
ENDIF


Related information