ncleme
11-09-2008, 05:42 AM
This is a work in progress version, but might be of interest
// *****************************************************************************
// * Config_SIOC ver 3.5 - By Manolo Vélez - www.opencockpits.com
// *****************************************************************************
// * FileName : k.txt
// * Date : 09/11/2008
Var 0002, name Multioffset, Link FSUIPC_INOUT, Offset $53FE, Length 2
Var 0000, Value 0
{
V0401 = 0 // COURSE LEFT VALUE
V0406 = 0 // COURSE RIGHT VALUE
V0403 = 0 // HDG VALUE
V0902 = 0 // ALT VALUE
V0901 = 100 // IAS VALUE
V0903 = 0 // VS VALUE
&SUB_DH = 3000
&SUB_BAR = 1023
&SUB2_DH = 3000
&SUB2_BAR = 1023
}
Var 0001, Link FSUIPC_INOUT, Offset $53A8, Length 2 // VS value
Var 0004, Link FSUIPC_INOUT, Offset $53A0, Length 2 // IAS
Var 0054, Link FSUIPC_INOUT, Offset $6DAC, Length 2 // COURSE LEFT
Var 0055, Link FSUIPC_INOUT, Offset $53A2, Length 2 // HDG
Var 0056, Link FSUIPC_INOUT, Offset $53A4, Length 2 // ALT
Var 0059, Link FSUIPC_INOUT, Offset $6DAE, Length 2 // COURSE RIGHT
Var 0060, Link FSUIPC_INOUT, Offset $531A, Length 1 // MCP F/D Left switch
Var 0061, Link FSUIPC_INOUT, Offset $6DB4, Length 1 // MCP F/D Right switch
Var 0200, Link IOCARD_SW, Input 33 // Switch A/T
{
IF V0200 = 1
{
V0062 = 1
}
ELSE
{
V0062 = 1
}
}
Var 0201, Link IOCARD_SW, Input 16 // MCP F/D Left switch
{
IF V0201 = 1
{
V0060 = 1
}
ELSE
{
V0060 = 1
}
}
Var 0062, Link FSUIPC_INOUT, Offset $531B, Length 1 // MCP A/T OFFSET
Var 0063, Link FSUIPC_IN, Offset $531B, Length 1 // MCP A/T LED
{
IF V0063 = 1
{
V0500 = 1
}
ELSE
{
V0500 = 0
}
}
Var 0064, Link FSUIPC_INOUT, Offset $532F, Length 1 // MCP N1 OFFSET
Var 0065, Link FSUIPC_IN, Offset $5330, Length 1 // MCP N1 LED
{
IF V0065 = 1
{
V0506 = 1
}
IF V0065 = 0
{
V0506 = 0
}
}
Var 0066, Link FSUIPC_INOUT, Offset $5317, Length 1 // MCP Speed OFFSET
Var 0067, Link FSUIPC_IN, Offset $5318, Length 1 // MCP Speed LED
{
IF V0067 = 1
{
V0505 = 1
}
IF V0067 = 0
{
V0505 = 0
}
}
Var 0068, Link FSUIPC_INOUT, Offset $5320, Length 1 // MCP LVL Change OFFSET
Var 0069, Link FSUIPC_IN, Offset $5321, Length 1 // MCP LVL CHG LED
{
IF V0069 = 1
{
V0512 = 1
}
IF V0069 = 0
{
V0512 = 0
}
}
Var 0070, Link FSUIPC_INOUT, Offset $5312, Length 1 // MCP Heading OFFSET
Var 0071, Link FSUIPC_IN, Offset $5313, Length 1 // MCP Heading LED
{
IF V0071 = 1
{
V0511 = 1
}
IF V0071 = 0
{
V0511 = 0
}
}
Var 0072, Link FSUIPC_INOUT, Offset $531C, Length 1 // MCP LNAV OFFSET
Var 0073, Link FSUIPC_IN, Offset $531D, Length 1 // MCP LNAV LED
{
IF V0073 = 1
{
V0510 = 1
}
IF V0073 = 0
{
V0510 = 0
}
}
Var 0074, Link FSUIPC_INOUT, Offset $531E, Length 1 // MCP VNAV OFFSET
Var 0075, Link FSUIPC_IN, Offset $531F, Length 1 // MCP VNAV LED
{
IF V0075 = 1
{
V0513 = 1
}
IF V0075 = 0
{
V0513 = 0
}
}
Var 0076, Link FSUIPC_INOUT, Offset $5322, Length 1 // MCP VOR LOC OFFSET
Var 0077, Link FSUIPC_IN, Offset $5323, Length 1 // MCP VOR LOC LED
{
IF V0077 = 1
{
V0509 = 1
}
IF V0077 = 0
{
V0509 = 0
}
}
Var 0078, Link FSUIPC_INOUT, Offset $5324, Length 1 // MCP APP OFFSET
Var 0079, Link FSUIPC_IN, Offset $5325, Length 1 // MCP APP LED
{
IF V0079 = 1
{
V0508 = 1
}
IF V0079 = 0
{
V0508 = 0
}
}
Var 0080, Link FSUIPC_INOUT, Offset $5314, Length 1 // MCP Altitude Hold OFFSET
Var 0081, Link FSUIPC_IN, Offset $5315, Length 1 // MCP Altitude Hold LED
{
IF V0081 = 1
{
V0507 = 1
}
IF V0081 = 0
{
V0507 = 0
}
}
Var 0082, Link FSUIPC_INOUT, Offset $5326, Length 1 // MCP V/S OFFSET
Var 0083, Link FSUIPC_IN, Offset $5327, Length 1 // MCP V/S LED
{
IF V0083 = 1
{
V0502 = 1
}
IF V0083 = 0
{
V0502 = 0
}
}
Var 0084, Link FSUIPC_INOUT, Offset $530E, Length 1 // MCP OFFSET
Var 0087, Link FSUIPC_IN, Offset $530F, Length 1 // MCP CMD A LED
{
IF V0087 = 1
{
V0514 = 1
}
IF V0087 = 0
{
V0514 = 0
}
}
Var 0088, Link FSUIPC_IN, Offset $530F, Length 1 // MCP CMD B LED
{
IF V0088 = 1
{
V0515 = 1
}
IF V0088 = 0
{
V0515 = 0
}
}
Var 0202, Link IOCARD_SW, Input 16, Type P // Boton V/S
{
IF V0202 = 1
{
V0082 = 1
}
IF V0202 = 1
{
V0082 = 1
}
}
Var 0203, Link IOCARD_SW, Input 28, Type P // Boton SPEED
{
IF V0203 = 1
{
V0066 = 1
}
IF V0203 = 1
{
V0066 = 1
}
}
Var 0204, Link IOCARD_SW, Input 5, Type P // Boton N1
{
IF V0204 = 1
{
V0064 = 1
}
IF V0204 = 1
{
V0064 = 1
}
}
Var 0205, Link IOCARD_SW, Input 3, Type P // Boton LVL CHG
{
IF V0205 = 1
{
V0068 = 1
}
IF V0205 = 1
{
V0068 = 1
}
}
Var 0206, Link IOCARD_SW, Input 10, Type P // Boton HDG
{
IF V0206 = 1
{
V0070 = 1
}
IF V0206 = 1
{
V0070 = 1
}
}
Var 0207, Link IOCARD_SW, Input 9, Type P // Boton ALT HOLD
{
IF V0207 = 1
{
V0080 = 1
}
IF V0207 = 1
{
V0080 = 1
}
}
Var 0208, Link IOCARD_SW, Input 15, Type P // Boton APP
{
IF V0208 = 1
{
V0078 = 1
}
IF V0208 = 1
{
V0078 = 1
}
}
Var 0209, Link IOCARD_SW, Input 23, Type P // Boton VORLOC
{
IF V0209 = 1
{
V0076 = 1
}
IF V0209 = 1
{
V0076 = 1
}
}
Var 0210, Link IOCARD_SW, Input 0, Type P // Boton LNAV
{
IF V0210 = 1
{
V0072 = 1
}
IF V0210 = 1
{
V0072 = 1
}
}
Var 0211, Link IOCARD_SW, Input 7, Type P // Boton VNAV
{
IF V0211 = 1
{
V0074 = 1
}
IF V0211 = 1
{
V0074 = 1
}
}
Var 0213, Link IOCARD_SW, Input 12, Type P // Boton CMDA
{
IF V0213 = 1
{
V0084 = 1
}
}
Var 0214, Link IOCARD_SW, Input 13, Type P // Boton CMDB
{
IF V0214 = 1
{
V0084 = 2
}
}
Var 0216, Link IOCARD_SW, Input 101 // MCP F/D Right switch
{
IF V0216 = 1
{
V0061 = 1
}
ELSE
{
V0061 = 1
}
}
Var 0300, Link IOCARD_ENCODER, Input 105, Aceleration 2, Type 2 // Encoder VS
{
L0 = V0300 * -100
V0903 = LIMIT -9000 ,9000 ,L0
V0903 = V0903 + L0
}
Var 0301, Link IOCARD_ENCODER, Input 30, Aceleration 4, Type 2 // Encoder COURSE LEFT
{
L0 = V0301 * 1
V0401 = ROTATE 0 ,360 ,L0
}
Var 0302, Link IOCARD_ENCODER, Input 19, Aceleration 4, Type 2 // IAS
{
L0 = V0302 * 1
V0901 = V0901 + L0
}
Var 0303, Link IOCARD_ENCODER, Input 33, Aceleration 4, Type 2 // Encoder HDG
{
L0 = V0303 * 1
V0403 = ROTATE 0 ,360 ,L0
}
Var 0304, Link IOCARD_ENCODER, Input 1, Aceleration 4, Type 2 // Encoder ALT
{
L0 = V0304 * 100
V0902 = LIMIT 0 ,50000 ,L0
}
Var 0305, Link IOCARD_ENCODER, Input 105, Aceleration 4, Type 2 // Encoder COURSE RIGHT
{
L0 = V0305 * 1
V0406 = ROTATE 0 ,360 ,L0
}
Var 0401, Link IOCARD_DISPLAY, Digit 0, Numbers 3 // DISPLAY COURSE LEFT
{
V0054 = V0401
}
Var 0402, Link IOCARD_DISPLAY, Digit 3, Numbers 3 // DISPLAY IAS
Var 0403, Link IOCARD_DISPLAY, Digit 6, Numbers 3 // DISPLAY HEADING
{
V0055 = V0403
}
Var 0404, Link IOCARD_DISPLAY, Digit 9, Numbers 5 // DISPLAY ALT
Var 0406, Link IOCARD_DISPLAY, Digit 19, Numbers 3 // DISPLAY COURSE RIGHT
{
V0059 = V0406
}
Var 0408, Link IOCARD_DISPLAY, Digit 14, Numbers 5 // DISPLAY VS
Var 0500, Link IOCARD_OUT, Output 12 // Led A/T
Var 0502, Link IOCARD_OUT, Output 41 // Led boton V/S
Var 0505, Link IOCARD_OUT, Output 23 // Led SPEED
Var 0506, Link IOCARD_OUT, Output 21 // Led N1
Var 0507, Link IOCARD_OUT, Output 43 // Led ALT HOLD
Var 0508, Link IOCARD_OUT, Output 29 // Led APP
Var 0509, Link IOCARD_OUT, Output 31 // Led VORLOC
Var 0510, Link IOCARD_OUT, Output 15 // Led LNAV
Var 0511, Link IOCARD_OUT, Output 25 // Led HDG
Var 0512, Link IOCARD_OUT, Output 51 // Led LVL CHG
Var 0513, Link IOCARD_OUT, Output 17 // Led VNAV
Var 0514, Link IOCARD_OUT, Output 35 // Led CMDA
Var 0515, Link IOCARD_OUT, Output 47 // Led CMDB
Var 0901, Link SUBRUTINE // D_IAS
{
V0402 = V0901 // D_IAS
L0 = V0901
V0004 = L0
}
Var 0902, Link SUBRUTINE // function ALT
{
V0404 = V0902 // D_ALT
L0 = V0902 / 100
V0056 = L0
}
Var 0903, Link SUBRUTINE // D_V/S
{
V0408 = V0903 // D_V/S
L0 = V0903
V0001 = L0
}
Var 5500, name I_5, Link IOCARD_SW, Device 1, Input 0
{
IF &I_5 = 1
{
&Multioffset = 41
}
}
Var 5502, name I_10, Link IOCARD_SW, Device 1, Input 1
{
IF &I_10 = 1
{
&Multioffset = 42
}
}
Var 5504, name I_20, Link IOCARD_SW, Device 1, Input 2
{
IF &I_20 = 1
{
&Multioffset = 43
}
}
Var 5506, name I_40, Link IOCARD_SW, Device 1, Input 3
{
IF &I_40 = 1
{
&Multioffset = 44
}
}
Var 5508, name I_80, Link IOCARD_SW, Device 1, Input 4
{
IF &I_80 = 1
{
&Multioffset = 45
}
}
Var 5510, name I_160, Link IOCARD_SW, Device 1, Input 5
{
IF &I_160 = 1
{
&Multioffset = 46
}
}
Var 5512, name I_320, Link IOCARD_SW, Device 1, Input 6
{
IF &I_320 = 1
{
&Multioffset = 47
}
}
Var 5514, name I_640, Link IOCARD_SW, Device 1, Input 7
{
IF &I_640 = 1
{
&Multioffset = 48
}
}
Var 5516, name I_APP, Link IOCARD_SW, Device 1, Input 9
{
IF &I_APP = 1
{
&Multioffset = 5
}
}
Var 5518, name I_VOR, Link IOCARD_SW, Device 1, Input 10
{
IF &I_VOR = 1
{
&Multioffset = 3
}
}
Var 5520, name I_MAP, Link IOCARD_SW, Device 1, Input 11
{
IF &I_MAP = 1
{
&Multioffset = 1
}
}
Var 5522, name I_PLN, Link IOCARD_SW, Device 1, Input 12
{
IF &I_PLN = 1
{
&Multioffset = 4
}
}
Var 5524, name I_S1, Link IOCARD_SW, Device 1, Input 27
{
IF &I_S1 = 1
{
&Multioffset = 90 // STA
}
}
Var 5526, name I_S2, Link IOCARD_SW, Device 1, Input 28
{
IF &I_S2 = 1
{
&Multioffset = 93 // WPT
}
}
Var 5528, name I_S3, Link IOCARD_SW, Device 1, Input 29
{
IF &I_S3 = 1
{
&Multioffset = 6 // CTR
}
}
Var 5530, name I_S4, Link IOCARD_SW, Device 1, Input 30
{
IF &I_S4 = 1
{
&Multioffset = 94 // ARPT
}
}
Var 5532, name I_S5, Link IOCARD_SW, Device 1, Input 31
{
IF &I_S5 = 1
{
}
}
Var 5534, name I_S6, Link IOCARD_SW, Device 1, Input 32
{
IF &I_S6 = 1
{
&Multioffset = 95 // DATA
}
}
Var 5536, name I_S7, Link IOCARD_SW, Device 1, Input 33
{
IF &I_S7 = 1
{
&Multioffset = 96 // POS
}
}
Var 5538, name I_SR1, Link IOCARD_SW, Device 1, Input 34
{
IF &I_SR1 = 1
{
&Multioffset = 14 // FPV
}
}
Var 5540, name I_SR2, Link IOCARD_SW, Device 1, Input 38
{
IF &I_SR2 = 1
{
&Multioffset = 26 // MTRS
}
}
Var 5542, name I_BARONSW, Link IOCARD_SW, Device 1, Input 22
{
IF &I_BARONSW = 1
{
&SUB_BAR = 1013
L0 = 1013 * 16
L0 = L0 + 1
&FS_QNH = L0
}
}
Var 5544, name I_MINSW, Link IOCARD_SW, Device 1, Input 25
{
IF &I_MINSW = 1
{
&SUB_DH = 3000
}
}
Var 5546, name I_VOR1, Link IOCARD_SW, Device 1, Input 36
{
IF &I_VOR1 = 1
{
&Multioffset = 75
}
ELSE
{
IF &I_ADF1 = 0
{
&Multioffset = 73
}
}
}
Var 5548, name I_ADF1, Link IOCARD_SW, Device 1, Input 37
{
IF &I_ADF1 = 1
{
&Multioffset = 74
}
ELSE
{
IF &I_VOR1 = 0
{
&Multioffset = 73
}
}
}
Var 5550, name I_VOR2, Link IOCARD_SW, Device 1, Input 18
{
IF &I_VOR2 = 1
{
&Multioffset = 78
}
ELSE
{
IF &I_ADF2 = 0
{
&Multioffset = 76
}
}
}
Var 5552, name I_ADF2, Link IOCARD_SW, Device 1, Input 19
{
IF &I_ADF2 = 1
{
&Multioffset = 77
}
ELSE
{
IF &I_VOR2 = 0
{
&Multioffset = 76
}
}
}
Var 5600, name E_BARO, Link IOCARD_ENCODER, Device 1, Input 20, Aceleration 1, Type 2
{
L0 = &E_BARO * -1
&SUB_BAR = &SUB_BAR + L0
}
Var 5602, name E_MIN, Link IOCARD_ENCODER, Device 1, Input 23, Aceleration 1, Type 2
{
L0 = &E_MIN * -100
&SUB_DH = &SUB_DH + L0
}
Var 1000, name SUB_DH, Link SUBRUTINE
{
IF &SUB_DH > 20000
{
&SUB_DH = 20000
}
IF &SUB_DH < 0
{
&SUB_DH = 0
}
L0 = DIV &SUB_DH ,100
&PM_DH = L0
}
Var 1002, name SUB_BAR, Link SUBRUTINE
{
L0 = &SUB_BAR * 16
&FS_QNH = L0
}
Var 1004, name SUB2_DH, Link SUBRUTINE
{
IF &SUB2_DH > 20000
{
&SUB2_DH = 20000
}
IF &SUB2_DH < 0
{
&SUB2_DH = 0
}
L0 = DIV &SUB2_DH ,100
&PM2_DH = L0
}
Var 1006, name SUB2_BAR, Link SUBRUTINE
{
L0 = &SUB2_BAR * 16
&FS2_QNH = L0
}
Var 1201, name PM_MODO, Link FSUIPC_INOUT, Offset $53FE, Length 2 // PM_EFIS_MODO
Var 1202, name PM_RANG, Link FSUIPC_OUT, Offset $53FE, Length 2 // PM_EFIS_RANG
Var 1203, name PM_DH, Link FSUIPC_OUT, Offset $53FE, Length 2 // PM_EFIS_DH
Var 1204, name FS_QNH, Link FSUIPC_OUT, Offset $530A, Length 2 // FS_QNH_MB
Var 1208, name PM2_RANG, Link FSUIPC_OUT, Offset $53FE, Length 2 // PM_EFIS_RANG FO
Var 1210, name PM2_DH, Link FSUIPC_OUT, Offset $5532, Length 2 // PM_EFIS_DH FO
Var 1212, name FS2_QNH, Link FSUIPC_OUT, Offset $552E, Length 2 // FS_QNH_MB FO