I'm using (2) Grey 2-bit Encoders for my home built transponder. The encoders show to be working properly in the SIOC Monitor but on my displays the high digits won't go past 38, low digits go to 76. When I check in the IOCPConsole, one click of the encoders causes the transponder to increase or decrease 2 digits:


High digits
[Click]
259=1 - INPXPNDRHigh
257=3 - High digits
263=336 - XPNDRTOFS
262=158 - XPNDRDISP
257=4 - High digits
263=512 - XPNDRTOFS
262=208 - XPNDRDISP
[Click]
259=0 - INPXPNDRHigh
259=1 - INPXPNDRHigh
257=5 - High digits
263=592 - XPNDRTOFS
262=258 - XPNDRDISP
257=6 - High digits
263=768 - XPNDRTOFS
262=308 - XPNDRDISP
259=0 - INPXPNDRHigh
[Click]
259=1 - INPXPNDRHigh
257=7 - High digits
263=848 - XPNDRTOFS
262=358 - XPNDRDISP
257=8 - High digits
263=1024 - XPNDRTOFS
262=408 - XPNDRDISP
259=0 - INPXPNDRHigh


Low digits
[Click]
260=1 - INPXPNDRLow
258=3 - Low digits
262=103 - XPNDRDISP
258=4 - Low digits
262=104 - XPNDRDISP
[Click]
260=0 - INPXPNDRLow
260=1 - INPXPNDRLow
258=5 - Low digits
262=105 - XPNDRDISP
258=6 - Low digits
262=106 - XPNDRDISP
260=0 - INPXPNDRLow
[Click]
260=1 - INPXPNDRLow
258=7 - Low digits
262=107 - XPNDRDISP
258=8 - Low digits
262=108 - XPNDRDISP
260=0 - INPXPNDRLow


I copied this code from the OpenCockpits website. I'm not sure if its something in the code causing the problem. I don't know what else it could be. I'm using a repaint of the FSX default 737. Also using Project Magenta PFD, CDU, FMC and pmSystems. On the FSX transponder and the PM FMC display the high digits won't go past 27, then jumps back to 20. The low digits don't change from 00

Jerry

// *****************************************************************************
// * Config_SIOC ver 1.98 - By Manolo Vélez - www.opencockpits.com
// *****************************************************************************
//
// ** Transponder using 2 rotary encoders
// ** 1 for High digits and 1 for Low
// ** Sourced from the Opencockpits Forum website
//

Var 0121, Value 12 // High digits
{
CALL &XPNDRCALC
}

Var 0122, Value 0 // Low digits
{
CALL &XPNDRCALC
}

Var 0125, name INPXPNDRHigh, Link IOCARD_ENCODER, Input 124, Aceleration 1, Type 2 // Input High
{
L0 = &INPXPNDRHigh * 1 // -1 will change direction of rotation
V0121 = V0121 + L0
V0121 = ROTATE 0 ,77 ,L0
}

Var 0126, name INPXPNDRLow, Link IOCARD_ENCODER, Input 118, Aceleration 1, Type 2 // Input Low
{
L0 = &INPXPNDRLow * 1 // -1 will change direction of rotation
V0122 = V0122 + L0
V0122 = ROTATE 0 ,77 ,L0 // numbers will range from 0 to 77 then back to 0
}

Var 0129, Link IOCARD_SW, Input 215 // VFR button
{
&XPNDRDISP = 1200 // VFR Code (CH 7000, USA 1200, Germany 0021)
&XPNDRTOFS = TOBCD &XPNDRDISP
}

Var 0130, name XPNDRDISP, Link IOCARD_DISPLAY, Digit 123, Numbers 4 // Display
{
L0 = &XPNDRDISP
}

Var 0131, name XPNDRTOFS, Link FSUIPC_INOUT, Offset $0354, Length 2 // XPNDR
{
L0 = &XPNDRDISP
}

Var 0132, name XPNDRIN, Value 7000 // XPNDR Input from FS

Var 0133, Link FSUIPC_OUT, Offset $7b93, Length 4 // IDT button for Squawkbox

Var 0134, Link IOCARD_SW, Input 113 // IDT button
{
V0133 = V0134
}

Var 0138, name XPNDRCALC, Link SUBRUTINE // Code calculation
{
L0 = V0121 * 50
L1 = V0122 + L0
&XPNDRTOFS = TOBCD L0
&XPNDRDISP = L1
}