Results 1 to 4 of 4
-
07-12-2008, 08:05 AM #1
- Join Date
- Mar 2008
- Location
- Wrexham,N.Wales,UK
- Posts
- 33
SIOC Code for MCP, MIP, and TQ updated
HI,
I hope this helps someone.
This is my SIOC script running my 737NG FLightdeck. I have 4 cards
1 x Opencockpits MCP (Great bit of kit)
1 x USBKeys Card (Runs all input keys from EFIS)
1 x USBOutputs Card (Runs all LEDS on MIP and TQ)
1 x BU0386X from Leo Bodnar (Great card this no cockpit should be without one)
1 USBServos card (Not working yet)
Regards,
John
http://www.boeing737ng.co.uk
==========================================
SIOC Code
Var 0003, Link FSUIPC_IN, Offset $0BEC, Length 4 // Nose Gear Green Offset, 0=up, 16383=dwn
{
IF V0003 = 16383
{
V0004 = 1
V0005 = 0
}
IF V0003 < 16383
{
V0004 = 0
V0005 = 1
}
IF V0003 = 0
{
V0004 = 0
V0005 = 0
}
}
Var 0004, Link IOCARD_OUT, Device 1, Output 11 // Nose Gear Green Led, 0=off, 1=on
Var 0005, Link IOCARD_OUT, Device 1, Output 16 // Nose Gear Red Led, 0=off, 1=on
Var 0006, Link FSUIPC_IN, Offset $0BF4, Length 4 // Left Gear Position Offset, 0=up, 16383=d
{
IF V0006 = 16383
{
V0007 = 1
V0008 = 0
}
IF V0006 < 16383
{
V0007 = 0
V0008 = 1
}
IF V0006 = 0
{
V0007 = 0
V0008 = 0
}
}
Var 0007, Link IOCARD_OUT, Device 1, Output 13 // Left Gear Green Led, 0=off, 1=on
Var 0008, Link IOCARD_OUT, Device 1, Output 14 // Left Gear Red Led, 0=off, 1=on
Var 0009, Link FSUIPC_IN, Offset $0BF0, Length 4 // Right Gear Position Offset, 0=up, 16383=
{
IF V0009 = 16383
{
V0010 = 1
V0011 = 0
}
IF V0009 < 16383
{
V0010 = 0
V0011 = 1
}
IF V0009 = 0
{
V0010 = 0
V0011 = 0
}
}
Var 0010, Link IOCARD_OUT, Device 1, Output 15 // Right Gear Green Led, 0=off, 1=on
Var 0011, Link IOCARD_OUT, Device 1, Output 12 // Right Gear Red Led, 0=off, 1=on
Var 0012, Link FSUIPC_IN, Offset $55EC, Length 2 // AutoBke Disarm
{
V0012 = TESTBIT V0014 ,1 // Brake panel Anti Skid
V0012 = TESTBIT V0013 ,0 // AT panel Speedbrake Do Not Arm
V0012 = TESTBIT &FL_OnGround ,2 // Autobrake Disarm bit 2
}
Var 0013, Link IOCARD_OUT, Device 1, Output 25 // AT panel Speedbrake Do Not Arm
Var 0014, Link IOCARD_OUT, Device 1, Output 8 // Brake panel Anti Skid
Var 0015, name FL_OnGround, Link FSUIPC_IN, Offset $0366, Length 2 // Aircraft on Ground (1=On ground, 0=Air)
Var 0016, name Autobrake, Link FSUIPC_IN, Offset $62AA, Length 2 // Autobrake Offset
{
C0 = &FL_OnGround = 1
C1 = &Autobrake = 0
IF C0 AND C1
{
IF &AutobrakeLED = 0 // LED is Off
{
&AutobrakeLED = 1
&AutobrakeLED = DELAY 0 ,300 // Delay off for 3 Secs
}
}
IF &Autobrake = 1 // Autobrake Off
{
&AutobrakeLED = 0
}
IF &Autobrake > 1 // Autobrake 1,2,3 or Max
{
&AutobrakeLED = 0
}
C0 = &FL_OnGround = 0 // Airborne
C1 = &Autobrake = 0 // Autobrake RTO
IF C0 AND C1
{
&AutobrakeLED = 1
}
}
Var 0017, name AutobrakeLED, Link IOCARD_OUT, Device 1, Output 7 // AutoBrake Disarm LED
Var 0018, name FI_FlpsPos, Link FSUIPC_IN, Offset $0BE0, Length 4
{
IF &FI_FlpsPos = 0 // Flaps Up
{
&Flaps_Ext = 0
&Flaps_Trans = 0
}
C0 = &FI_FlpsPos > 0
C1 = &FI_FlpsPos < 409
IF C0 AND C1 // LE Flaps in Transit
{
&Flaps_Trans = 1
&Flaps_Ext = 0
}
IF &FI_FlpsPos = 409 // Flap 1
{
&Flaps_Ext = 1
&Flaps_Trans = 0
}
IF &FI_FlpsPos = 819 // Flap 2
{
&Flaps_Ext = 1
&Flaps_Trans = 0
}
IF &FI_FlpsPos = 2047 // Flap 5
{
&Flaps_Ext = 1
&Flaps_Trans = 0
}
C0 = &FI_FlpsPos > 2047
C1 = &FI_FlpsPos < 4095
IF C0 AND C1 // LE Flaps in Transit
{
&Flaps_Ext = 0
&Flaps_Trans = 1
}
IF &FI_FlpsPos = 4095 // Flap 10
{
&Flaps_Ext = 1
&Flaps_Trans = 0
}
}
Var 0019, name Flaps_Trans, Link IOCARD_OUT, Device 1, Output 9 // Flaps in Transit Amber LED
Var 0020, name Flaps_Ext, Link IOCARD_OUT, Device 1, Output 10 // Flaps Extended Green LED
Var 0021, name Glideslope, Link FSUIPC_IN, Offset $0C49, Length 1 // Glideslope
{
C0 = &Glideslope < 172 // Below Glideslope
C1 = &AP_Active = 1 // AP Active
IF C0 AND C1 // Below GLideslope
{
&Glideslope_CPT = 1 // Illuminate Captains Glideslope LED
&Glideslope_FO = 1 // Illuminate FOs Glideslope LED
}
}
Var 0022, name Glideslope_CPT, Link IOCARD_OUT, Device 1, Output 27 // Captains Glideslope LED
Var 0023, name Glideslope_FO, Link IOCARD_OUT, Device 1, Output 2 // FOs Glide Slope LED
Var 0024, name AP_Active, Link FSUIPC_IN, Offset $6228, Length 1 // Autopilot on
Var 0025, name AP_Red_LED, Link IOCARD_OUT, Device 1, Output 17 // AP Disconnected
{
IF &AP_Active = 0
{
&AP_Red_LED = 1
}
}
Var 0026, name AT_Arm, Link FSUIPC_IN, Offset $62BD, Length 1 // Auto Thrust Armed
{
IF &AT_Arm < 75 // AT Not Armed
{
&CPT_AT_Red = 1
&FO_AT_Red = 1
}
IF &AT_Arm > 100
{
&CPT_AT_Red = 0
&FO_AT_Red = 0
}
}
Var 0027, name CPT_AT_Red, Link IOCARD_OUT, Device 1, Output 24 // Captains AT Disarm LED
Var 0028, name FO_AT_Red, Link IOCARD_OUT, Device 1, Output 18 // FOs AT Disarm LED
Var 0029, name Spoiler_Arm, Link FSUIPC_IN, Offset $626F, Length 2 // Speed Brake Armed
{
IF &Spoiler_Arm = 0 // Speed Brake Armed
{
&Spoil_Arm_LED = 0 // Speedbrake LED
}
IF &Spoiler_Arm = 1
{
&Spoil_Arm_LED = 1
}
}
Var 0031, name Spoil_Arm_LED, Link IOCARD_OUT, Device 1, Output 26 // Speed Brake Armed LED
Var 0101, name MCP_IASpmdg, Link FSUIPC_IN, Offset $6220, Length 2 // MCP IAS
{
CALL &IASaff
}
Var 0107, name MCP_Course, Link FSUIPC_OUT, Offset $0C4E, Length 2 // MCP Course
Var 0108, name MCP_HDG, Link FSUIPC_OUT, Offset $5408, Length 2 // MCP Heading
Var 0109, name MCP_ALT, Link FSUIPC_OUT, Offset $540A, Length 2 // MCP ALT
Var 0110, name MCP_IAS_Out, Link FSUIPC_OUT, Offset $02BC, Length 4 // MCP IAS Output
Var 0112, name MCP_AT_Switch, Link IOCARD_SW, Input 33 // MCP A/T Switch
{
IF &MCP_AT_Switch = 1
{
IF &MCP_AT_LED = 0
{
&KEYS = 44
&KEYS = 0
}
}
ELSE
{
IF &MCP_AT_Switch = 0
{
IF &MCP_AT_LED = 1
{
&KEYS = 44
&KEYS = 0
}
}
}
}
Var 0113, name MCP_FD_Switch, Link IOCARD_SW, Input 16 // MCP FD Switch
{
IF &MCP_FD_Switch = 1
{
IF &MCP_FDL_LED = 0
{
&KEYS = 56
&KEYS = 0
}
}
ELSE
{
IF &MCP_FD_Switch = 0
{
IF &MCP_FD_LED = 1
{
&KEYS = 56
&KEYS = 0
}
}
}
}
Var 0114, name MCP_VS_BN, Link IOCARD_SW, Input 22 // MCP V/S Button
{
IF &MCP_VS_BN = 1
{
&KEYS = 58
&KEYS = 0
}
}
Var 0115, name MCP_Speed_BN, Link IOCARD_SW, Input 31 // MC Speed Button
{
IF &MCP_Speed_BN = 1
{
&KEYS = 51
&KEYS = 0
}
}
Var 0116, name MCP_N1_BN, Link IOCARD_SW, Input 32 // MCP N1 Button
{
IF &MCP_N1_BN = 1
{
&KEYS = 61
&KEYS = 0
}
}
Var 0117, name MCP_LVLCHG_BN, Link IOCARD_SW, Input 29 // MCP LVL CHG Button
{
IF &MCP_LVLCHG_BN = 1
{
&KEYS = 59
&KEYS = 0
}
}
Var 0118, name MCP_HDG_BN, Link IOCARD_SW, Input 28 // MCP Heading Button
{
IF &MCP_HDG_BN = 1
{
&KEYS = 62
&KEYS = 0
}
}
Var 0119, name MCP_ALTHLD_BN, Link IOCARD_SW, Input 23 // MCP ALT HOLD Button
{
IF &MCP_ALTHLD_BN = 1
{
&KEYS = 64
&KEYS = 0
}
}
Var 0120, name MCP_APP_BN, Link IOCARD_SW, Input 24 // MCP APP Button
{
IF &MCP_APP_BN = 1
{
&KEYS = 63
&KEYS = 0
}
}
Var 0121, name MCP_VORLOC_BN, Link IOCARD_SW, Input 25 // MCP VOR/LOC Button
{
IF &MCP_VORLOC_BN = 1
{
&KEYS = 70
&KEYS = 0
}
}
Var 0122, name MCP_LNAV_BN, Link IOCARD_SW, Input 27 // MCP LNAV Button
{
IF &MCP_LNAV_BN = 1
{
&KEYS = 69
}
}
Var 0123, name MCP_VNAV_SW, Link IOCARD_SW, Input 30 // MCP VNAV Sw
{
IF &MCP_VNAV_SW = 1
{
&KEYS = 57
&KEYS = 0
}
}
Var 0124, name MCP_APDIS_BN, Link IOCARD_SW, Input 15 // MCP Disengage Button
{
IF &MCP_APDIS_BN = 1
{
&KEYS = 26
&KEYS = 0
}
ELSE
{
&KEYS = 26
&KEYS = 0
}
}
Var 0125, name MCP_CMDA_BN, Link IOCARD_SW, Input 21 // MCP CMD A Button
{
IF &MCP_CMDA_BN = 1
{
&KEYS = 66
&KEYS = 0
}
}
Var 0126, name MCP_CMDB_BN, Link IOCARD_SW, Input 19 // MCP CMD B Button
{
IF &MCP_CMDB_BN = 1
{
&KEYS = 67
&KEYS = 0
}
}
Var 0128, name MCP_VS_EN, Link IOCARD_ENCODER, Input 11, Aceleration 1, Type 2 // MCP VS Encoder
{
IF &MCP_VS_EN = 1
{
&KEYS = 54
&KEYS = 0
}
ELSE
{
&KEYS = 55
&KEYS = 0
}
}
Var 0129, name MCP_CRSL_EN, Link IOCARD_ENCODER, Input 4, Aceleration 1, Type 2 // MCP Course Left Encoder
{
IF &MCP_CRSL_EN = 1
{
&KEYS = 45
&KEYS = 0
}
ELSE
{
&KEYS = 46
&KEYS = 0
}
}
Var 0130, name MCP_IAS_EN, Link IOCARD_ENCODER, Input 0, Aceleration 2, Type 2 // MCP IAS Encoder
{
IF &MCP_IAS_EN = 1
{
&KEYS = 42
&KEYS = 0
}
ELSE
{
&KEYS = 43
&KEYS = 0
}
}
Var 0131, name MCP_HDG_EN, Link IOCARD_ENCODER, Input 6, Aceleration 1, Type 2 // MCP HDG Encoder
{
IF &MCP_HDG_EN = 1
{
&KEYS = 47
&KEYS = 0
}
ELSE
{
&KEYS = 48
&KEYS = 0
}
IF &MCP_HDG_LED = 0
{
L0 = &MCP_HDG_EN * -1
&MCP_HDG_MEM = ROTATE 0 ,359 ,L0
}
CALL &HDGaff
}
Var 0132, name MCP_ALT_EN, Link IOCARD_ENCODER, Input 2, Aceleration 1, Type 2 // MCP ALT Encoder
{
IF &MCP_ALT_EN = 1
{
&KEYS = 53
&KEYS = 0
}
ELSE
{
&KEYS = 52
&KEYS = 0
}
IF &MCP_VNAV_LED = 1
{
L0 = &MCP_ALT_EN * -100
&MCP_ALT_MEM = LIMIT 0 ,50000 ,L0
CALL &ALTaff
}
}
Var 0133, name MCP_VS_DS, Link IOCARD_DISPLAY, Digit 14, Numbers 5 // MCP V/S Display
Var 0134, name MCP_CRSL_DS, Link IOCARD_DISPLAY, Digit 0, Numbers 3 // MCP Course Left Display
Var 0135, name MCP_IAS_DS, Link IOCARD_DISPLAY, Digit 3, Numbers 3 // MCP IAS Display
Var 0136, name MCP_HDG_DS, Link IOCARD_DISPLAY, Digit 6, Numbers 3 // MCP HDG Display
Var 0137, name MCP_ALT_DS, Link IOCARD_DISPLAY, Digit 9, Numbers 5 // MCP ALT Display
Var 0138, name MCP_AT_LED, Link IOCARD_OUT, Output 22 // MCP AT LED
Var 0139, name MCP_FD_LED, Link IOCARD_OUT, Output 19 // MCP FD LED
Var 0140, name MCP_VS_LED, Link IOCARD_OUT, Output 31 // MCP VS LED
Var 0141, name MCP_VS_Sign, Link IOCARD_OUT, Output 45 // MCP VS Sign (+/-)
Var 0142, name MCP_VS_DEC, Link IOCARD_OUT, Output 20 // MCP VS Decimal Point
Var 0143, name MCP_SPD_LED, Link IOCARD_OUT, Output 23 // MCP Speed LED
Var 0144, name MCP_N1_LED, Link IOCARD_OUT, Output 21 // MCP N1 LED
Var 0145, name MCP_ALTHLD_LED, Link IOCARD_OUT, Output 30 // MCP ALT HOLD LED
Var 0146, name MCP_APP_LED, Link IOCARD_OUT, Output 27 // MCP APP LED
Var 0147, name MCP_VORLOC_LED, Link IOCARD_OUT, Output 28 // MCP VOR/LOC LED
Var 0148, name MCP_LNAV_LED, Link IOCARD_OUT, Output 29 // MCP LNAV LED
Var 0149, name MCP_HDG_LED, Link IOCARD_OUT, Output 26 // MCP HDG LED
Var 0150, name MCP_LVLCHG_LED, Link IOCARD_OUT, Output 24 // MCP LVL CHG LED
Var 0151, name MCP_VNAV_LED, Link IOCARD_OUT, Output 25 // MCP VNAV LED
Var 0152, name MCP_CMDA_LED, Link IOCARD_OUT, Output 33 // MCP CMD A LED
Var 0153, name MCP_CMDB_LED, Link IOCARD_OUT, Output 35 // MCP CMD B LED
Var 0154, name MCP_IAS_DEC, Link IOCARD_OUT, Output 20 // MCP IAS Decimal Point
Var 0156, name KEYS, Link KEYS // Link to SIOC.INI Keys
Var 0157, name MCP_HDG_MEM, Value 0 // Heading Memory
Var 0158, name MCP_MACH, Link FSUIPC_IN, Offset $11C6, Length 2 // MCP MACH Link
Var 0159, name MCP_ALT_MEM, Value 10000 // MCP ALT Memory
Var 0160, name MCP_FDL_LED, Link IOCARD_OUT, Output 39 // MCP FD Left LED
Var 0161, name MCP_CWSA_LED, Link IOCARD_OUT, Output 32 // MCP CWS A LED
Var 0162, name MCP_CWSB_LED, Link IOCARD_OUT, Output 34 // MCP CWS B LED
Var 0163, name MCP_STATUS, Link FSUIPC_IN, Offset $62BC, Length 4 // MCP Status
{
&MCP_FDL_LED = TESTBIT &MCP_STATUS ,12
&MCP_AT_LED = TESTBIT &MCP_STATUS ,14
&MCP_N1_LED = TESTBIT &MCP_STATUS ,15
&MCP_SPD_LED = TESTBIT &MCP_STATUS ,16
&MCP_VNAV_LED = TESTBIT &MCP_STATUS ,18
&MCP_LVLCHG_LED = TESTBIT &MCP_STATUS ,17
&MCP_HDG_LED = TESTBIT &MCP_STATUS ,22
&MCP_LNAV_LED = TESTBIT &MCP_STATUS ,19
&MCP_VORLOC_LED = TESTBIT &MCP_STATUS ,20
&MCP_APP_LED = TESTBIT &MCP_STATUS ,21
&MCP_ALTHLD_LED = TESTBIT &MCP_STATUS ,23
&MCP_VS_LED = TESTBIT &MCP_STATUS ,24
&MCP_CMDA_LED = TESTBIT &MCP_STATUS ,8
&MCP_CMDB_LED = TESTBIT &MCP_STATUS ,9
&MCP_CWSA_LED = TESTBIT &MCP_STATUS ,25
&MCP_CWSB_LED = TESTBIT &MCP_STATUS ,26
CALL &HDGaff
CALL &IASaff
CALL &ALTaff
CALL &VSaff
}
Var 0164, name MCP_SPDINTV, Link FSUIPC_IN, Offset $62C0, Length 1 // MCP Speed Intervention
{
CALL &IASaff
}
Var 0165, name MCP_CO_STATUS, Link FSUIPC_IN, Offset $621E, Length 2 // MCP CO Status
{
CALL &IASaff
}
Var 0166, name MCP_CRSpmdg, Link FSUIPC_IN, Offset $0C4E, Length 2 // MCP CRS
{
IF &MCP_CRSpmdg = 360
{
&MCP_CRSL_DS = 0
}
ELSE
{
&MCP_CRSL_DS = &MCP_CRSpmdg
}
}
Var 0167, name MCP_HDGpmdg, Link FSUIPC_IN, Offset $622C, Length 2 // MCP HDG pmdg
{
CALL &HDGaff
}
Var 0168, name MCP_ALTpmdg, Link FSUIPC_IN, Offset $622E, Length 2 // MCP ALT pmdg
{
CALL &ALTaff
}
Var 0169, name MCP_VSpmdg, Link FSUIPC_IN, Offset $6230, Length 2 // MCP VS pmdg
{
CALL &VSaff
}
Var 0170, name MCP_CRS2pmdg, Link FSUIPC_IN, Offset $0C4E, Length 2 // MCP CRS 2
{
IF &MCP_CRS2pmdg = 360
{
&MCP_CRSR_DS = 0
}
ELSE
{
&MCP_CRSR_DS = &MCP_CRS2pmdg
}
}
Var 0171, name MCP_CWSA_BN, Link IOCARD_SW, Input 20 // MCP CWS A Button
{
IF &MCP_CWSA_BN = 1
{
&KEYS = 65
&KEYS = 0
}
}
Var 0172, name MCP_CWSB_BN, Link IOCARD_SW, Input 18 // MCP CWS B Button
{
IF &MCP_CWSB_BN = 1
{
&KEYS = 68
&KEYS = 0
}
}
Var 0173, name MCP_CO_BN, Link IOCARD_SW, Input 13 // MCP CO Button
{
IF &MCP_CO_BN = 1
{
&KEYS = 60
&KEYS = 0
}
}
Var 0174, name MCP_FDR_SW, Link IOCARD_SW, Input 14 // MCP FD Right Switch
{
IF &MCP_FDR_SW = 1
{
&KEYS = 73
&KEYS = 0
}
ELSE
{
&KEYS = 73
&KEYS = 0
}
}
Var 0175, name MCP_CRSR_EN, Link IOCARD_ENCODER, Input 9, Aceleration 1, Type 2 // MCP Course Right Encoder
{
IF &MCP_CRSR_EN = 1
{
&KEYS = 45
&KEYS = 0
}
ELSE
{
&KEYS = 46
&KEYS = 0
}
}
Var 0176, name MCP_62AA, Link FSUIPC_IN, Offset $62AA, Length 2
Var 0177, name VSaff, Link SUBRUTINE
{
IF &MCP_VS_LED = 1
{
IF &MCP_VSpmdg < 60000
{
&MCP_VS_DS = &MCP_VSpmdg
&MCP_VS_Sign = 0
}
ELSE
{
L0 = &MCP_VSpmdg - 65536
&MCP_VS_DS = L0
&MCP_VS_Sign = 0
}
}
ELSE
{
&MCP_VS_DS = -999999
&MCP_VS_Sign = 0
}
}
Var 0178, name IASaff, Link SUBRUTINE // IAS
{
IF &MCP_VNAV_LED = 1 // Blank Display if VNAV Engaged
{
&MCP_IAS_DS = -999999
}
ELSE
{
IF &MCP_CO_STATUS < 4
{
&MCP_IAS_DS = &MCP_IASpmdg
&MCP_IAS_DEC = 0 // 1 = Decimal off
}
ELSE
{
L0 = &MCP_IASpmdg / &MCP_IAS
L0 = L0 * 12800
L0 = L0 * &MCP_MACH
&MCP_IAS_DS = L0 / 20480
&MCP_IAS_DEC = 1 // 0 = decimal on
}
}
}
Var 0179, name MCP_IAS, Link FSUIPC_IN, Offset $02BC, Length 4 // MCP IAS
Var 0180, name HDGaff, Link SUBRUTINE // MCP HDG Aff
{
IF &MCP_LNAV_LED = 0
{
IF &MCP_HDGpmdg = 360
{
&MCP_HDG_MEM = 0
}
ELSE
{
&MCP_HDG_MEM = &MCP_HDGpmdg
}
}
&MCP_HDG_DS = &MCP_HDG_MEM
}
Var 0181, name ALTaff, Link SUBRUTINE // MCP ALT Sub
{
IF &MCP_VNAV_LED = 0
{
&MCP_ALT_MEM = &MCP_ALTpmdg
}
&MCP_ALT_DS = &MCP_ALT_MEM
}
Var 0182, name MCP_CRSR_DS, Link IOCARD_DISPLAY, Digit 19, Numbers 3 // MCP Course Right Display
Var 0200, name TQ_THRL_SV, Link IOCARD_SERVO, Device 3, Output 1, PosL 1, PosC 512, PosR 1023, Type 3
Var 0201, name TQ_THRLpmdg, Link FSUIPC_IN, Offset $088C, Length 2
{
L0 = &TQ_THRLpmdg
IF L0 < 1
{
L1 = 1
}
IF L0 > 1023
{
L1 = 1023
}
ELSE
{
&TQ_THRL_SV = L0
}
}
Var 0202, name TQ_PARK_pmdg, Link FSUIPC_IN, Offset $0BC8, Length 2 // TQ Parking Brake pmdg
{
IF &TQ_PARK_pmdg = 0
{
&TQ_PARK_LED = 0
}
IF &TQ_PARK_pmdg > 0
{
&TQ_PARK_LED = 1
}
}
Var 0203, name TQ_PARK_LED, Link IOCARD_OUT, Device 1, Output 33 // TQ Parking Brake LED
Var 0204, name TQ_PBINITpmdg, Link FSUIPC_OUT, Offset $0BC8, Length 2 // Set park on
Var 0205, name TQ_THRR_SV, Link USB_SERVOS, Device 3, Output 2, PosL 1, PosC 512, PosR 1023 // TQ Right Thrust Lever
Var 0206, name TQ_THRR_pmdg, Link FSUIPC_IN, Offset $0924, Length 2 // TQ PMDG Offset Throttle Right
{
IF &TQ_THRR_pmdg > 0
{
&TQ_THRR_SV = &TQ_THRR_pmdg
}
}
-
Post Thanks / Like - 2 Thanks, 0 Likes, 0 Dislikes
-
07-12-2008, 06:16 PM #2
Fantastic, thanks for that John. I plan on getting the OC MCP in the near future and will appreciate the SIOC code help. I also enjoyed your detailed build explanation on your website. Looks like you'll be challanging Ian as far as informative websites are concerned
Look forward to seeing the rest of your build.
Ken.
-
07-13-2008, 07:35 PM #3
- Join Date
- Mar 2008
- Location
- Wrexham,N.Wales,UK
- Posts
- 33
Ken,
Ian has forgotton more than I will ever know about this game. I am not out to challange him as he is a good mate. I like to think we compliment each other. We bounce a lot of ideas around. Even his dog has stopped barking now when I go there..
TO be honest and in all fairness I would still be on my first EFIS if it wasn't for good old Ian.
I will update the website soon I have loads to put on it. I just want to get this little issue with auto power switch off with the TQ servos then I will get down to the website again.
It's flying now anyway so I am tempted to play (thats if I can get my SOn and my Nephew off it)
Speak soon.
John
-
08-10-2008, 05:53 PM #4
- Join Date
- Mar 2008
- Location
- Wrexham,N.Wales,UK
- Posts
- 33
Latest SIOC code for whole flightdeck incl Servos for TQ
Hi all,
Here is my latest SIOC code running the whole flightdeck to date. I have included code to run the servos for TQ (Still having a liitle problem with spoilers so I left them at 0 (powered off) for now. Once I update I will repost.
This code runs the MCP, MIP and TQ (With servos) using the following hardware
Device 0 = OC USB MCP
Device 1 = OC USB Outputs
Device 2 = OC USB Keys
Device 3 = OC USBServos
Also Pots and switches are via Leo Bodnars BU0836X Card (Superb)
// *****************************************************************************
// * Config_SIOC ver 3.5 - By Manolo Vélez - www.opencockpits.com
// *****************************************************************************
// * FileName : sioc.New.txt
// * Date : 10/08/2008
Var 0003, Link FSUIPC_IN, Offset $0BEC, Length 4 // Nose Gear Green Offset, 0=up, 16383=dwn
{
IF V0003 = 16383
{
V0004 = 1
V0005 = 0
}
IF V0003 < 16383
{
V0004 = 0
V0005 = 1
}
IF V0003 = 0
{
V0004 = 0
V0005 = 0
}
}
Var 0004, Link IOCARD_OUT, Device 1, Output 11 // Nose Gear Green Led, 0=off, 1=on
Var 0005, Link IOCARD_OUT, Device 1, Output 16 // Nose Gear Red Led, 0=off, 1=on
Var 0006, Link FSUIPC_IN, Offset $0BF4, Length 4 // Left Gear Position Offset, 0=up, 16383=d
{
IF V0006 = 16383
{
V0007 = 1
V0008 = 0
}
IF V0006 < 16383
{
V0007 = 0
V0008 = 1
}
IF V0006 = 0
{
V0007 = 0
V0008 = 0
}
}
Var 0007, Link IOCARD_OUT, Device 1, Output 13 // Left Gear Green Led, 0=off, 1=on
Var 0008, Link IOCARD_OUT, Device 1, Output 14 // Left Gear Red Led, 0=off, 1=on
Var 0009, Link FSUIPC_IN, Offset $0BF0, Length 4 // Right Gear Position Offset, 0=up, 16383=
{
IF V0009 = 16383
{
V0010 = 1
V0011 = 0
}
IF V0009 < 16383
{
V0010 = 0
V0011 = 1
}
IF V0009 = 0
{
V0010 = 0
V0011 = 0
}
}
Var 0010, Link IOCARD_OUT, Device 1, Output 15 // Right Gear Green Led, 0=off, 1=on
Var 0011, Link IOCARD_OUT, Device 1, Output 12 // Right Gear Red Led, 0=off, 1=on
Var 0012, Link FSUIPC_IN, Offset $55EC, Length 2 // AutoBke Disarm
{
V0012 = TESTBIT V0014 ,1 // Brake panel Anti Skid
V0012 = TESTBIT V0013 ,0 // AT panel Speedbrake Do Not Arm
V0012 = TESTBIT &FL_OnGround ,2 // Autobrake Disarm bit 2
}
Var 0013, Link IOCARD_OUT, Device 1, Output 25 // AT panel Speedbrake Do Not Arm
Var 0014, Link IOCARD_OUT, Device 1, Output 8 // Brake panel Anti Skid
Var 0015, name FL_OnGround, Link FSUIPC_IN, Offset $0366, Length 2 // Aircraft on Ground (1=On ground, 0=Air)
Var 0016, name Autobrake, Link FSUIPC_IN, Offset $62AA, Length 2 // Autobrake Offset
{
C0 = &FL_OnGround = 1
C1 = &Autobrake = 0
IF C0 AND C1
{
IF &AutobrakeLED = 0 // LED is Off
{
&AutobrakeLED = 1
&AutobrakeLED = DELAY 0 ,300 // Delay off for 3 Secs
}
}
IF &Autobrake = 1 // Autobrake Off
{
&AutobrakeLED = 0
}
IF &Autobrake > 1 // Autobrake 1,2,3 or Max
{
&AutobrakeLED = 0
}
C0 = &FL_OnGround = 0 // Airborne
C1 = &Autobrake = 0 // Autobrake RTO
IF C0 AND C1
{
&AutobrakeLED = 1
}
}
Var 0017, name AutobrakeLED, Link IOCARD_OUT, Device 1, Output 7 // AutoBrake Disarm LED
Var 0018, name FI_FlpsPos, Link FSUIPC_IN, Offset $0BE0, Length 4
{
IF &FI_FlpsPos = 0 // Flaps Up
{
&Flaps_Ext = 0
&Flaps_Trans = 0
}
C0 = &FI_FlpsPos > 0
C1 = &FI_FlpsPos < 409
IF C0 AND C1 // LE Flaps in Transit
{
&Flaps_Trans = 1
&Flaps_Ext = 0
}
IF &FI_FlpsPos = 409 // Flap 1
{
&Flaps_Ext = 1
&Flaps_Trans = 0
}
IF &FI_FlpsPos = 819 // Flap 2
{
&Flaps_Ext = 1
&Flaps_Trans = 0
}
IF &FI_FlpsPos = 2047 // Flap 5
{
&Flaps_Ext = 1
&Flaps_Trans = 0
}
C0 = &FI_FlpsPos > 2047
C1 = &FI_FlpsPos < 4095
IF C0 AND C1 // LE Flaps in Transit
{
&Flaps_Ext = 0
&Flaps_Trans = 1
}
IF &FI_FlpsPos = 4095 // Flap 10
{
&Flaps_Ext = 1
&Flaps_Trans = 0
}
}
Var 0019, name Flaps_Trans, Link IOCARD_OUT, Device 1, Output 9 // Flaps in Transit Amber LED
Var 0020, name Flaps_Ext, Link IOCARD_OUT, Device 1, Output 10 // Flaps Extended Green LED
Var 0021, name Glideslope, Link FSUIPC_IN, Offset $0C49, Length 1 // Glideslope
{
C0 = &Glideslope < 172 // Below Glideslope
C1 = &AP_Active = 1 // AP Active
IF C0 AND C1 // Below GLideslope
{
&Glideslope_CPT = 1 // Illuminate Captains Glideslope LED
&Glideslope_FO = 1 // Illuminate FOs Glideslope LED
}
}
Var 0022, name Glideslope_CPT, Link IOCARD_OUT, Device 1, Output 27 // Captains Glideslope LED
Var 0023, name Glideslope_FO, Link IOCARD_OUT, Device 1, Output 2 // FOs Glide Slope LED
Var 0024, name AP_Active, Link FSUIPC_IN, Offset $6228, Length 1 // Autopilot on
Var 0025, name AP_Red_LED, Link IOCARD_OUT, Device 1, Output 17 // AP Disconnected
{
IF &AP_Active = 0
{
&AP_Red_LED = 1
}
}
Var 0026, name AT_Arm, Link FSUIPC_IN, Offset $62BD, Length 1 // Auto Thrust Armed
{
IF &AT_Arm < 75 // AT Not Armed
{
&CPT_AT_Red = 1
&FO_AT_Red = 1
}
IF &AT_Arm > 100
{
&CPT_AT_Red = 0
&FO_AT_Red = 0
}
}
Var 0027, name CPT_AT_Red, Link IOCARD_OUT, Device 1, Output 24 // Captains AT Disarm LED
Var 0028, name FO_AT_Red, Link IOCARD_OUT, Device 1, Output 18 // FOs AT Disarm LED
Var 0029, name Spoiler_Arm, Link FSUIPC_IN, Offset $626F, Length 2 // Speed Brake Armed
{
IF &Spoiler_Arm = 0 // Speed Brake Armed
{
&Spoil_Arm_LED = 0 // Speedbrake LED
}
IF &Spoiler_Arm = 1
{
&Spoil_Arm_LED = 1
}
}
Var 0031, name Spoil_Arm_LED, Link IOCARD_OUT, Device 1, Output 26 // Speed Brake Armed LED
Var 0101, name MCP_IASpmdg, Link FSUIPC_IN, Offset $6220, Length 2 // MCP IAS
{
CALL &IASaff
}
Var 0107, name MCP_Course, Link FSUIPC_OUT, Offset $0C4E, Length 2 // MCP Course
Var 0108, name MCP_HDG, Link FSUIPC_OUT, Offset $5408, Length 2 // MCP Heading
Var 0109, name MCP_ALT, Link FSUIPC_OUT, Offset $540A, Length 2 // MCP ALT
Var 0110, name MCP_IAS_Out, Link FSUIPC_OUT, Offset $02BC, Length 4 // MCP IAS Output
Var 0112, name MCP_AT_Switch, Link IOCARD_SW, Input 33 // MCP A/T Switch
{
IF &MCP_AT_Switch = 1
{
IF &MCP_AT_LED = 0
{
&KEYS = 44
&KEYS = 0
}
}
ELSE
{
IF &MCP_AT_Switch = 0
{
IF &MCP_AT_LED = 1
{
&KEYS = 44
&KEYS = 0
}
}
}
}
Var 0113, name MCP_FD_Switch, Link IOCARD_SW, Input 16 // MCP FD Switch
{
IF &MCP_FD_Switch = 1
{
IF &MCP_FDL_LED = 0
{
&KEYS = 56
&KEYS = 0
}
}
ELSE
{
IF &MCP_FD_Switch = 0
{
IF &MCP_FD_LED = 1
{
&KEYS = 56
&KEYS = 0
}
}
}
}
Var 0114, name MCP_VS_BN, Link IOCARD_SW, Input 22 // MCP V/S Button
{
IF &MCP_VS_BN = 1
{
&KEYS = 58
&KEYS = 0
}
}
Var 0115, name MCP_Speed_BN, Link IOCARD_SW, Input 31 // MC Speed Button
{
IF &MCP_Speed_BN = 1
{
&KEYS = 51
&KEYS = 0
}
}
Var 0116, name MCP_N1_BN, Link IOCARD_SW, Input 32 // MCP N1 Button
{
IF &MCP_N1_BN = 1
{
&KEYS = 61
&KEYS = 0
}
}
Var 0117, name MCP_LVLCHG_BN, Link IOCARD_SW, Input 29 // MCP LVL CHG Button
{
IF &MCP_LVLCHG_BN = 1
{
&KEYS = 59
&KEYS = 0
}
}
Var 0118, name MCP_HDG_BN, Link IOCARD_SW, Input 28 // MCP Heading Button
{
IF &MCP_HDG_BN = 1
{
&KEYS = 62
&KEYS = 0
}
}
Var 0119, name MCP_ALTHLD_BN, Link IOCARD_SW, Input 23 // MCP ALT HOLD Button
{
IF &MCP_ALTHLD_BN = 1
{
&KEYS = 64
&KEYS = 0
}
}
Var 0120, name MCP_APP_BN, Link IOCARD_SW, Input 24 // MCP APP Button
{
IF &MCP_APP_BN = 1
{
&KEYS = 63
&KEYS = 0
}
}
Var 0121, name MCP_VORLOC_BN, Link IOCARD_SW, Input 25 // MCP VOR/LOC Button
{
IF &MCP_VORLOC_BN = 1
{
&KEYS = 70
&KEYS = 0
}
}
Var 0122, name MCP_LNAV_BN, Link IOCARD_SW, Input 27 // MCP LNAV Button
{
IF &MCP_LNAV_BN = 1
{
&KEYS = 69
}
}
Var 0123, name MCP_VNAV_SW, Link IOCARD_SW, Input 30 // MCP VNAV Sw
{
IF &MCP_VNAV_SW = 1
{
&KEYS = 57
&KEYS = 0
}
}
Var 0124, name MCP_APDIS_BN, Link IOCARD_SW, Input 15 // MCP Disengage Button
{
IF &MCP_APDIS_BN = 1
{
&KEYS = 26
&KEYS = 0
}
ELSE
{
&KEYS = 26
&KEYS = 0
}
}
Var 0125, name MCP_CMDA_BN, Link IOCARD_SW, Input 21 // MCP CMD A Button
{
IF &MCP_CMDA_BN = 1
{
&KEYS = 66
&KEYS = 0
}
}
Var 0126, name MCP_CMDB_BN, Link IOCARD_SW, Input 19 // MCP CMD B Button
{
IF &MCP_CMDB_BN = 1
{
&KEYS = 67
&KEYS = 0
}
}
Var 0128, name MCP_VS_EN, Link IOCARD_ENCODER, Input 11, Aceleration 1, Type 2 // MCP VS Encoder
{
IF &MCP_VS_EN = 1
{
&KEYS = 54
&KEYS = 0
}
ELSE
{
&KEYS = 55
&KEYS = 0
}
}
Var 0129, name MCP_CRSL_EN, Link IOCARD_ENCODER, Input 4, Aceleration 1, Type 2 // MCP Course Left Encoder
{
IF &MCP_CRSL_EN = 1
{
&KEYS = 45
&KEYS = 0
}
ELSE
{
&KEYS = 46
&KEYS = 0
}
}
Var 0130, name MCP_IAS_EN, Link IOCARD_ENCODER, Input 0, Aceleration 2, Type 2 // MCP IAS Encoder
{
IF &MCP_IAS_EN = 1
{
&KEYS = 42
&KEYS = 0
}
ELSE
{
&KEYS = 43
&KEYS = 0
}
}
Var 0131, name MCP_HDG_EN, Link IOCARD_ENCODER, Input 6, Aceleration 1, Type 2 // MCP HDG Encoder
{
IF &MCP_HDG_EN = 1
{
&KEYS = 47
&KEYS = 0
}
ELSE
{
&KEYS = 48
&KEYS = 0
}
IF &MCP_HDG_LED = 0
{
L0 = &MCP_HDG_EN * -1
&MCP_HDG_MEM = ROTATE 0 ,359 ,L0
}
CALL &HDGaff
}
Var 0132, name MCP_ALT_EN, Link IOCARD_ENCODER, Input 2, Aceleration 1, Type 2 // MCP ALT Encoder
{
IF &MCP_ALT_EN = 1
{
&KEYS = 53
&KEYS = 0
}
ELSE
{
&KEYS = 52
&KEYS = 0
}
IF &MCP_VNAV_LED = 1
{
L0 = &MCP_ALT_EN * -100
&MCP_ALT_MEM = LIMIT 0 ,50000 ,L0
CALL &ALTaff
}
}
Var 0133, name MCP_VS_DS, Link IOCARD_DISPLAY, Digit 14, Numbers 5 // MCP V/S Display
Var 0134, name MCP_CRSL_DS, Link IOCARD_DISPLAY, Digit 0, Numbers 3 // MCP Course Left Display
Var 0135, name MCP_IAS_DS, Link IOCARD_DISPLAY, Digit 3, Numbers 3 // MCP IAS Display
Var 0136, name MCP_HDG_DS, Link IOCARD_DISPLAY, Digit 6, Numbers 3 // MCP HDG Display
Var 0137, name MCP_ALT_DS, Link IOCARD_DISPLAY, Digit 9, Numbers 5 // MCP ALT Display
Var 0138, name MCP_AT_LED, Link IOCARD_OUT, Output 22 // MCP AT LED
{
IF &MCP_AT_LED = 0
{
&TestOutputs = 1
}
ELSE
{
&TestOutputs = 0
}
}
Var 0139, name MCP_FD_LED, Link IOCARD_OUT, Output 19 // MCP FD LED
Var 0140, name MCP_VS_LED, Link IOCARD_OUT, Output 31 // MCP VS LED
Var 0141, name MCP_VS_Sign, Link IOCARD_OUT, Output 45 // MCP VS Sign (+/-)
Var 0142, name MCP_VS_DEC, Link IOCARD_OUT, Output 20 // MCP VS Decimal Point
Var 0143, name MCP_SPD_LED, Link IOCARD_OUT, Output 23 // MCP Speed LED
Var 0144, name MCP_N1_LED, Link IOCARD_OUT, Output 21 // MCP N1 LED
Var 0145, name MCP_ALTHLD_LED, Link IOCARD_OUT, Output 30 // MCP ALT HOLD LED
Var 0146, name MCP_APP_LED, Link IOCARD_OUT, Output 27 // MCP APP LED
Var 0147, name MCP_VORLOC_LED, Link IOCARD_OUT, Output 28 // MCP VOR/LOC LED
Var 0148, name MCP_LNAV_LED, Link IOCARD_OUT, Output 29 // MCP LNAV LED
Var 0149, name MCP_HDG_LED, Link IOCARD_OUT, Output 26 // MCP HDG LED
Var 0150, name MCP_LVLCHG_LED, Link IOCARD_OUT, Output 24 // MCP LVL CHG LED
Var 0151, name MCP_VNAV_LED, Link IOCARD_OUT, Output 25 // MCP VNAV LED
Var 0152, name MCP_CMDA_LED, Link IOCARD_OUT, Output 33 // MCP CMD A LED
Var 0153, name MCP_CMDB_LED, Link IOCARD_OUT, Output 35 // MCP CMD B LED
Var 0154, name MCP_IAS_DEC, Link IOCARD_OUT, Output 20 // MCP IAS Decimal Point
Var 0156, name KEYS, Link KEYS // Link to SIOC.INI Keys
Var 0157, name MCP_HDG_MEM, Value 0 // Heading Memory
Var 0158, name MCP_MACH, Link FSUIPC_IN, Offset $11C6, Length 2 // MCP MACH Link
Var 0159, name MCP_ALT_MEM, Value 10000 // MCP ALT Memory
Var 0160, name MCP_FDL_LED, Link IOCARD_OUT, Output 39 // MCP FD Left LED
Var 0161, name MCP_CWSA_LED, Link IOCARD_OUT, Output 32 // MCP CWS A LED
Var 0162, name MCP_CWSB_LED, Link IOCARD_OUT, Output 34 // MCP CWS B LED
Var 0163, name MCP_STATUS, Link FSUIPC_IN, Offset $62BC, Length 4 // MCP Status
{
&MCP_FDL_LED = TESTBIT &MCP_STATUS ,12
&MCP_AT_LED = TESTBIT &MCP_STATUS ,14
&MCP_N1_LED = TESTBIT &MCP_STATUS ,15
&MCP_SPD_LED = TESTBIT &MCP_STATUS ,16
&MCP_VNAV_LED = TESTBIT &MCP_STATUS ,18
&MCP_LVLCHG_LED = TESTBIT &MCP_STATUS ,17
&MCP_HDG_LED = TESTBIT &MCP_STATUS ,22
&MCP_LNAV_LED = TESTBIT &MCP_STATUS ,19
&MCP_VORLOC_LED = TESTBIT &MCP_STATUS ,20
&MCP_APP_LED = TESTBIT &MCP_STATUS ,21
&MCP_ALTHLD_LED = TESTBIT &MCP_STATUS ,23
&MCP_VS_LED = TESTBIT &MCP_STATUS ,24
&MCP_CMDA_LED = TESTBIT &MCP_STATUS ,8
&MCP_CMDB_LED = TESTBIT &MCP_STATUS ,9
&MCP_CWSA_LED = TESTBIT &MCP_STATUS ,25
&MCP_CWSB_LED = TESTBIT &MCP_STATUS ,26
CALL &HDGaff
CALL &IASaff
CALL &ALTaff
CALL &VSaff
}
Var 0164, name MCP_SPDINTV, Link FSUIPC_IN, Offset $62C0, Length 1 // MCP Speed Intervention
{
CALL &IASaff
}
Var 0165, name MCP_CO_STATUS, Link FSUIPC_IN, Offset $621E, Length 2 // MCP CO Status
{
CALL &IASaff
}
Var 0166, name MCP_CRSpmdg, Link FSUIPC_IN, Offset $0C4E, Length 2 // MCP CRS
{
IF &MCP_CRSpmdg = 360
{
&MCP_CRSL_DS = 0
}
ELSE
{
&MCP_CRSL_DS = &MCP_CRSpmdg
}
}
Var 0167, name MCP_HDGpmdg, Link FSUIPC_IN, Offset $622C, Length 2 // MCP HDG pmdg
{
CALL &HDGaff
}
Var 0168, name MCP_ALTpmdg, Link FSUIPC_IN, Offset $622E, Length 2 // MCP ALT pmdg
{
CALL &ALTaff
}
Var 0169, name MCP_VSpmdg, Link FSUIPC_IN, Offset $6230, Length 2 // MCP VS pmdg
{
CALL &VSaff
}
Var 0170, name MCP_CRS2pmdg, Link FSUIPC_IN, Offset $0C4E, Length 2 // MCP CRS 2
{
IF &MCP_CRS2pmdg = 360
{
&MCP_CRSR_DS = 0
}
ELSE
{
&MCP_CRSR_DS = &MCP_CRS2pmdg
}
}
Var 0171, name MCP_CWSA_BN, Link IOCARD_SW, Input 20 // MCP CWS A Button
{
IF &MCP_CWSA_BN = 1
{
&KEYS = 65
&KEYS = 0
}
}
Var 0172, name MCP_CWSB_BN, Link IOCARD_SW, Input 18 // MCP CWS B Button
{
IF &MCP_CWSB_BN = 1
{
&KEYS = 68
&KEYS = 0
}
}
Var 0173, name MCP_CO_BN, Link IOCARD_SW, Input 13 // MCP CO Button
{
IF &MCP_CO_BN = 1
{
&KEYS = 60
&KEYS = 0
}
}
Var 0174, name MCP_FDR_SW, Link IOCARD_SW, Input 14 // MCP FD Right Switch
{
IF &MCP_FDR_SW = 1
{
&KEYS = 73
&KEYS = 0
}
ELSE
{
&KEYS = 73
&KEYS = 0
}
}
Var 0175, name MCP_CRSR_EN, Link IOCARD_ENCODER, Input 9, Aceleration 1, Type 2 // MCP Course Right Encoder
{
IF &MCP_CRSR_EN = 1
{
&KEYS = 45
&KEYS = 0
}
ELSE
{
&KEYS = 46
&KEYS = 0
}
}
Var 0176, name MCP_62AA, Link FSUIPC_IN, Offset $62AA, Length 2
Var 0177, name VSaff, Link SUBRUTINE
{
IF &MCP_VS_LED = 1
{
IF &MCP_VSpmdg < 60000
{
&MCP_VS_DS = &MCP_VSpmdg
&MCP_VS_Sign = 0
}
ELSE
{
L0 = &MCP_VSpmdg - 65536
&MCP_VS_DS = L0
&MCP_VS_Sign = 0
}
}
ELSE
{
&MCP_VS_DS = -999999
&MCP_VS_Sign = 0
}
}
Var 0178, name IASaff, Link SUBRUTINE // IAS
{
IF &MCP_VNAV_LED = 1 // Blank Display if VNAV Engaged
{
&MCP_IAS_DS = -999999
}
ELSE
{
IF &MCP_CO_STATUS < 4
{
&MCP_IAS_DS = &MCP_IASpmdg
&MCP_IAS_DEC = 0 // 1 = Decimal off
}
ELSE
{
L0 = &MCP_IASpmdg / &MCP_IAS
L0 = L0 * 12800
L0 = L0 * &MCP_MACH
&MCP_IAS_DS = L0 / 20480
&MCP_IAS_DEC = 1 // 0 = decimal on
}
}
}
Var 0179, name MCP_IAS, Link FSUIPC_IN, Offset $02BC, Length 4 // MCP IAS
Var 0180, name HDGaff, Link SUBRUTINE // MCP HDG Aff
{
IF &MCP_LNAV_LED = 0
{
IF &MCP_HDGpmdg = 360
{
&MCP_HDG_MEM = 0
}
ELSE
{
&MCP_HDG_MEM = &MCP_HDGpmdg
}
}
&MCP_HDG_DS = &MCP_HDG_MEM
}
Var 0181, name ALTaff, Link SUBRUTINE // MCP ALT Sub
{
IF &MCP_VNAV_LED = 0
{
&MCP_ALT_MEM = &MCP_ALTpmdg
}
&MCP_ALT_DS = &MCP_ALT_MEM
}
Var 0182, name MCP_CRSR_DS, Link IOCARD_DISPLAY, Digit 19, Numbers 3 // MCP Course Right Display
Var 0202, name TQ_PARK_pmdg, Link FSUIPC_IN, Offset $0BC8, Length 2 // TQ Parking Brake pmdg
{
IF &TQ_PARK_pmdg = 0
{
&TQ_PARK_LED = 0
}
IF &TQ_PARK_pmdg > 0
{
&TQ_PARK_LED = 1
}
}
Var 0203, name TQ_PARK_LED, Link IOCARD_OUT, Device 1, Output 61 // TQ Parking Brake LED
Var 0204, name TQ_PBINITpmdg, Link FSUIPC_OUT, Offset $0BC8, Length 2 // Set park on
Var 0205, name TQ_Thr1_pmdg, Link FSUIPC_IN, Offset $088C, Length 2 // TQ PMDG Throttle 1
{
IF &MCP_AT_LED = 0
{
&TQ_Thr1_SV = 0
}
ELSE
{
IF &TQ_Thr1_pmdg > 0
{
L0 = &TQ_Thr1_pmdg / 29
&TQ_Thr1_SV = L0 + 240
}
IF &TQ_Thr1_pmdg < 0
{
L0 = &TQ_Thr2_pmdg + 1024
&TQ_Thr1_SV = L0
}
IF &TQ_Thr1_pmdg = 0
{
L0 = 50
&TQ_Thr1_SV = L0
}
}
}
Var 0206, name TQ_Thr1_SV, Link USB_SERVOS, Device 3, Output 1, PosL 0, PosC 512, PosR 900 // TQ Thrust Lever 1
Var 0207, name TQ_Thr2_SV, Link USB_SERVOS, Device 3, Output 2, PosL 0, PosC 512, PosR 900 // TQ Thrust Lever 2
Var 0208, name TQ_Thr2_pmdg, Link FSUIPC_IN, Offset $0924, Length 2 // TQ Thrust Lever 2 PMDG
{
IF &MCP_AT_LED = 0
{
&TQ_Thr2_SV = 0
}
ELSE
{
IF &TQ_Thr2_pmdg > 0
{
L0 = &TQ_Thr2_pmdg / 27
L1 = 1024 - L0
&TQ_Thr2_SV = L1
}
IF &TQ_Thr2_pmdg < 0
{
L0 = &TQ_Thr2_pmdg + 1024
&TQ_Thr2_SV = L0
}
IF &TQ_Thr2_pmdg = 0
{
L0 = &TQ_Thr2_pmdg + 300
}
}
}
Var 0209, name TQ_Spoil_pmdg, Link FSUIPC_IN, Offset $0BD0, Length 4 // TQ Spoilers PMDG
{
IF &FL_OnGround = 0
{
&TQ_Spoil_SV = 0
}
}
Var 0210, name TQ_Spoil_SV, Link USB_SERVOS, Device 3, Output 3, PosL 320, PosC 340, PosR 900 // TQ Spoilers Servo
-
Post Thanks / Like - 1 Thanks, 0 Likes, 0 Dislikes
MicroHellas thanked for this post
Similar Threads
-
sioc code a320 fcu need help
By usssp in forum I/O Interfacing Hardware and SoftwareReplies: 5Last Post: 03-12-2013, 11:02 AM -
SIOC code issues - Can someone take a look?
By XOrionFE in forum I/O Interfacing Hardware and SoftwareReplies: 8Last Post: 02-04-2009, 08:43 AM -
737 MIP Installed - SIOC Code Updated
By BoeingNG in forum My Cockpit UpdateReplies: 0Last Post: 06-25-2008, 05:02 PM -
ALT , FLT LDG, Displays and ENC SIOC code
By dcutugno in forum PMSystemsReplies: 0Last Post: 12-10-2007, 07:10 PM -
SIOC Code
By Polmer in forum I/O Interfacing Hardware and SoftwareReplies: 6Last Post: 12-28-2006, 10:49 AM