Actions

Difference between revisions of "Inputs as Key Matrix (ICX-AlphaCom)"

From Zenitel Wiki

(Created page with "{{AI}} ===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...")
 
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{AI}}
 
{{AI}}
===Use Inputs As Key Matrix===
+
==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.  
 
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.  
 
By for example using 3 physical inputs it is possible to get 7 virtual inputs.  
Line 6: Line 6:
 
The different options are:  
 
The different options are:  
  
*2 Inputs (input 1-2, Virtual Inputs 1-3)
+
*'''2 Inputs''' (input 1-2, Virtual Inputs 1-3)
{| border="1" {{table}}
+
{| border="1"
 
| align="center" style="background:#ffd400;"|'''Input 2'''
 
| align="center" style="background:#ffd400;"|'''Input 2'''
 
| align="center" style="background:#ffd400;"|'''Input 1'''
 
| align="center" style="background:#ffd400;"|'''Input 1'''
Line 23: Line 23:
  
  
*3 Inputs (input 1-3, Virtual Inputs 1-7):
+
*'''3 Inputs''' (input 1-3, Virtual Inputs 1-7):
 
[[File:IO as matrix ICX.jpg|thumb|right|500px|Diode matrix when using 3 inputs to activate 7 DAK keys]]  
 
[[File:IO as matrix ICX.jpg|thumb|right|500px|Diode matrix when using 3 inputs to activate 7 DAK keys]]  
{| border="1" {{table}}
+
{| border="1"  
 
| align="center" style="background:#ffd400;"|'''Input 3'''
 
| align="center" style="background:#ffd400;"|'''Input 3'''
 
| align="center" style="background:#ffd400;"|'''Input 2'''
 
| align="center" style="background:#ffd400;"|'''Input 2'''
Line 49: Line 49:
  
  
*4 Inputs (input 1-4, Virtual Input 1-15):
+
*'''4 Inputs''' (input 1-4, Virtual Input 1-15):
{| border="1" {{table}}
+
{| border="1"  
 
| align="center" style="background:#ffd400;"|'''Input 4'''
 
| align="center" style="background:#ffd400;"|'''Input 4'''
 
| align="center" style="background:#ffd400;"|'''Input 3'''
 
| align="center" style="background:#ffd400;"|'''Input 3'''
Line 92: Line 92:
 
The Virtual Input actions are configured from the Event Handler.
 
The Virtual Input actions are configured from the Event Handler.
  
===Events===
+
==Events==
2 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.
+
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==
+
===On button press===
 
Here, we use the serial nature of the Event Handler to process the individual inputs.<br>
 
Here, we use the serial nature of the Event Handler to process the individual inputs.<br>
 
By assigning a bitwise value to the input, we can add this value to a UDD associated with the physical number.<br>
 
By assigning a bitwise value to the input, we can add this value to a UDD associated with the physical number.<br>
Line 101: Line 101:
 
[[File:ICX_Matrix1.PNG|thumb|left|500px]]
 
[[File:ICX_Matrix1.PNG|thumb|left|500px]]
 
<br style="clear:both;" />
 
<br style="clear:both;" />
 +
{{Code2|
 +
IF %op(%sev(1),<nowiki>=</nowiki>,1)
 +
!Input 1
 +
WUDD %1.PHY %op(%udd(%1.PHY),<nowiki>+</nowiki>,1)
 +
ENDIF
 +
IF %op(%sev(1),<nowiki>=</nowiki>,2)
 +
!Input 2
 +
WUDD %1.PHY %op(%udd(%1.PHY),<nowiki>+</nowiki>,2)
 +
ENDIF
 +
IF %op(%sev(1),<nowiki>=</nowiki>,3)
 +
!Input 3
 +
WUDD %1.PHY %op(%udd(%1.PHY),<nowiki>+</nowiki>,4)
 +
ENDIF
 +
IF %op(%sev(1),<nowiki>=</nowiki>,4)
 +
!Input 4
 +
WUDD %1.PHY %op(%udd(%1.PHY),<nowiki>+</nowiki>,8)
 +
ENDIF
 +
}}
  
IF %op(%sev(1),=,1)<br>
+
===On button release===
!Input 1<BR>
 
WUDD %1.PHY %op(%udd(%1.PHY),+,1)<br>
 
ENDIF<br>
 
IF %op(%sev(1),=,2)<br>
 
!Input 2<br>
 
WUDD %1.PHY %op(%udd(%1.PHY),+,2)<br>
 
ENDIF<br>
 
IF %op(%sev(1),=,3)<br>
 
!Input 3<br>
 
WUDD %1.PHY %op(%udd(%1.PHY),+,4)<br>
 
ENDIF<br>
 
IF %op(%sev(1),=,4)<br>
 
!Input 4<br>
 
WUDD %1.PHY %op(%udd(%1.PHY),+,8)<br>
 
ENDIF<br>
 
 
 
==On button release==
 
 
Here, we again rely on the serial processing of the input release.<br>
 
Here, we again rely on the serial processing of the input release.<br>
 
First we check if the UDD has a value other than 0.  <br>
 
First we check if the UDD has a value other than 0.  <br>
Line 126: Line 127:
 
[[File:ICX_Matrix2.PNG|thumb|left|500px]]
 
[[File:ICX_Matrix2.PNG|thumb|left|500px]]
 
<br style="clear:both;" />
 
<br style="clear:both;" />
 +
{{Code2|
 +
IF %udd(%1.phy)
 +
IF %op(%udd(%1.phy),<nowiki>=</nowiki>,1)
 +
!Virtual Input 1
 +
$DD L%1.DIR L101
 +
ENDIF
 +
IF %op(%udd(%1.phy),<nowiki>=</nowiki>,2)
 +
!Virtual Input 2
 +
$DD L%1.DIR L102
 +
ENDIF
 +
IF %op(%udd(%1.phy),<nowiki>=</nowiki>,3)
 +
!Virtual Input 3
 +
$DD L%1.DIR L103
 +
ENDIF
 +
IF %op(%udd(%1.phy),<nowiki>=</nowiki>,4)
 +
!Virtual Input 4
 +
$DD L%1.DIR L104
 +
ENDIF
 +
IF %op(%udd(%1.phy),<nowiki>=</nowiki>,5)
 +
!Virtual Input 5
 +
$DD L%1.DIR L105
 +
ENDIF
 +
IF %op(%udd(%1.phy),<nowiki>=</nowiki>,6)
 +
!Virtual Input 6
 +
$DD L%1.DIR L106
 +
ENDIF
 +
IF %op(%udd(%1.phy),<nowiki>=</nowiki>,7)
 +
!Virtual Input 7
 +
$DD L%1.DIR L107
 +
ENDIF
 +
IF %op(%udd(%1.phy),<nowiki>=</nowiki>,8)
 +
!Virtual Input 8
 +
$DD L%1.DIR L108
 +
ENDIF
 +
IF %op(%udd(%1.phy),<nowiki>=</nowiki>,9)
 +
!Virtual Input 9
 +
$DD L%1.DIR L109
 +
ENDIF
 +
IF %op(%udd(%1.phy),<nowiki>=</nowiki>,10)
 +
!Virtual Input 10
 +
$DD L%1.DIR L110
 +
ENDIF
 +
IF %op(%udd(%1.phy),<nowiki>=</nowiki>,11)
 +
!Virtual Input 11
 +
$DD L%1.DIR L111
 +
ENDIF
 +
IF %op(%udd(%1.phy),<nowiki>=</nowiki>,12)
 +
!Virtual Input 12
 +
$DD L%1.DIR L112
 +
ENDIF
 +
IF %op(%udd(%1.phy),<nowiki>=</nowiki>,13)
 +
!Virtual Input 13
 +
$DD L%1.DIR L113
 +
ENDIF
 +
IF %op(%udd(%1.phy),<nowiki>=</nowiki>,14)
 +
!Virtual Input 14
 +
$DD L%1.DIR L114
 +
ENDIF
 +
IF %op(%udd(%1.phy),<nowiki>=</nowiki>,15)
 +
!Virtual Input 15
 +
$DD L%1.DIR L115
 +
ENDIF
 +
WUDD %1.phy 0
 +
ENDIF
 +
}}
  
IF %udd(%1.phy)<br>
+
== Related information ==
IF %op(%udd(%1.phy),=,1)<br>
+
* [[Keyboard matrix - TKIE-3]]
!Virtual Input 1<BR>
 
$DD L%1.DIR L101<br>
 
ENDIF<br>
 
IF %op(%udd(%1.phy),=,2)<br>
 
!Virtual Input 2<BR>
 
$DD L%1.DIR L102<br>
 
ENDIF<br>
 
IF %op(%udd(%1.phy),=,3)<br>
 
!Virtual Input 3<BR>
 
$DD L%1.DIR L103<br>
 
ENDIF<br>
 
IF %op(%udd(%1.phy),=,4)<br>
 
!Virtual Input 4<BR>
 
$DD L%1.DIR L104<br>
 
ENDIF<br>
 
IF %op(%udd(%1.phy),=,5)<br>
 
!Virtual Input 5<BR>
 
$DD L%1.DIR L105<br>
 
ENDIF<br>
 
IF %op(%udd(%1.phy),=,6)<br>
 
!Virtual Input 6<BR>
 
$DD L%1.DIR L106<br>
 
ENDIF<br>
 
IF %op(%udd(%1.phy),=,7)<br>
 
!Virtual Input 7<BR>
 
$DD L%1.DIR L107<br>
 
ENDIF<br>
 
IF %op(%udd(%1.phy),=,8)<br>
 
!Virtual Input 8<BR>
 
$DD L%1.DIR L108<br>
 
ENDIF<br>
 
IF %op(%udd(%1.phy),=,9)<br>
 
!Virtual Input 9<BR>
 
$DD L%1.DIR L109<br>
 
ENDIF<br>
 
IF %op(%udd(%1.phy),=,10)<br>
 
!Virtual Input 10<BR>
 
$DD L%1.DIR L110<br>
 
ENDIF<br>
 
IF %op(%udd(%1.phy),=,11)<br>
 
!Virtual Input 11<BR>
 
$DD L%1.DIR L111<br>
 
ENDIF<br>
 
IF %op(%udd(%1.phy),=,12)<br>
 
!Virtual Input 12<BR>
 
$DD L%1.DIR L112<br>
 
ENDIF<br>
 
IF %op(%udd(%1.phy),=,13)<br>
 
!Virtual Input 13<BR>
 
$DD L%1.DIR L113<br>
 
ENDIF<br>
 
IF %op(%udd(%1.phy),=,14)<br>
 
!Virtual Input 14<BR>
 
$DD L%1.DIR L114<br>
 
ENDIF<br>
 
IF %op(%udd(%1.phy),=,15)<br>
 
!Virtual Input 15<BR>
 
$DD L%1.DIR L115<br>
 
ENDIF<br>
 
WUDD %1.phy 0<br>
 
ENDIF<br>
 

Latest revision as of 13:17, 10 August 2023

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