Author Previous Topic Topic Next Topic  
verticallimit
Chief Engineer


588 Posts
Posted -  17-02-2010  :  23:19:18

Invitation to collaboration


I have here made a complete IOCP variable list, and with this list, it should be possible to create a fully functional cockpit.

The idea of this list is that all that are building a MD-80 cockpit, and uses Open Cockpit hardware will be able to use one another's script.

I will soon start with the programming of my FGCP.

If others are engaged in programming the overhead panel, then we could simply combine both scripts without having a conflict with the same variables, for the different actions.

In the start the in- and outputs will not be in the list, but these will be written under the development of the project.

If we make a co-operation we will all could save much time in the programming of the script.

And if you updates the list and get it on the website as soon as you have dedicated inputs and outputs, so that others can use the same in- and outputs, then the script can directly be used in all cockpits, without you have to change anything at all, and we have the possibility to give each other a better support and updates.

To open the database you can use OPEN OFFICE. Get it free here LINK

 

I hope for good cooperation.

 

Download invitation PDF Eng

Download invitation PDF Da 

 

DOWNLOAD VARIABLE LIST

 

 Last update: 07/03 2010

I have now added the list with FSUIPC offset data, and I added the digital inputs I've used so far.

The database makes very easy to search for the input, output, variables and offsets.

I've also create a report, so now you can print out the list.

 

******************** LATEST SCRIPT for open cockpit **********************

    FGCP LINK       BETA VERSION

************************************************************************************


Med venlig hilsen / Best regards

Claus

 

Author Replies  
verticallimit
Chief Engineer


588 Posts
Posted - 27-02-2010 : 01:12:54
I found a list on the web offering access to Leonardo MD80 FSUIPC offsets.

Here are almost all switches and encoders available

The list is here LINK

 

Here is a simple script turning a switch on and off

 

Var 9380, NAME CONTROL, Link FSUIPC_OUT, Offset $3110, Length 4
VAR 9381, NAME FS_PAR, LINK FSUIPC_OUT, offset $3114, Length 4

Var 9390, name FDL, Link IOCARD_SW, Input 13, TYPE 1  
{
 &FS_PAR = &FDL // state of input
 &CONTROL = 69747 // FSUIPC code
 &CONTROL = DELAY 0 10 // reset state

}


Med venlig hilsen / Best regards

Claus

 

Go to Top of Page
verticallimit
Chief Engineer


588 Posts
Posted - 20-04-2011 : 00:09:42
You can download the new software here:
 
 
Please, first make a backup :-) of your actual files called IOCPServer.dll
and IocpOffsets.xml, on the 'modules' folder of your FS2004.
After that change those files with the files you will find on the attached
ZIP.
 
You will find a list i "modules" folder with all new offset, the list is for the SIOCPserver program (offset 2200 - 2899)
 
As it looks, then the software working 90%, I have little trouble gaining control of individual switches.
I work to find out whether it is software or a hardware failure
Do you find any faults or missing data do not hesitate to write to me, so I can contact Juan, the programmer.
 
You will find information an my script here:
 
There will be some script for the FGCP here:
This script is not based on the new SIOCPServer software, but uses the FSUIPC offsets,



Med venlig hilsen / Best regards

Claus

 

Go to Top of Page
verticallimit
Chief Engineer


588 Posts
Posted - 07-05-2014 : 18:17:41
IOCP server files for FSX

Open this link in a new window: 

www.md80project.dk/portal/files/downloads/IOCP/Beta/IOCPFORFSX.rar


Med venlig hilsen / Best regards

Claus

 

Go to Top of Page
verticallimit
Chief Engineer


588 Posts
Posted - 26-01-2015 : 23:57:20
Here my raw script.


It has not been corrected and has a few small errors.
It is (almost) fully operable in my cockpit with the hardware that I have.



An update below:


 

 

 
 


Med venlig hilsen / Best regards

Claus

 

Go to Top of Page
verticallimit
Chief Engineer


588 Posts
Posted - 18-02-2015 : 19:46:47
Script 18/2 2015

 
 // *****************************************************************************
// * Config_SIOC ver 3.7B1   -     By Manolo Vélez    -    www.opencockpits.com
// *****************************************************************************
// * FileName : sioc.txt
// * Date : 23-06-2012



Var 0000, Value 0     // Initializing
{
  V0005 = DELAY 30 ,15     // open guard starter
  V0025 = DELAY 34 ,35     // open guard starter
  V0035 = DELAY 116 ,55     // open guard APU doors
  V1025 = 1024         // Set landing alt to 10.24
  V0720 = 0         // Yaw switch off
  V5580 = 100         // A/T off
  V5800 = 1         // Aircraft on ground
  V1455 = 100         // Speed indikator FGCP
  V1635 = 0         // HDG indikator FGCP
  V1775 = 0         // ALT indikator FGCP
  V7602 = 0
  V9975 = 4         // DIM Display
  V9976 = 4         // DIM Display
  V0300 = 0
}

Var 0001, Link IOCARD_SW, Input 0, Type T     // input for Battery switch
{
  IF V0001 = 1     // on
  {
    V0005 = 112         // event for move to on
  }
  IF V0001 = 0     // off
  {
    V0005 = 111         // event for move to off
  }
}

Var 0005, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0020, Link IOCARD_SW, Input 1, Type T     // input for Apu master off>0n
{
  IF V0020 = 1     // Off > on
  {
    V0025 = 106         // event: move from off to on
  }
  ELSE
  {
    V0025 = 105         // event: move from on to off
  }
}

Var 0025, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0030, Link IOCARD_SW, Input 2, Type T     // input for Apu 0n>start
{
  IF V0030 = 1     // on > start
  {
    V0035 = 106         // event: move from on to start
  }
  ELSE
  {
    V0035 = 131178         // event: release from start to on
  }
}

Var 0035, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0037, Link IOCP, Offset 2758     // APU pwr aval light
{
  IF V0037 > 50     // ON
  {
    V0038 = 1         // Set: light to on
  }
  ELSE
  {
    V0038 = 0         // Set: light to off
  }
}

Var 0038, Link IOCARD_OUT, Output 53     // APU pwr aval light

Var 0040, Link IOCARD_SW, Input 3, Type T     // input for Apu Air Off/on
{
  IF V0040 = 0     // Off > on
  {
    V0045 = 102         // event: move from off to on
  }
  ELSE
  {
    V0045 = 101         // event: move from on to off
  }
}

Var 0045, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0960, Link IOCARD_SW, Input 65, Type T     // input for bleed air
{
  IF V0960 = 1     // hp bld to auto
  {
    V0965 = 136         // event: move from hp bld to auto
  }
  ELSE
  {
    V0965 = 135         // event: release from auto to hp bld
  }
}

Var 0965, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0480, Link IOCARD_SW, Input 45, Type T     // input for emergency lights
{
  IF V0480 = 1     // arm to on
  {
    V0485 = 6         // event: move from arm to on
  }
  ELSE
  {
    V0485 = 5         // event: release from  on > arm
  }
}

Var 0485, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0520, Link IOCARD_SW, Input 48, Type T     // input for seat belts
{
  IF V0520 = 1     // auto to off
  {
    V0525 = 4         // event: move from auto to off
  }
  ELSE
  {
    V0525 = 3         // event: release from   off to auto
  }
}

Var 0525, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0500, Link IOCARD_SW, Input 50, Type T     // input for no smoking
{
  IF V0500 = 1     // auto to off
  {
    V0505 = 2         // event: move from auto to off
  }
  ELSE
  {
    V0505 = 1         // event: release from   off to auto
  }
}

Var 0505, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0730, Link IOCARD_SW, Input 68, Type T     // input for anti skid test
{
  IF V0730 = 1     // arm to test
  {
    V0735 = 142         // event: move from arm to test
  }
  ELSE
  {
    V0735 = 131214         // event: release from test to arm
  }
}

Var 0735, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0780, Link IOCARD_SW, Input 70, Type T     // input for yaw damper
{
  IF V0780 = 1     // on to ovrd
  {
    V0785 = 144         // event: move from on to ovrd
  }
  ELSE
  {
    V0785 = 143         // event: release from ovrd to on
  }
}

Var 0785, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0940, Link IOCARD_SW, Input 63, Type T     // input for bleed air
{
  IF V0940 = 1     // hp bld to auto
  {
    V0945 = 134         // event: move from hp bld to auto
  }
  ELSE
  {
    V0945 = 133         // event: release from auto to hp bld
  }
}

Var 0945, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0070, Link IOCARD_SW, Input 5, Type T     // input for Apu Doors auto
{
  IF V0070 = 0     // auto > off
  {
    V0075 = 118         // event: move from auto > off
  }
  ELSE
  {
    V0075 = 117         // event: move  off > auto
  }
}

Var 0075, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0080, Link IOCARD_SW, Input 6, Type T     // input for Apu doors ram
{
  IF V0080 = 1     // off > ram
  {
    V0085 = 120         // event: move from off > ram
  }
  ELSE
  {
    V0085 = 131191         // event: release from ram > off
  }
}

Var 0085, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0086, Link IOCARD_SW, Input 7, Type T     // input for Apu door non ram
{
  IF V0086 = 1     // off > non ram
  {
    V0089 = 119         // event: move from off > non ram
  }
  ELSE
  {
    V0089 = 131191         // event: release from non ram > off
  }
}

Var 0089, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0090, Link IOCARD_SW, Input 8, Type T     // input for Apu Econ/norm
{
  IF V0090 = 1     // norm > econ
  {
    V0095 = 110         // event: move from norm to econ
  }
  ELSE
  {
    V0095 = 109         // event: move from econ to norm
  }
}

Var 0095, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0100, Link IOCARD_SW, Input 9, Type T     // input for Apu fire cont
{
  IF V0100 = 0     // norm > off
  {
    V0105 = 103         // event: move from norm to off
  }
  ELSE
  {
    V0105 = 104         // event: move from off to norm
  }
}

Var 0105, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0110, Link IOCARD_SW, Input 10, Type T     // input for Apu door non ram
{
  IF V0110 = 1     // off > disch
  {
    V0115 = 98         // event: move from off >
  }
  ELSE
  {
    V0115 = 97         // event: move from  > off
  }
}

Var 0115, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0120, Link IOCARD_SW, Input 11, Type T     // input for Apu door non ram
{
  IF V0120 = 1     // off > disch
  {
    V0125 = 100         // event: move from off >
  }
  ELSE
  {
    V0125 = 99         // event: move from  > off
  }
}

Var 0125, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0130, Link IOCARD_SW, Input 12, Type T     // input for Emerg power
{
  IF V0130 = 0     // Emerg power off
  {
    V0135 = 107         // event: move to off
  }
  ELSE
  {
    V0135 = 108         // event: move to on
  }
}

Var 0135, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0140, Link IOCP, Offset 2762     // Emerg power light
{
  IF V0140 > 50     // ON
  {
    V0141 = 1         // Set: light to on
    CALL V7607
  }
  ELSE
  {
    V0141 = 0         // Set: light to off
    CALL V7607
  }
}

Var 0141, Link IOCARD_OUT, Output 49     // Emerg power light

Var 0200, Link IOCARD_SW, Input 20, Type T     // input for L gen on/off
{
  IF V0200 = 1     // off to on
  {
    V0205 = 78         // event: move from  off > on
  }
  ELSE
  {
    V0205 = 77         // event: move from  on > off
  }
}

Var 0205, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0220, Link IOCARD_SW, Input 26, Type T     // input for R gen on/off
{
  IF V0220 = 1     // off to on
  {
    V0225 = 82         // event: move from off to on
  }
  ELSE
  {
    V0225 = 81         // event: move from  on > off
  }
}

Var 0225, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0240, Link IOCARD_SW, Input 21, Type T     // input for APU gen reset
{
  IF V0240 = 1     // off to reset
  {
    V0245 = 79         // event: move from off to reset
  }
  ELSE
  {
    V0245 = 80         // event: release to  norm
  }
}

Var 0245, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0250, Link IOCARD_SW, Input 24, Type T     // input for Apu L gen bus
{
  IF V0250 = 0     // off
  {
    V0255 = 85         // event: move to off
  }
  ELSE
  {
    V0255 = 86         // event: move to on
  }
}

Var 0255, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0257, Link IOCP, Offset 2756     // Apu L bus light
{
  IF V0257 > 50     // ON
  {
    V0258 = 1         // Set: light to on
  }
  ELSE
  {
    V0258 = 0         // Set: light to off
  }
}

Var 0258, Link IOCARD_OUT, Output 50     // Apu L bus light

Var 0260, Link IOCARD_SW, Input 23, Type T     // input for Apu R gen bus
{
  IF V0260 = 0     // off
  {
    V0265 = 83         // event: move to off
  }
  ELSE
  {
    V0265 = 84         // event: move to on
  }
}

Var 0265, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0267, Link IOCP, Offset 2757     // Apu R bus light
{
  IF V0267 > 50     // ON
  {
    V0268 = 1         // Set: light to on
  }
  ELSE
  {
    V0268 = 0         // Set: light to off
  }
}

Var 0268, Link IOCARD_OUT, Output 54     // Apu R bus light

Var 0278, Link IOCP, Offset 2761     // Ext pwr awail light
{
  IF V0278 > 50     // ON
  {
    V0279 = 1         // Set: light to on
  }
  ELSE
  {
    V0279 = 0         // Set: light to off
  }
}

Var 0279, Link IOCARD_OUT, Output 52     // Ext pwr awail light

Var 0270, Link IOCARD_SW, Input 25, Type T     // input for Ext pwr L bus
{
  IF V0270 = 0     // off
  {
    V0275 = 87         // event: move to off
  }
  ELSE
  {
    V0275 = 88         // event: move to on
  }
}

Var 0275, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0276, Link IOCP, Offset 2759     // Ext pwr L bus light
{
  IF V0276 > 50     // ON
  {
    V0277 = 1         // Set: light to on
  }
  ELSE
  {
    V0277 = 0         // Set: light to off
  }
}

Var 0277, Link IOCARD_OUT, Output 51     // Ext pwr L bus light

Var 0280, Link IOCARD_SW, Input 19, Type T     // input Ext pwr R bus
{
  IF V0280 = 0     // off
  {
    V0285 = 89         // event: move to off
  }
  ELSE
  {
    V0285 = 90         // event: move to on
  }
}

Var 0285, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0287, Link IOCP, Offset 2760     // Ext pwr R bus light
{
  IF V0287 > 50
  {
    V0288 = 1    
  }
  ELSE
  {
    V0288 = 0    
  }
}

Var 0288, Link IOCARD_OUT, Output 55     // Ext pwr R bus light

Var 0290, Link IOCARD_SW, Input 27, Type T     // input ac bus tie
{
  IF V0290 = 0     // off
  {
    V0295 = 93         // event: move to off
  }
  ELSE
  {
    V0295 = 94         // event: move to on
  }
}

Var 0295, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0300, Link IOCARD_SW, Input 29, Type T     // input dc bus tie
{
  IF V0300 = 0     // off
  {
    V0305 = 95         // event: move to off
    CALL V7604         // Control display on/off
  }
  ELSE
  {
    V0305 = 96         // event: move to on
    CALL V7604         // Control display on/off
  }
}

Var 0305, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0310, Link IOCARD_SW, Input 35, Type T     // input galley
{
  IF V0310 = 0     // off
  {
    V0315 = 91         // event: move to off
  }
  ELSE
  {
    V0315 = 92         // event: move to on
  }
}

Var 0315, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0320, Link IOCARD_SW, Input 31, Type T     // input for DC fuel pump
{
  IF V0320 = 0     // DC fuel pump off
  {
    V0325 = 21         // event: move to off
  }
  ELSE
  {
    V0325 = 22         // event: move to on
  }
}

Var 0325, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0330, Link FSUIPC_OUT, Offset $3114, Length 4

Var 0331, Link IOCARD_SW, Input 28, Type T
{
  IF V0331 = 1
  {
    V0330 = 0         // sys a
    &CONTROL = 69837    
  }
}

Var 0332, Link IOCARD_SW, Input 28, Type T
{
  IF V0332 = 0
  {
    V0330 = 1         // Off
    &CONTROL = 69837    
  }
}

Var 0333, Link IOCARD_SW, Input 32, Type T
{
  IF V0333 = 1
  {
    V0330 = 2         // Sys b
    &CONTROL = 69837    
  }
}

Var 0334, Link IOCARD_SW, Input 32, Type T
{
  IF V0334 = 0
  {
    IF V0335 = 0
    {
      IF V0337 = 0
      {
        V0330 = 1         // Off
        &CONTROL = 69837    
      }
    }
  }
}

Var 0335, Link IOCARD_SW, Input 33, Type T
{
  IF V0335 = 1
  {
    V0330 = 3         // Both
    &CONTROL = 69837    
  }
}

Var 0337, Link IOCARD_SW, Input 34, Type T
{
  IF V0337 = 1
  {
    V0330 = 4         // Ovrd
    &CONTROL = 69837    
  }
}

Var 0365, name CONTROL, Link FSUIPC_OUT, Offset $3110, Length 4
{
  &CONTROL = DELAY 0 ,10
}

Var 0370, Link IOCARD_SW, Input 30, Type T     // input start l
{
  IF V0370 = 1     // Start
  {
    V0375 = 32         // event: move to start
  }
  ELSE
  {
    V0375 = 31         // event: release to off
  }
}

Var 0375, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0380, Link IOCARD_SW, Input 36, Type T     // input start l
{
  IF V0380 = 1     // Start
  {
    V0385 = 36         // event: move to start
  }
  ELSE
  {
    V0385 = 35         // event: release to off
  }
}

Var 0385, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0390, Link IOCARD_SW, Input 39, Type T     // input feul pump aft l
{
  IF V0390 = 1     // fuel pump on
  {
    V0395 = 38         // event: move to on
  }
  ELSE
  {
    V0395 = 37         // event: move > off
  }
}

Var 0395, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0400, Link IOCARD_SW, Input 40, Type T     // input feul pump aft c
{
  IF V0400 = 1     // fuel pump on
  {
    V0405 = 40         // event: move to on
  }
  ELSE
  {
    V0405 = 39         // event: move > off
  }
}

Var 0405, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0410, Link IOCARD_SW, Input 41, Type T     // input feul pump aft r
{
  IF V0410 = 1     // fuel pump on
  {
    V0415 = 42         // event: move to on
  }
  ELSE
  {
    V0415 = 41         // event: move > off
  }
}

Var 0415, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0420, Link IOCARD_SW, Input 42, Type T     // input feul pump aft l
{
  IF V0420 = 1     // fuel pump on
  {
    V0425 = 44         // event: move to on
  }
  ELSE
  {
    V0425 = 43         // event: move > off
  }
}

Var 0425, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0430, Link IOCARD_SW, Input 43, Type T     // input feul pump aft c
{
  IF V0430 = 1     // fuel pump on
  {
    V0435 = 46         // event: move to on
  }
  ELSE
  {
    V0435 = 45         // event: move > off
  }
}

Var 0435, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0440, Link IOCARD_SW, Input 44, Type T     // input feul pump aft r
{
  IF V0440 = 1     // fuel pump on
  {
    V0445 = 48         // event: move to on
  }
  ELSE
  {
    V0445 = 47         // event: move > off
  }
}

Var 0445, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0450, Link IOCARD_SW, Input 37, Type T     // input fuel heat l
{
  IF V0450 = 1     // fuel heat on
  {
    V0455 = 24         // event: move to on
  }
  ELSE
  {
    V0455 = 23         // event: release > off
  }
}

Var 0455, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0460, Link IOCARD_SW, Input 38, Type T     // input fuel heat r
{
  IF V0460 = 1     // fuel heat on
  {
    V0465 = 26         // event: move to on
  }
  ELSE
  {
    V0465 = 25         // event: release > off
  }
}

Var 0465, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0050, Link IOCARD_SW, Input 4, Type T     // input for Apu Air on/colder
{
  IF V0050 = 1     // on > colder
  {
    V0055 = 102         // event: move from on to colder
  }
  ELSE
  {
    V0055 = 101         // event: move from colder > on
  }
}

Var 0055, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0210, Link IOCARD_SW, Input 18, Type T     // input for L gen reset
{
  IF V0210 = 1     // off to reset
  {
    V0215 = 77         // event: move from off to reset
  }
  ELSE
  {
    V0215 = 131149         // event: release from  reset > off
  }
}

Var 0215, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0230, Link IOCARD_SW, Input 22, Type T     // input for L gen reset
{
  IF V0230 = 1     // off to reset
  {
    V0235 = 81         // event: move from off to reset
  }
  ELSE
  {
    V0235 = 131153         // event: release from  reset > off
  }
}

Var 0235, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0470, Link IOCARD_SW, Input 46, Type T     // input for emergency lights
{
  IF V0470 = 1     // off to arm
  {
    V0475 = 5         // event: move from off to arm
  }
  ELSE
  {
    V0475 = 6         // event: release from  arm > off
  }
}

Var 0475, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0490, Link IOCARD_SW, Input 49, Type T     // input for  no smoking
{
  IF V0490 = 1     // off to on
  {
    V0495 = 1         // event: move from off to on
  }
  ELSE
  {
    V0495 = 2         // event: release from   off to on
  }
}

Var 0495, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0510, Link IOCARD_SW, Input 47, Type T     // input for seat belts
{
  IF V0510 = 1     // off to on
  {
    V0515 = 3         // event: move from off to on
  }
  ELSE
  {
    V0515 = 4         // event: release from   off to on
  }
}

Var 0515, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0530, Link IOCARD_SW, Input 51, Type T     // input for air foil l
{
  IF V0530 = 1     // off to on
  {
    V0535 = 10         // event: move from off to on
  }
  ELSE
  {
    V0535 = 9         // event: release from on to off
  }
}

Var 0535, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0540, Link IOCARD_SW, Input 52, Type T     // input for air foil l
{
  IF V0540 = 1     // off to on
  {
    V0545 = 12         // event: move from off to on
  }
  ELSE
  {
    V0545 = 11         // event: release from on to off
  }
}

Var 0545, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0550, Link IOCARD_SW, Input 54, Type T     // input for anti fog wndsh
{
  IF V0550 = 1     // off to on
  {
    V0555 = 14         // event: move from off to on
  }
  ELSE
  {
    V0555 = 13         // event: release from on to off
  }
}

Var 0555, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0560, Link IOCARD_SW, Input 55, Type T     // input for anti ice wndsh
{
  IF V0560 = 1     // off to on
  {
    V0565 = 16         // event: move from off to on
  }
  ELSE
  {
    V0565 = 15         // event: release from on to off
  }
}

Var 0565, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0570, Link IOCARD_SW, Input 56, Type T     // input for anti ice engine l
{
  IF V0570 = 1     // off to on
  {
    V0575 = 18         // event: move from off to on
  }
  ELSE
  {
    V0575 = 17         // event: release from on to off
  }
}

Var 0575, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0580, Link IOCARD_SW, Input 58, Type T     // input for anti ice engine r
{
  IF V0580 = 1     // off to on
  {
    V0585 = 20         // event: move from off to on
  }
  ELSE
  {
    V0585 = 19         // event: release from on to off
  }
}

Var 0585, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0590, Link IOCARD_SW, Input 53, Type T     // input for anti ice tail
{
  IF V0590 = 1     // off to on
  {
    V0595 = 8         // event: move from off to on
  }
  ELSE
  {
    V0595 = 0         // event: release from on to off
  }
}

Var 0595, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0720, Link IOCARD_SW, Input 67, Type T     // input for anti skid
{
  IF V0720 = 1     // off to arm
  {
    V0725 = 142         // event: move from off to arm
  }
  ELSE
  {
    V0725 = 141         // event: release from arm to off
  }
}

Var 0725, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0770, Link IOCARD_SW, Input 69, Type T     // input for yaw damper
{
  IF V0770 = 1     // off to on
  {
    V0775 = 143         // event: move from off to on
  }
  ELSE
  {
    V0775 = 144         // event: release from on to off
  }
}

Var 0775, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0820, Link IOCARD_SW, Input 71, Type T     // input for mach trim comp
{
  IF V0820 = 1     // norm to ovrd
  {
    V0825 = 147         // event: move from norm to ovrd
  }
  ELSE
  {
    V0825 = 148         // event: release from ovrd to norm
  }
}

Var 0825, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0930, Link IOCARD_SW, Input 64, Type T     // input for bleed air
{
  IF V0930 = 1     // off to hp bld
  {
    V0935 = 133         // event: move from off to hp bld
  }
  ELSE
  {
    V0935 = 134         // event: release from hp bld to off
  }
}

Var 0935, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 0950, Link IOCARD_SW, Input 66, Type T     // input for bleed air
{
  IF V0950 = 1     // off to hp bld
  {
    V0955 = 135         // event: move from off to hp bld
  }
  ELSE
  {
    V0955 = 136         // event: release from hp bld to off
  }
}

Var 0955, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 1020, Link FSUIPC_OUT, Offset $3114, Length 4

Var 1021, Link IOCARD_ENCODER, Input 161, Aceleration 5, Type 2     // Knob for land alt
{
  L0 = V1021 * 10     // Acelerate detents
  IF L0 > 0
  {
    V1023 = 69869         // FSUIPC offset
    V1023 = DELAY 0 ,10     // Reset offset
    V1020 = V1020 + L0
  }
  ELSE
  {
    IF L0 < 0
    {
      V1023 = 69869         // FSUIPC offset
      V1023 = DELAY 0 ,10     // Reset offset
      V1020 = V1020 + L0
    }
  }
}

Var 1023, Link FSUIPC_OUT, Offset $3110, Length 4

Var 1025, Link FSUIPC_OUT, Offset $3114, Length 4

//Var 1026, Link IOCARD_ENCODER, Input 61, Aceleration 2, Type 2     // Knob for baro land alt
//{
//  L0 = V1026 * 1     // Acelerate detents
//  V1027 = 69868         // FSUIPC offset
//  V1027 = DELAY 0 ,10     // Reset offset
//  V1025 = V1025 + L0
//}

//Var 1027, Link FSUIPC_OUT, Offset $3110, Length 4

Var 1110, Link IOCARD_SW, Input 60, Type T     // input for air cond
{
  IF V1110 = 1     // ovrd to auto
  {
    V1115 = 57         // event: move from ovrd to auto
  }
  ELSE
  {
    V1115 = 58         // event: release from auto to ovrd
  }
}

Var 1115, Link IOCP, Offset 2842     // execute Event for Overhead panel

Var 1120, Link IOCARD_SW, Input 59, Type T     // input for ram air
{
  IF V1120 = 1     // off to on
  {
    V1125 = 55         // event: move from off to on
  }
  ELSE
  {
    V1125 = 56         // event: release from on to off
  }
}

Var 1125, Link IOCP, Offset 2842     // execute Event for Overhead panel



var 1240, Link IOCP, Offset 2750 //  APU needle
{
 L0 = v1240 * 9.3
 L1 = 900 - L0
 V1241 = L1 + 100
}
Var 1241, Link USB_SERVOS, Output 1, PosL 1, PosC 613, PosR 1023     // apu_needle_out



Var 1760, Link IOCP, Offset 101     // Auto pilot engaged
{
  IF V1760 = 0  // AP switch inactive
  {
    V1769 = 1    
    V1769 = DELAY 0 ,100   // AT switch trip 1 sec
  }
  ELSE
  {
    V1769 = 0    // AP switch active
  }
}

Var 1769, Link IOCARD_OUT, Output 22  // AP switch disconnect

Var 1950, Link IOCP, Offset 2500     // master warning light
{
  IF V1950 > 50     // ON
  {
    V1951 = 1         // Set: light to on
  }
  ELSE
  {
    V1951 = 0         // Set: light to off
  }
}

Var 1951, Link IOCARD_OUT, Output 17

Var 1970, Link IOCP, Offset 2501     // master caution light
{
  IF V1970 > 50     // ON
  {
    V1971 = 1         // Set: light to on
  }
  ELSE
  {
    V1971 = 0         // Set: light to off
  }
}

Var 1971, Link IOCARD_OUT, Output 18

Var 1980, Link IOCP, Offset 2503     // stick pusher light
{
  IF V1980 > 50     // ON
  {
    V1981 = 1         // Set: light to on
  }
  ELSE
  {
    V1981 = 0         // Set: light to off
  }
}

Var 1981, Link IOCARD_OUT, Output 20

Var 1990, Link IOCP, Offset 2503     //  light output test
{
  IF V1990 > 50     // ON
  {
    V1991 = 1         // Set: light to on
  }
  ELSE
  {
    V1991 = 0         // Set: light to off
  }
}

Var 1991, Link IOCARD_OUT, Output 153

Var 2000, Link IOCP, Offset 2502     // stall light
{
  IF V2000 > 50     // ON
  {
    V2001 = 1         // Set: light to on
    V2005 = 1         // Set: shakcer to on
  }
  ELSE
  {
    V2001 = 0         // Set: light to off
    V2005 = 0
  }
}

Var 2001, Link IOCARD_OUT, Output 23

Var 2005, Link IOCARD_OUT, Output 19

Var 2010, Link IOCP, Offset 2503     // light
{
  IF V2010 > 50     // ON
  {
    V2011 = 1         // Set: light to on
  }
  ELSE
  {
    V2011 = 0         // Set: light to off
  }
}

Var 2011, Link IOCARD_OUT, Output 153

Var 2060, Link IOCP, Offset 2311     //  light
{
  IF V2060 > 50     // ON
  {
    V2061 = 1         // Set: light to on
  }
  ELSE
  {
    V2061 = 0         // Set: light to off
  }
}

Var 2061, Link IOCARD_OUT, Output 153

Var 2070, Link IOCP, Offset 2312     //  GEAR light left red
{
  IF V2070 > 50     // ON
  {
    V2071 = 1         // Set: light to on
  }
  ELSE
  {
    V2071 = 0         // Set: light to off
  }
}

Var 2071, Link IOCARD_OUT, Output 29

Var 2080, Link IOCP, Offset 2316     //  Gear light nose red
{
  IF V2080 > 50     // ON
  {
    V2081 = 1         // Set: light to on
  }
  ELSE
  {
    V2081 = 0         // Set: light to off
  }
}

Var 2081, Link IOCARD_OUT, Output 27

Var 2090, Link IOCP, Offset 2314     //  Gear light right red
{
  IF V2090 > 50     // ON
  {
    V2091 = 1         // Set: light to on
  }
  ELSE
  {
    V2091 = 0         // Set: light to off
  }
}

Var 2091, Link IOCARD_OUT, Output 28

Var 2300, Link IOCP, Offset 2313     //  Gear light left green
{
  IF V2300 > 50     // ON
  {
    V2301 = 1         // Set: light to on
  }
  ELSE
  {
    V2301 = 0         // Set: light to off
  }
}

Var 2301, Link IOCARD_OUT, Output 31

Var 2310, Link IOCP, Offset 2315     //  gear light nose green
{
  IF V2310 > 50     // ON
  {
    V2311 = 1         // Set: light to on
  }
  ELSE
  {
    V2311 = 0         // Set: light to off
  }
}

Var 2311, Link IOCARD_OUT, Output 32

Var 2320, Link IOCP, Offset 2317     //  Gear light right green
{
  IF V2320 > 50     // ON
  {
    V2321 = 1         // Set: light to on
  }
  ELSE
  {
    V2321 = 0         // Set: light to off
  }
}

Var 2321, Link IOCARD_OUT, Output 30

Var 2400, Link IOCP, Offset 2482     //  light
{
  IF V2400 > 50     // ON
  {
    V2401 = 1         // Set: light to on
  }
  ELSE
  {
    V2401 = 0         // Set: light to off
  }
}

Var 2401, Link IOCARD_OUT, Output 153

Var 2420, Link IOCP, Offset 2483     //  light
{
  IF V2420 > 50     // ON
  {
    V2421 = 1         // Set: light to on
  }
  ELSE
  {
    V2421 = 0         // Set: light to off
  }
}

Var 2421, Link IOCARD_OUT, Output 153


Var 2780, Link IOCP, Offset 2359     //  light
{
  IF V2780 > 50     // ON
  {
    V2781 = 1         // Set: light to on
  }
  ELSE
  {
    V2781 = 0         // Set: light to off
  }
}

Var 2781, Link IOCARD_OUT, Output 153

Var 2790, Link IOCP, Offset 2358     //  light
{
  IF V2790 > 50     // ON
  {
    V2791 = 1         // Set: light to on
  }
  ELSE
  {
    V2791 = 0         // Set: light to off
  }
}

Var 2791, Link IOCARD_OUT, Output 153

Var 2800, Link IOCP, Offset 2361     //  light
{
  IF V2800 > 50     // ON
  {
    V2801 = 1         // Set: light to on
  }
  ELSE
  {
    V2801 = 0         // Set: light to off
  }
}

Var 2801, Link IOCARD_OUT, Output 153

Var 2810, Link IOCP, Offset 2362     //  light
{
  IF V2810 > 50     // ON
  {
    V2811 = 1         // Set: light to on
  }
  ELSE
  {
    V2811 = 0         // Set: light to off
  }
}

Var 2811, Link IOCARD_OUT, Output 153

Var 2820, Link IOCP, Offset 2360     //  light
{
  IF V2820 > 50     // ON
  {
    V2821 = 1         // Set: light to on
  }
  ELSE
  {
    V2821 = 0         // Set: light to off
  }
}

Var 2821, Link IOCARD_OUT, Output 153

Var 2830, Link IOCP, Offset 2363     //  light
{
  IF V2830 > 50     // ON
  {
    V2831 = 1         // Set: light to on
  }
  ELSE
  {
    V2831 = 0         // Set: light to off
  }
}

Var 2831, Link IOCARD_OUT, Output 153

Var 3110, Link IOCP, Offset 2387     //  light
{
  IF V3110 > 50     // ON
  {
    V3111 = 1         // Set: light to on
  }
  ELSE
  {
    V3111 = 0         // Set: light to off
  }
}

Var 3111, Link IOCARD_OUT, Output 153

Var 5560, Link IOCARD_ANALOGIC, Input #4, PosL 20, PosC 67, PosR 153     //  THROTTLE  1
{
  CALL V5562
}

Var 5561, Link IOCP, Offset 2551     // Throtlle 1 0-100 % FROM VC

Var 5562, Link SUBRUTINE
{
  L0 = V5560 - 131     // Throttle 2 kalib
  V5563 = L0 * 160     // Throttle 2 output
}

Var 5563, Link FSUIPC_OUT, Offset $088C, Length 2     // Set axis in FSUIPC

Var 5570, Link IOCARD_ANALOGIC, Input #3, PosL 20, PosC 52, PosR 140     // THROTTLE 2
{
  CALL V5572
  CALL V5581
}

Var 5572, Link SUBRUTINE
{
  L0 = V5570 - 129     // Throttle 2 kalib
  V5573 = L0 * 163     // Throttle 2 output
}

Var 5573, Link FSUIPC_OUT, Offset $0924, Length 2     // Set axis in FSUIPC

Var 5580, Link IOCP, Offset 2526     // Auto throttle engaged
{
  IF V5580 = 100  // AT switch inactive
  {
    V1599 = 1    
    V1599 = DELAY 0 ,100   // AT switch trip for 1 sec
  }
  ELSE
  {
    V1599 = 0   // AT switch active
  }
}

Var 1599, Link IOCARD_OUT, Output 21  // Disconnect AT switch

Var 5571, Link IOCP, Offset 2555     // Throtlle 1 0-100 % FROM VC

Var 5577, Link FSUIPC_IN, Offset $023A, Length 1
{
  CALL V5581
}

Var 5581, Link SUBRUTINE
{
  L1 = V5570 - 128     // *******************Rette fra 126 pga. AT render bagud*******************************************
  L1 = L1 - V5571     // lever - VC throttle
  IF V5580 = 0
  {
    IF L1 < -1
    {
      V5591 = 1    
    }
    ELSE
    {
      V5591 = 0    
    }
    IF L1 > 1
    {
      V5592 = 1    
    }
    ELSE
    {
      V5592 = 0    
    }
  }
  ELSE
  {
    V5591 = 0    
    V5592 = 0    
  }
}

Var 5591, Link IOCARD_OUT, Output 12     // motor -

Var 5592, Link IOCARD_OUT, Output 11     // motor +

Var 5770, Link IOCARD_ANALOGIC, Input #2, PosL 7, PosC 127, PosR 235     //  Long trim pot
{
  CALL V5781
}

Var 5771, Link IOCP, Offset 2569     // Trim indicator 0-100 % FROM VC
{
  CALL V5781
}

Var 5781, Link SUBRUTINE
{
  L1 = V5771 * 2.55
  L1 = L1 - 10
  L2 = V5770 - L1     // VC indicator - indicator
  IF L2 < -3
  {
    V5791 = 1    
    V5791 = DELAY 1 ,3
  }
  ELSE
  {
    V5791 = 0    
  }
  IF L2 > 3
  {
    V5792 = 1
    V5792 = DELAY 1 ,3
  }
  ELSE
  {
    V5792 = 0    
  }
}

Var 5791, Link IOCARD_OUT, Output 15     // motor -

Var 5792, Link IOCARD_OUT, Output 16     // motor +

Var 5800, Link IOCARD_ANALOGIC, Input #1, PosL 0, PosC 127, PosR 255     //  Spoiler pot input
{
  IF V5800 < 9
  {
    V5802 = 0    
  }
  IF V5800 > 12
  {
    IF V5800 < 40
    {
      V5802 = 4000    
    }
  }
  IF V5800 > 85
  {
    IF V5800 < 115
    {
      V5802 = 6900    
    }
  }
  IF V5800 > 120
  {
    IF V5800 < 155
    {
      V5802 = 9000    
    }
  }
  IF V5800 > 160
  {
    IF V5800 < 185
    {
      V5802 = 10500    
    }
  }
  IF V5800 > 190
  {
    IF V5800 < 210
    {
      V5802 = 12500    
    }
  }
  IF V5800 > 240
  {
    IF V5800 < 260
    {
      V5802 = 12800    
    }
  }
}

Var 5802, Link FSUIPC_INOUT, Offset $0BD0, Length 4     // FSUIPC Spoiler lever setting

Var 5803, Link IOCP, Offset 2566     // Spoiler lever position

Var 5808, Link IOCP, Offset 2200     // Speed needle asi capt.
{
  IF V5803 > 98
  {
    IF V5800 < 240                  //  Spoiler pot input
    {
      IF V5808 > 250
      {
      }
      V5804 = 0    
      V5805 = 1    
    }
  }
  IF V5802 < 500
  {
    V5805 = 0
    V5804 = 1
  }
  IF V5800 < 8  //  Spoiler pot input
  {
    V5805 = 0
    V5804 = 1
  }
}

Var 5804, Link IOCARD_OUT, Output 13     // motor - Autospoiler ret

Var 5805, Link IOCARD_OUT, Output 14     // motor + Autospoiler ext

//*******************************************************************Rettelse 130115*********************************************




Var 7620 // STATUS FOR DC BUS TIE
Var 7622 // Status power on
Var 7623 //
Var 7624 //
Var 7625, Link IOCP, Offset 2753, Value 0  // ovhd_L_dc_load_needle2
{
 IF V7625 > 22
 {
  V7620 = 1   // DC BUS TIE ON
  V7622 = 1
 }
 IF V7625 = 0
  {
  V7622 = -1
  IF V7605 < 20
  {
   V7620 = 0   // DC BUS TIE OFF
  }
 }
 V7624 = V7622 + V7623
 }

Var 7605, Link IOCP, Offset 2755, Value 0  // ovhd_R_dc_load_needle2
{
 IF V7605 > 22
 {
  V7620 = 1   // DC BUS TIE ON
  V7623 = 1
 }
 IF V7605 = 0
  {
  V7623 = -1
  IF V7625 < 20
  {
   V7620 = 0  // DC BUS TIE OFF
  }
 }
 V7624 = V7623 + V7624
}

//*********** DC CONTROL AND OUTPUT *****************
Var 7609
Var 7604, Link SUBRUTINE  // DC BUS TIE SWITCH
{
 V7609 = V300
 IF V0300 = 1
 {
  IF V7614 = 0
  {
   CALL V7610
  }
 }
 IF V7609 = 0
 {
  IF V7612 > 16
  {
   CALL V1362          // Norm display L + R NAV FGCP
   IF V7625 = 0
   {
    CALL V1383          // Norm display CRS FGCP R
    CALL V1384          // Norm display CRS FGCP L
   }
  }
 }
}


//*********** TURN OFF DISPLAY IF FMA INIT *****************

Var 7600, Link IOCP, Offset 2295, Value 0  // FMA INIT L
{
 IF V7600 = 100    // FMA init
  {
  IF V9990 < 1     // Lamp test
  {
   CALL V7699    // Turn off display
  }
 }
 ELSE
 {
  IF V7612 > 0   // ovhd_L_dc_load_needle1
  {
   CALL V7698    // Turn on display
  }
 }
}


//*********** DISPLAY ON *****************

Var 7698, Link SUBRUTINE  // DISPLAY ON
{
  V9995 = 131137      // event: release from on to off
  V1775 = V1770       // Norm display ALT FGCP
  V1640 = V1635       // Norm display HDG FGCP
  V1460 = V1455       // Norm display SPD FGCP
  CALL V9145          // Norm display V/S FGCP
  CALL V1383          // Norm display CRS FGCP R
  CALL V1384          // Norm display CRS FGCP L
  CALL V1362          // Norm display L + R NAV FGCP
}


//*********** TURN OFF DISPLAY IF LEFT DC BUS OFF *****************

Var 7612, Link IOCP, Offset 2752, Value 0  // ovhd_L_dc_load_needle1
{
 CALL V7604      // BUS STATUS
 IF V7612 = 0  // BUS on
 {
  CALL V1362          // Norm display L + R NAV FGCP
  CALL V7699    // Turn off display
 }

}


//*********** R DC BUS ON *************************

Var 7614, Link IOCP, Offset 2754, Value 0  // ovhd_R_dc_load_needle1
{
 CALL V7604
 IF V7614 > 10
 {
  CALL V1362          // Norm display L + R NAV FGCP
 }
 IF V7614 > 20
 {
  IF V7600 < 100    // FMA init
  {
   CALL V1384       // Norm display CRS FGCP L
  }
 }
 IF V7614 < 18    //   DC BUS R
 {
  IF V7612 = 0    //   DC BUS L
  {
   V1387 = -999999   // CRS L DISPLAY OFF
  }
 }
}



//*********** DISPLAY ON/OFF *****************

Var 7699, Link SUBRUTINE  // DISPLAY OFF
{
  V1775 = -999999         // display ALT FGCP
  V1640 = -999999         // display HDG FGCP
  V1460 = -999999         // display SPD FGCP
  V9150 = -999999         // display V/S FGCP
  V1387 = -999999         // display CRS FGCP
  IF V7600 = 100    // FMA init
  {
   V1385 = -999999        // display CRS FGCP
  }
}



//*********** TURN OFF NAV DISPLAY *****************


Var 7603, Link FSUIPC_IN, Offset $3103, Length 1  // AVIONIC OFF
{
 IF V7603 = 0   // BUS off
 {
  CALL V7610    // Turn off display
  V7603 = DELAY 0 20
 }
 ELSE
 {
  CALL V1362   // NAV DATA CALC
 }
}

//*********** TURN OFF DISPLAY *****************

Var 7610, Link SUBRUTINE  // DISPLAY OFF NAV
{
 V1368 = -999999         // display NAV R FGCP
 V1385 = -999999         // display CRS R FGCP
 IF V7612 < 5
 {
  V1369 = -999999         // display NAV FGCP
 }
}


//*********** FIX WRONG TURN OFF DISPLAY CRS R IF FMA R INIT *****************

Var 7616, Link IOCP, Offset 2493, Value 0  // FMA INIT R
{
 IF V9990 < 1     // Lamp test
 {
  CALL V1383      // CRS R
 }
}


//*********** ON L NAV EMERG PWR *****************

Var 7607, Link SUBRUTINE  // EMERGENCY BUS AKTIVE
{
 IF V0140 = 100
 {
  CALL V1362
  V1385 = -999999         // display CRS R FGCP
  V1368 = -999999         // display NAV R FGCP
 }
}



//*********** GET R CRS DATA *****************

Var 1380, Link FSUIPC_IN, Offset $0C5E, Length 2
{
 IF V1385 > -999999  // IF DISPLAY IS OFF KNOB IS OFF
 {
  CALL V1383
 }
}


//*********** SET R CRS DISPLAY DATA *****************

Var 1383, Link SUBRUTINE     // Display crs R
{
 V1385 = V1380
 IF V7616 = 100      // FMA R INIT
 {
   V1385 = -999999    // DISPLAY OFF

 }
}

Var 1385, Link IOCARD_DISPLAY, Digit 0, Numbers 3     // Display Course right



//*********** GET L CRS DATA *****************

Var 1381, Link FSUIPC_IN, Offset $0C4E, Length 2
{
 IF V1387 > -999999
 {
  CALL V1384
 }
}


//*********** SET L CRS DISPLAY DATA *****************

Var 1384, Link SUBRUTINE     // Display crs
{
 V1387 = V1381
 IF V5980 = 0   // DC EMER BUS OFF
 {
  V1387 = -999999
 }
 IF V0001 = 0   // DC EMER BUS OFF
 {
  V1387 = -999999
 }
}


Var 1387, Link IOCARD_DISPLAY, Digit 8, Numbers 3     // Display Course Left



//*********** GET L NAV DATA *****************

Var 1360, Link FSUIPC_IN, Offset $0350, Length 2     //  NAV 1  LEFT
{
 IF V7603 = 1   // AVIONIC ON
 {
  CALL V1362
 }
}


//*********** GET R NAV DATA *****************

Var 1367, Link IOCP, Offset 25     // NAV 2 RIGHT
{
 IF V7603 = 1   // AVIONIC ON
 {
  CALL V1362
 }
}


//*********** CALCULATE NAV DATA*****************

Var 1362, Link SUBRUTINE     // NAV
{
 IF V7603 = 1
 {
  L1 = FROMBCD V1360
  V1369 = L1 + 10000
  L0 = FROMBCD V1367
  V1368 = L0 + 10000
  CALL V1383
 }
 IF V5980 = 0   // DC EMER BUS OFF
 {
  V1369 = -999999
 }
}


Var 1368, Link IOCARD_DISPLAY, Digit 3, Numbers 5     // Display NAV FRQ right

Var 1369, Link IOCARD_DISPLAY, Digit 11, Numbers 5     // Display NAV FRQ left


//*********** GET V/S DATA*****************

Var 9140, Link IOCP, Offset 118     // V/S
{
  CALL V9145
}


//*********** CALCULATE V/S DATA*****************

Var 9145, Link SUBRUTINE     // Display V/S
{
  V9145 = 1
  V9150 = V9140
}

Var 9150, Link IOCARD_DISPLAY, Digit 20, Numbers 5     // Display V/S


//*********** CALCULATE SPD DATA*****************

Var 1440, Link IOCP, Offset 2543     // Speed fgcp Knob
{
 IF V1460 > -999999
 {
  V1445 = V1440 / 4
  V1450 = V1450 - V1445
  IF V1450 < 0
  {
    V1455 = V1455 + 1
  }
  IF V1450 > 0     // Encoder turn down
  {
    V1455 = V1455 - 1
  }
  IF V1445 = 0     // Encoder turn up from 24 to 0
  {
    IF V1450 = 24
    {
      V1455 = V1455 + 2
    }
  }
  IF V1445 = 24     // Encoder turn down from 0 to 24
  {
    IF V1450 = -24
    {
      V1455 = V1455 - 2
    }
  }
  V1450 = V1445
  IF V1455 < 100     // Scale min/max
  {
    V1455 = 100
  }
  IF V1455 > 350
  {
    V1455 = 350
  }
  V1460 = V1455
 }
}

Var 1460, Link IOCARD_DISPLAY, Digit 29, Numbers 3     // Display used

Var 1445, Link IOCARD_DISPLAY, Digit 41, Numbers 3     // Display Speed

Var 1450, Link IOCARD_DISPLAY, Digit 35, Numbers 3     // Display used as memory

Var 1455, Link IOCARD_DISPLAY, Digit 38, Numbers 3     // Display used as memory


//*********** CALCULATE HDG DATA*****************

Var 1620, Link IOCP, Offset 2545     // FGCP HDG Read knop position
{
 IF V1640 > -999999
 {
  V1625 = V1620 / 4     // Encoder scale 100 one turn = 25 decents
  V1630 = V1630 - V1625
  IF V1630 < 0     // Encoder turn up
  {
    V1635 = V1635 + 1
  }
  IF V1630 > 0     // Encoder turn down
  {
    V1635 = V1635 - 1
  }
  IF V1625 = 0     // Encoder turn up from 24 to 0
  {
    IF V1630 = 24
    {
      V1635 = V1635 + 2
    }
  }
  IF V1625 = 24     // Encoder turn down from 0 to 24
  {
    IF V1630 = -24
    {
      V1635 = V1635 - 2
    }
  }
  V1630 = V1625
  IF V1635 < 0     // SCALE 360 degrees
  {
    V1635 = 359
  }
  IF V1635 > 359
  {
    V1635 = 0
  }
  V1640 = V1635
 }
}

Var 1640, Link IOCARD_DISPLAY, Digit 26, Numbers 3     // Display HDG

Var 1625, Link IOCARD_DISPLAY, Digit 44, Numbers 3     // Display used as memory

Var 1630, Link IOCARD_DISPLAY, Digit 47, Numbers 3     // Display used as memory

Var 1635, Link IOCARD_DISPLAY, Digit 50, Numbers 3     // Display used as memory


//*********** GET AP ALT DATA *****************
Var 1770, Link IOCP, Offset 2200  // CM1_asi_needle1
{
  V1775 = V1770
}

Var 1775, Link IOCARD_DISPLAY, Digit 16, Numbers 4     // Display

Var 1785, Link IOCARD_DISPLAY, Digit 53, Numbers 3     // Display

Var 1780, Link IOCARD_DISPLAY, Digit 56, Numbers 3     // Display


//*********** DIM DISPLAY *****************
Var 9975, name D_Dimmer, Link IOCARD_DISPLAY, Digit 15, Numbers 5
Var 9976, name D_Dimmers, Link IOCARD_DISPLAY, Digit 31, Numbers 5

//*********** LAMP TEST *****************
Var 7602, Link FSUIPC_IN, Offset $3103, Length 1  // AVIONICK ON
Var 9990, Link IOCARD_SW, Input 57, Type T     // input for lamp test
{
  V9995 = 536870977         // event: move from off to on
  IF V9990 = 1     // off to on
  {
   IF V7602 > 0   // Avionic on
    {
    IF V1368 > -999999         // display is on NAV FGCP
    {
     V1368 = 18888         // Test display NAV FGCP
    }
    IF V1369 > -999999         // display is on NAV FGCP
    {
     V1369 = 18888         // Test display NAV FGCP
    }
    IF V1775 > -999999         // display is on ALT FGCP
    {
     V1775 = 8888         // Test display ALT FGCP
    }
    IF V1640 > -999999         // display is on HDG FGCP
    {
     V1640 = 888         // Test display HDG FGCP
    }
    IF V1460 > -999999         // display is on SPD FGCP
    {
     V1460 = 8888         // Test display SPD FGCP
    }
    IF V9150 > -999999         // display is on V/S FGCP
    {
    V9150 = 88888        // Test display V/S FGCP
    }
    IF V1385 > -999999         // display is on CRS FGCP
    {
     V1385 = 888         // Test display CRS FGCP
    }
    IF V1387 > -999999         // display is on CRS FGCP
    {
     V1387 = 888         // Test display CRS FGCP
    }
   }
  }
  ELSE
  {
   V9995 = 131137         // event: release from on to off
   IF V7602 > 0   // Avionic on
   {
    IF V1368 = 18888         // display is on NAV FGCP
    {
     CALL V1362         // Test display NAV FGCP
    }
    IF V1369 = 18888         // display is on NAV FGCP
    {
     V1369 = 18888         // Test display NAV FGCP
    }
    IF V1775 = 8888         // display is on ALT FGCP
    {
     V1775 = V1770         // Test display ALT FGCP
    }
    IF V1640 = 888         // display is on HDG FGCP
    {
     V1640 = V1635         // Test display HDG FGCP
    }
    IF V1460 = 8888         // display is on SPD FGCP
    {
     V1460 = V1455         // Test display SPD FGCP
    }
    IF V9150 = 88888         // display is on V/S FGCP
    {
     CALL V9145         // Test display V/S FGCP
    }
    IF V1385 = 888        // display is on CRS FGCP
    {
     CALL V1383         // Test display CRS FGCP
    }
    IF V1387 = 888         // display is on CRS FGCP
    {
     CALL V1384         // Test display CRS FGCP
    }
   }
  }
}

Var 9995, Link IOCP, Offset 2842     // execute Event for Overhead panel



//*********** ANUNCIAOR DISPLAY *****************


Var 5840, Link IOCP, Offset 2683     // FUEL ICE light
{
  IF V5840 > 50     // ON
  {
    V5841 = 0         // Set: light to on
  }
  ELSE
  {
    V5841 = 1         // Set: light to off
  }
}

Var 5841, Link IOCARD_OUT, Output 97     //  light




Var 5980, Link IOCP, Offset 2694     // DC emer bus light
{
  CALL V1384
  CALL V1362
  IF V5980 > 50     // ON
  {
    V5981 = 0         // Set: light to on
  }
  ELSE
  {
    V5981 = 1         // Set: light to off
  }
}

Var 5981, Link IOCARD_OUT, Output 77     // DC emer bus light



Var 5990, Link IOCP, Offset 2677     // ENG ICE light
{
  IF V5990 > 50     // ON
  {
    V5991 = 0         // Set: light to on
  }
  ELSE
  {
    V5991 = 1         // Set: light to off
  }
}

Var 5991, Link IOCARD_OUT, Output 96     //  light




Var 6000, Link IOCP, Offset 2691     // ENG ICE light
{
  IF V6000 > 50     // ON
  {
    V6001 = 0         // Set: light to on
  }
  ELSE
  {
    V6001 = 1         // Set: light to off
  }
}

Var 6001, Link IOCARD_OUT, Output 82     //  light



Var 6010, Link IOCP, Offset 2684     // WING ICE light
{
  IF V6010 > 50     // ON
  {
    V6011 = 0         // Set: light to on
  }
  ELSE
  {
    V6011 = 1         // Set: light to off
  }
}

Var 6011, Link IOCARD_OUT, Output 95     //  light




Var 6020, Link IOCP, Offset 2685     // TAIL ICE light
{
  IF V6020 > 50     // ON
  {
    V6021 = 0         // Set: light to on
  }
  ELSE
  {
    V6021 = 1         // Set: light to off
  }
}

Var 6021, Link IOCARD_OUT, Output 93     //  light




Var 6130, Link IOCP, Offset 2678     // FUEL ICE light
{
  IF V6130 > 50     // ON
  {
    V6131 = 0         // Set: light to on
  }
  ELSE
  {
    V6131 = 1         // Set: light to off
  }
}

Var 6131, Link IOCARD_OUT, Output 94     //  light




Var 6140, Link IOCP, Offset 2692     // FUEL ICE light
{
  IF V6140 > 50     // ON
  {
    V6141 = 0         // Set: light to on
  }
  ELSE
  {
    V6141 = 1         // Set: light to off
  }
}

Var 6141, Link IOCARD_OUT, Output 80     //  light





Var 6290, Link IOCP, Offset 2690     // OXYGEN light
{
  IF V6290 > 50     // ON
  {
    V6291 = 0         // Set: light to on
  }
  ELSE
  {
    V6291 = 1         // Set: light to off
  }
}

Var 6291, Link IOCARD_OUT, Output 84     //  light





Var 6360, Link IOCP, Offset 2680     // AC EMER BUS light
{
  IF V6360 > 50     // ON
  {
    V6361 = 0         // Set: light to on
  }
  ELSE
  {
    V6361 = 1         // Set: light to off
  }
}

Var 6361, Link IOCARD_OUT, Output 90     //  light




Var 6330, Link IOCP, Offset 2686     // TAIL COMP TEM HIGH light
{
  IF V6330 > 50     // ON
  {
    V6331 = 0         // Set: light to on
  }
  ELSE
  {
    V6331 = 1         // Set: light to off
  }
}

Var 6331, Link IOCARD_OUT, Output 91     //  light



Var 6340, Link IOCP, Offset 2693     // CAB ALT light
{
  IF V6340 > 50     // ON
  {
    V6341 = 0         // Set: light to on
  }
  ELSE
  {
    V6341 = 1         // Set: light to off
  }
}

Var 6341, Link IOCARD_OUT, Output 78     //  light




Var 6350, Link IOCP, Offset 2687     // APU FIRE light
{
  IF V6350 > 50     // ON
  {
    V6351 = 0         // Set: light to on
  }
  ELSE
  {
    V6351 = 1         // Set: light to off
  }
}

Var 6351, Link IOCARD_OUT, Output 89     //  light



Var 6380, Link IOCP, Offset 2689     // RUDDER UNRED light
{
  IF V6380 > 50     // ON
  {
    V6381 = 0         // Set: light to on
  }
  ELSE
  {
    V6381 = 1         // Set: light to off
  }
}

Var 6381, Link IOCARD_OUT, Output 86     //  light



Var 6400, Link IOCP, Offset 2688     // AHRS BASIC light
{
  IF V6400 > 50     // ON
  {
    V6401 = 0         // Set: light to on
  }
  ELSE
  {
    V6401 = 1         // Set: light to off
  }
}

Var 6401, Link IOCARD_OUT, Output 88     //  light



Var 6403, Link IOCP, Offset 2681     // AHRS BASIC light
{
  IF V6403 > 50     // ON
  {
    V6404 = 0         // Set: light to on
  }
  ELSE
  {
    V6404 = 1         // Set: light to off
  }
}

Var 6404, Link IOCARD_OUT, Output 101    //  light




Var 6430, Link IOCP, Offset 2679    // CARGO FIRE light
{
  IF V6430 > 50     // ON
  {
    V6431 = 0         // Set: light to on
  }
  ELSE
  {
    V6431 = 1         // Set: light to off
  }
}

Var 6431, Link IOCARD_OUT, Output 92    //  light



Var 6407, Link IOCP, Offset 2674     // AHRS BASIC light
{
  IF V6407 > 50     // ON
  {
    V6408 = 0         // Set: light to on
  }
  ELSE
  {
    V6408 = 1         // Set: light to off
  }
}

Var 6408, Link IOCARD_OUT, Output 102     //  light


Var 6520, Link IOCP, Offset 2675    // ELEV PWR ON light
{
  IF V6520 > 50     // ON
  {
    V6521 = 0         // Set: light to on
  }
  ELSE
  {
    V6521 = 1         // Set: light to off
  }
}

Var 6521, Link IOCARD_OUT, Output 100     //  light



Var 7100, Link IOCARD_SW, Input 57, Type T     // input for lamp test
{
  IF V7100 > 0     // ON
  {
    V7101 = 1         // Set: light to on
    V7103 = 1         // Set: light to on

  }
  ELSE
  {
    V7101 = 0         // Set: light to off
    V7103 = DELAY 0 400 // Set: light delay to off
  }
}

Var 7101, Link IOCARD_OUT, Output 198     //  light
Var 7103, Link IOCARD_OUT, Output 99     //  light




Med venlig hilsen / Best regards

Claus

 

Go to Top of Page


Set us as your default homepage Bookmark us Privacy   © 2009 MD-80 Cockpit Project - All Rights Reserved. Design by: R.Frost SkyPortal.net Go To Top Of Page

Page load time - 0,891