Results 1 to 3 of 3
  1. #1
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Mar 2014
    Location
    Berlin
    Posts
    6
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    SIOC, Lvars, Offsets, help needed

    Hey Nico,
    I've tried reading through a bunch of threads, even contacted Pete Dowson (FSUIPC), a few guys at LINDA... and none of them could help. I'm hoping that you can, since you seem to be the SIOC master (I probably should have come here first).

    I'm really a n00b when it comes to programming, although I think I'm sort of getting the hang of it at least a little. I've been able to take a simple code and make my Korry switch light up (see further down for the code... which I'll get to again). Where I have the problem though, is writing variables to SIOC that FSX can read and use to control what's in the cockpit... not even sure I'm asking that right.

    Let me start by saying, I'm trying to build a Q400 cockpit based off the Majestic Simulations Q400. (You can see my panels at https://www.facebook.com/FlyaDash). I can run the basic FSUIPC offsets that the default aircraft use, but the Q400 uses variables, like the following:
    function ICE_EngIntake_L_open ()
    ipc.writeLvar("MJC_VAR_WRITE_VALUE", 1)
    ipc.writeLvar("MJC_VAR_WRITE_CODE", 70232)
    DspShow ("IntL", "open")
    end

    function ICE_EngIntake_L_close ()
    ipc.writeLvar("MJC_VAR_WRITE_VALUE", 0)
    ipc.writeLvar("MJC_VAR_WRITE_CODE", 70232)
    DspShow ("IntL", "clse")
    end

    What I'm trying to do is figure out how I can get that information into SIOC, so that my Korry switch will function correctly. Granted, I could just use LINDA, which has the switch already written, but then I can't make my LEDs in the Korry switch work. If I do something basic like the Parking Brake, the Korry switch works as it should (like in this example):

    Var 0400, Value 0 // Inicialización / Var init
    Var 0001, Link FSUIPC_INOUT, Offset $0BC8, Length 2 //
    Var 0002, Link IOCARD_SW, Input 2 Type I //
    {
    IF V0002 = 1
    {
    V0001 = 32767
    V0003 = 0
    V0004 = DELAY 1 700
    }
    ELSE
    {
    V0001 = 0
    V0003 = DELAY 1 700
    V0004 = 0
    }
    }
    Var 0003, Link IOCARD_OUT, Output 11
    Var 0004, Link IOCARD_OUT, Output 12

    The main problem is that most of the cockpit, while in LINDA, doesn't use offsets like in my example above. Is there any possible way you could help me? Hopefully? If I can get at least the two Korry switches for the Engine Intake doors to work, I can then move on to the rest of my overhead, making sure it's all coded the proper way... but these switches are basic (at least in tests... there's really more to it, depending on if the battery is on, and either the ground power is connected or APU is on), with the korry being off/out - the bottom "CLOSED" LED is on, and when the korry is on/in the top "OPN" LED is on, like in the picture... but how can I get that to work with SIOC so that it interacts with the sim?

    Best Regards,
    Jack

    Attached Images Attached Images

  2. #2
    25+ Posting Member
    Join Date
    Oct 2008
    Location
    Milwaukee, WI
    Posts
    44
    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, Lvars, Offsets, help needed

    Hi One_shot, I'm no SIOC expert… but, I looked at your code. What do you mean when you say that your cockpit doesn't use offsets? Perhaps I'm wrong, but I thought there were a number of "unassigned" offsets that could be written for certain applications, like your engine anti-ice. Am I wrong about that? Sorry if I'm completely misunderstanding your question.

  3. #3
    25+ Posting Member
    Join Date
    Oct 2008
    Location
    Milwaukee, WI
    Posts
    44
    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, Lvars, Offsets, help needed

    Hi Jack,

    Also, this PDF relates to Sim-Avionics.com's products, but it goes into offset stuff… not sure if it can steer you in the right direction:

    "So what is FSUIPC and these Offset things?"
    http://www.sim-avionics.com/downloads/FSUIPC%20Help.pdf