Results 1 to 3 of 3
  1. #1
    25+ Posting Member
    Join Date
    Jul 2010
    Location
    Frequently over Denver
    Posts
    62
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    SIOC and Homemade MCP Not Interfacing

    Hi all!

    I have been testing my homemade MCP for the last few days, but it seems that the only displays that will interact and change according to FSX is the three digits for speed/mach. Since I am new to SIOC, I modified one of the included MCP scripts to suit my needs instead of making one from scratch.

    Can anyone figure out what I am doing wrong? I can't tell if it is a problem with the script, or with FSX or FSUIPC.


    //********************************
    // INICIALIZACION
    //********************************

    VAR 0000, VALUE 0
    {
    V0403 = 1 // HDG
    V0404 = 10 // ALT
    V0050 = SETBIT 23 // Pone MODO IAS
    V0057 = V0004 // IAS leidas en IAS temporal
    V0058 = V0005 // MATH leidas en MATH temporal
    V0402 = V0004 // Pone por IAS en display
    }

    //********************************
    // ENTRADAS DESDE FSUIPC
    //********************************
    Var 0001, Link FSUIPC_IN, Offset $07F2, Length 2 // VS de entrada
    {
    L0 = V0001 // En L0 el valor leido
    C0 = TESTBIT V0001 ,15 // Comprueba si es Negativo
    IF C0
    {
    V0800 = L0 - 65536 // Si es negativo binario pasa a negativo decimal
    }
    ELSE
    {
    V0800 = L0 // No es negativo, deja igual dejando siempre en temporal
    }
    }
    Var 0002, Link FSUIPC_IN, Offset $051C, Length 2 // Indicadores MCP
    {
    C0 = TESTBIT V0002 ,0 // Está apagado el Display del VS ?
    IF C0 // SI, entonces
    {
    V0400 = -999999 // Apaga resto de digitos
    }
    ELSE // NO, entonces
    {
    }
    }
    Var 0003, Link FSUIPC_IN, Offset $04F0, Length 2 // LUCES del MCP
    {
    V0502 = TESTBIT V0003 ,2 // V/S
    V0500 = TESTBIT V0003 ,11 // A/T
    V0507 = TESTBIT V0003 ,3 // ALT HOLD
    V0508 = TESTBIT V0003 ,4 // APP
    V0509 = TESTBIT V0003 ,5 // LOC
    V0510 = TESTBIT V0003 ,6 // LNAV
    V0511 = TESTBIT V0003 ,7 // HDG
    V0513 = TESTBIT V0003 ,14 // VNAV

    C0 = TESTBIT V0003 ,15 // Modo MATH o IAS ?
    IF C0 // MATH MODE
    {
    V0058 = V0005 // Cargo valor en temporal
    CALL V0901 // Display del valor
    }
    ELSE // IAS MODE
    {
    V0057 = V0004 // Cargo valor en temporal
    CALL V0901 // Display del valor
    }
    }
    Var 0004, Link FSUIPC_IN, Offset $07E2, Length 2 // IAS
    {
    CALL V0901 // Display del valor
    }
    Var 0005, Link FSUIPC_IN, Offset $07E8, Length 2 // MATH
    {
    CALL V0901 // Display del valor
    }
    //********************************
    // SALIDAS A FSUIPC
    //********************************
    Var 0050, Link FSUIPC_OUT, Offset $5410, Length 4 // Pulsadores-I PM
    Var 0051, Link FSUIPC_OUT, Offset $5414, Length 4 // Pulsadores-II PM
    Var 0052, Link FSUIPC_OUT, Offset $07F2, Length 2 // V/S de salida
    Var 0053, Link FSUIPC_OUT, Offset $5414, Length 4 // Botones MCP
    Var 0055, Link FSUIPC_OUT, Offset $07CC, Length 2 // HDG
    Var 0056, Link FSUIPC_OUT, Offset $07D4, Length 2 // ALT
    Var 0057, Link FSUIPC_OUT, Offset $07E2, Length 2 // IAS
    Var 0058, Link FSUIPC_OUT, Offset $07E8, Length 2 // MATH

    //********************************
    // DISPLAYS 7 SEGMENTOS
    //********************************
    Var 0400, Link IOCARD_DISPLAY, Digit 5, Numbers 4 // VS
    Var 0402, Link IOCARD_DISPLAY, Digit 12, Numbers 3 // IAS Y MACH
    Var 0403, Link IOCARD_DISPLAY, Digit 9, Numbers 3 // HEADING
    Var 0404, Link IOCARD_DISPLAY, Digit 0, Numbers 5 // ALT

    //*************************************
    // SALIDAS DE LA MASTER (LEDS Y FIJOS)
    //*************************************
    Var 0500, Link IOCARD_OUT, Output 09 // Led A/T
    Var 0502, Link IOCARD_OUT, Output 05 // Led V/S
    Var 0507, Link IOCARD_OUT, Output 04 // Led ALT HOLD
    Var 0508, Link IOCARD_OUT, Output 03 // Led APP
    Var 0509, Link IOCARD_OUT, Output 02 // Led LOC
    Var 0510, Link IOCARD_OUT, Output 07 // Led LNAV
    Var 0511, Link IOCARD_OUT, Output 06 // Led HDG
    Var 0513, Link IOCARD_OUT, Output 08 // Led VNAV

    //********************************
    // VARIABLES IOCP INTERNAS
    //********************************
    Var 0800 // Valor temporal del V/S

    //********************************
    // RUTINAS INTERNAS
    //********************************
    Var 0900, Link SUBRUTINE, name sub // Pinta V/S
    {
    C0 = TESTBIT V0002 ,0 // Comprueba si deben de estar apagados
    C0 = NOT C0
    IF C0 // Sólo en el caso de estar encendidos
    {
    IF V0800 < 0 // Si V/S es negativo, pasa a positivo
    {
    L0 = ABS V0800
    }
    ELSE
    {
    L0 = V0800
    }
    V0400 = L0 / 100 // Manda el valor ajustado de V/S a display
    }
    }
    Var 0901, Link SUBRUTINE // Pinta IAS / MATH
    {
    C0 = TESTBIT V0003 ,15 // Modo MATH o IAS ?
    IF C0 // MATH MODE
    {
    V0402 = V0005 // Pone valor MATH en el display
    }
    ELSE
    {
    V0402 = V0004 // Pone valor IAS en el display
    }
    }



    Thanks in advance!

    Steve

  2. #2
    2000+ Poster - Never Leaves the Sim kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    2,200
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC and Homemade MCP Not Interfacing

    Hi Steve,
    What aircraft are you trying to interface? Are you sure that these FSUIPC ofssets are supported by that aircraft?

    Nico

  3. #3
    25+ Posting Member
    Join Date
    Jul 2010
    Location
    Frequently over Denver
    Posts
    62
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: SIOC and Homemade MCP Not Interfacing

    Thanks for your quick post! Now that I look at it, I don't think the aircraft I tested it on (Quality Wings and POSKY) support those offsets. I'll buy the Level-D 767 tonight, and let you know how that goes.

    Steve