Results 1 to 6 of 6
  1. #1
    25+ Posting Member Roarkr's Avatar
    Join Date
    Feb 2011
    Location
    Asker Norway
    Posts
    71
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Sending FSUIPC offset from SIOC problem, needs help

    Hi,

    I need some help to solve a SIOC issue.


    In my SIOC script I send the 69990 control to FSUIPC with 2 consequtive values in order to switch the VOR1/ADF1 in PMDG NGX EFIS panel. In order to cahnge the PMDG switch I need to send 2 consequtive values not only 1.

    The SIOC code is:

    Var 0074, Link IOCARD_SW, Input 65, Type I
    {
    IF V0074 = 1
    {
    &FS_PAR = -2147483648
    &FS_CONTROL = 69990
    &FS_CONTROL = DELAY 0 ,15

    &FS_PAR = 524288
    &FS_CONTROL = 69990
    &FS_CONTROL = DELAY 0 ,15
    }

    ELSE
    {
    &FS_PAR = 536870912
    &FS_CONTROL = 69990
    &FS_CONTROL = DELAY 0 ,15

    &FS_PAR = 131072
    &FS_CONTROL = 69990
    &FS_CONTROL = DELAY 0 ,15
    }
    }


    This doesn't work as the second sending of the 69990 control under both the IF and ELSE statement is the only thing that is executed. I can see that both in FSUIPC and IOCP Console.

    My question is way doesn't SIOC send the first 69990 control with the para -2147483648 and 536870912.

    I have tried everything , but can't get it work. I probably do a silly fault, but can't see it myself.



    Anyone see what is wrong here or a suggestion on how to do this in another way.

    rgs

    Roar K
    Roar Kristensen rksoftware www.flightsim4fun.com
    Flightsimmer since 1982 (Sinclair Spectrum Sinclair QL, Amiga, PC --16Mhz >>4.4GHz)

  2. #2
    75+ Posting Member
    Join Date
    Apr 2009
    Location
    Toronto
    Posts
    125
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Sending FSUIPC offset from SIOC problem, needs help

    Roar,

    the DELAYs are not synchronous; i.e. the script won't pause while they expire; so, you're overwriting the first values before they can be acted on.

    Change it to set the second set of values after the delay expires...mind you don't get into a loop there.

    Jim.

  3. #3
    25+ Posting Member Roarkr's Avatar
    Join Date
    Feb 2011
    Location
    Asker Norway
    Posts
    71
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Sending FSUIPC offset from SIOC problem, needs help

    Thanks for replying, but what should the coding be for that? Im lost here.

    Roar K
    Roar Kristensen rksoftware www.flightsim4fun.com
    Flightsimmer since 1982 (Sinclair Spectrum Sinclair QL, Amiga, PC --16Mhz >>4.4GHz)

  4. #4
    75+ Posting Member
    Join Date
    Apr 2009
    Location
    Toronto
    Posts
    125
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Sending FSUIPC offset from SIOC problem, needs help

    Here's one way:

    Code:
    Var 0074, Link IOCARD_SW, Input 65, Type I
    {
       IF V0074 = 1
       {
         &FS_PAR = -2147483648
         V0123 = DELAY 524288, 15
       }    
    
       ELSE
       {
         &FS_PAR = 536870912
         V0123 = DELAY 131072, 15
       }  
    
       &FS_CONTROL = 69990
       &FS_CONTROL = DELAY 0, 10
    
    }
    
    Var 0123
    {
      &FS_PAR = V0123
      &FS_CONTROL = 69990
      &FS_CONTROL = DELAY 0, 10
    }

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

    Re: Sending FSUIPC offset from SIOC problem, needs help

    Try this:

    Code:
    Var 74, Link IOCARD_SW, Input 65, Type I
    {
     IF V74 = 1
     {
       &FS_PAR = -2147483648
       &FS_CONTROL = 69990
       &FS_CONTROL = DELAY 0, 15
       v75 = DELAY 0, 20
     }
     ELSE
     {
       &FS_PAR = 536870912
       &FS_CONTROL = 69990
       &FS_CONTROL = DELAY 0, 15
       v76 = DELAY 0, 20
     }
    }
     
    
    Var 75 Link SUBRUTINE
    {
      &FS_PAR = 524288
      &FS_CONTROL = 69990
      &FS_CONTROL = DELAY 0, 15
    }
    
    
    Var 76 Link SUBRUTINE
    {
       &FS_PAR = 131072
       &FS_CONTROL = 69990
       &FS_CONTROL = DELAY 0, 15
    }
    regards,
    Nico Kaan
    Howto program in SIOC

  6. #6
    25+ Posting Member Roarkr's Avatar
    Join Date
    Feb 2011
    Location
    Asker Norway
    Posts
    71
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Sending FSUIPC offset from SIOC problem, needs help

    Thanks for the inputs . It Solved my problems.

    rgs
    Roar Kristensen rksoftware www.flightsim4fun.com
    Flightsimmer since 1982 (Sinclair Spectrum Sinclair QL, Amiga, PC --16Mhz >>4.4GHz)