Results 1 to 5 of 5

Thread: Tla1vr

  1. #1
    10+ Posting Member
    Join Date
    Oct 2010
    Location
    France
    Posts
    12
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Tla1vr

    Hello Nico,

    Many Thanks for the modification.
    Could you create new variable to invert the value for the Tla1, Tla2, Tla3, Tla4.
    When I have 5000, I would like to have 0 and vice versa.
    (When I increase the lever of throttle, Tla1 is decreasing, I try to modify by SIOC program but I don't find the right code)

    Best Regard,

    Thierry

  2. #2
    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: Tla1vr

    Hi
    Quote Originally Posted by tcasse View Post
    Could you create new variable to invert the value for the Tla1, Tla2, Tla3, Tla4.
    Well that's not easy because the range is -8925..5000.
    It's a lot easier to do that in SIOC.
    If you post your code, I'll change it for you.

    Regards,
    Nico

  3. #3
    10+ Posting Member
    Join Date
    Oct 2010
    Location
    France
    Posts
    12
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Tla1vr

    Quote Originally Posted by kiek View Post
    Hi

    Well that's not easy because the range is -8925..5000.
    It's a lot easier to do that in SIOC.
    If you post your code, I'll change it for you.

    Regards,
    Nico
    Hello Nico,

    This is my code. It's OK for the Flaps and Spoiler.
    But for the throtlles, I don't know how to invert.

    Code:
    Var 1389 Static name FlapLever
    
    
    Var 5000, name analogFlaps, link IOCARD_ANALOGIC, Input 2, posL 35, posC 135, posR 225, device 0
    {
    &analogF = DIV &analogFlaps ,10
    }
     
     
    Var 5002, name analogF
    {
    IF &analogF < 1
    {
    V1389 = 0 
    }
    
    
    IF &analogF > 2
    {
    V1389 = 1 
    IF &analogF < 4
    {
    V1389 = 1 
    }
    }
    
    
    
    
    IF &analogF > 5
    {
    V1389 = 2 
    IF &analogF < 8
    {
    V1389 = 2 
    }
    }
    IF &analogF > 9
    {
    V1389 = 3 
    IF &analogF < 13
    {
    V1389 = 3 
    }
    }
    IF &analogF > 14
    {
    V1389 = 4 
    IF &analogF < 19
    {
    V1389 = 4 
    }
    }
    IF &analogF > 20
    {
    V1389 = 5 
    
    
    IF &analogF < 23
    {
    V1389 = 5 
    }
    }
    
    
    IF &analogF > 25
    {
    V1389 = 6 
    }
    }
    
    
    
    
    Var 1388 Static name SpdBrkLever
    
    
    Var 5004, name anaSpdBrkL, link IOCARD_ANALOGIC, Input 1, posL 38, posC 135, posR 228, device 0
    {
    &analogL = DIV &anaSpdBrkL ,10
    }
    
    
    Var 5006, name analogL
    {
    IF &analogL < 1
    {
    V1388 = 0 
    }
    
    
    IF &analogL > 3
    {
    V1388 = 200 
    IF &analogL < 4
    {
    V1388 = 200 
    }
    }
    
    
    IF &analogL > 4
    {
    V1388 = &analogL * 32 
    }
    
    
    }
    
    
    
    
    Var 5014 name Ana_Tla1, link IOCARD_ANALOGIC, Input 1, posL 55, posC 135, posR 215, device 2
    {
    &Tla1 = &Ana_Tla1 * 20
    
    
    }
    
    
    Var 5016 name Ana_Tla2, link IOCARD_ANALOGIC, Input 2, posL 55, posC 135, posR 215, device 2
    {
    &Tla2 = &Ana_Tla2 * 20
    }
    
    
    Var 5018 name Ana_Tla3, link IOCARD_ANALOGIC, Input 3, posL 55, posC 135, posR 215, device 2
    {
    &Tla3 = &Ana_Tla3 * 20
    }
    
    
    Var 5020 name Ana_Tla4, link IOCARD_ANALOGIC, Input 4, posL 55, posC 135, posR 215, device 2
    {
    &Tla4 = &Ana_Tla4 * 20
    }
    
    
    
    
    
    
    
    
    Var 3700 Static name Tla1
    
    
    
    
    Var 3701 Static name Tla2
    
    
    Var 3702 Static name Tla3
    
    
    Var 3703 Static name Tla4
    
    
    Var 5022 Static name Tla1V
    
    
    Var 5024 Static name Tla2V
    
    
    
    
    
    
    Var 5030 name SW_REV Link IOCARD_SW Device 2 Input 16 Type i 
    {
      IF &SW_REV = 1
      {
        
    &Tla1 = -8925
      }
    IF &SW_REV = 0
      {
        &Tla1 = -925 
    &Tla1 = &Tla1V 
    
    
      }
    }
    Last edited by kiek; 09-28-2014 at 01:00 PM.

  4. #4
    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: Tla1vr

    Code:
    Var 5002, name analogF
    {
    IF &analogF < 1
    {
    V1389 = 0 
    }
    
    
    
    
    IF &analogF > 2
    {
    V1389 = 1 
    IF &analogF < 4
    {
    V1389 = 1 
    }
    }
    
    
    
    
    
    
    
    
    IF &analogF > 5
    {
    V1389 = 2 
    IF &analogF < 8
    {
    V1389 = 2 
    }
    }
    IF &analogF > 9
    {
    V1389 = 3 
    IF &analogF < 13
    {
    V1389 = 3 
    }
    }
    IF &analogF > 14
    {
    V1389 = 4 
    IF &analogF < 19
    {
    V1389 = 4 
    }
    }
    IF &analogF > 20
    {
    V1389 = 5 
    
    
    
    
    IF &analogF < 23
    {
    V1389 = 5 
    }
    }
    
    
    
    
    IF &analogF > 25
    {
    V1389 = 6 
    }
    }
    
    
    
    
    
    
    
    
    Var 1388 Static name SpdBrkLever
    
    
    
    
    Var 5004, name anaSpdBrkL, link IOCARD_ANALOGIC, Input 1, posL 38, posC 135, posR 228, device 0
    {
    &analogL = DIV &anaSpdBrkL ,10
    }
    
    
    
    
    Var 5006, name analogL
    {
    IF &analogL < 1
    {
    V1388 = 0 
    }
    
    
    
    
    IF &analogL > 3
    {
    V1388 = 200 
    IF &analogL < 4
    {
    V1388 = 200 
    }
    }
    
    
    
    
    IF &analogL > 4
    {
    V1388 = &analogL * 32 
    }
    
    
    
    
    }
    
    
    
    
    
    
    
    
    Var 5014 name Ana_Tla1, link IOCARD_ANALOGIC, Input 1, posL 55, posC 135, posR 215, device 2
    {
      L0 = &Ana_Tla1 * 20
      &Tla1 = 5000 - L0
    }
    
    
    
    
    Var 5016 name Ana_Tla2, link IOCARD_ANALOGIC, Input 2, posL 55, posC 135, posR 215, device 2
    {
      L0 = &Ana_Tla2 * 20
      &Tla2 = 5000 - L0
    }
    
    
    
    
    Var 5018 name Ana_Tla3, link IOCARD_ANALOGIC, Input 3, posL 55, posC 135, posR 215, device 2
    {
      L0 = &Ana_Tla3 * 20
      &Tla3 = 5000 - L0
    }
    
    
    
    
    Var 5020 name Ana_Tla4, link IOCARD_ANALOGIC, Input 4, posL 55, posC 135, posR 215, device 2
    {
      L0 = &Ana_Tla4 * 20
      &Tla4 = 5000 - L0
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    Var 3700 Static name Tla1
    
    
    
    
    
    
    
    
    Var 3701 Static name Tla2
    
    
    
    
    Var 3702 Static name Tla3
    
    
    
    
    Var 3703 Static name Tla4
    
    
    
    
    Var 5022 Static name Tla1V
    
    
    
    
    Var 5024 Static name Tla2V
    
    
    
    
    
    
    
    
    
    
    
    
    Var 5030 name SW_REV Link IOCARD_SW Device 2 Input 16 Type i 
    {
      IF &SW_REV = 1
      {
        
    &Tla1 = -8925
      }
    IF &SW_REV = 0
      {
        &Tla1 = -925 
    &Tla1 = &Tla1V 
    
    
    
    
      }
    }

  5. #5
    10+ Posting Member
    Join Date
    Oct 2010
    Location
    France
    Posts
    12
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Tla1vr

    Quote Originally Posted by kiek View Post
    Code:
    Var 5002, name analogF
    {
    IF &analogF < 1
    {
    V1389 = 0 
    }
    
    
    
    
    IF &analogF > 2
    {
    V1389 = 1 
    IF &analogF < 4
    {
    V1389 = 1 
    }
    }
    
    
    
    
    
    
    
    
    IF &analogF > 5
    {
    V1389 = 2 
    IF &analogF < 8
    {
    V1389 = 2 
    }
    }
    IF &analogF > 9
    {
    V1389 = 3 
    IF &analogF < 13
    {
    V1389 = 3 
    }
    }
    IF &analogF > 14
    {
    V1389 = 4 
    IF &analogF < 19
    {
    V1389 = 4 
    }
    }
    IF &analogF > 20
    {
    V1389 = 5 
    
    
    
    
    IF &analogF < 23
    {
    V1389 = 5 
    }
    }
    
    
    
    
    IF &analogF > 25
    {
    V1389 = 6 
    }
    }
    
    
    
    
    
    
    
    
    Var 1388 Static name SpdBrkLever
    
    
    
    
    Var 5004, name anaSpdBrkL, link IOCARD_ANALOGIC, Input 1, posL 38, posC 135, posR 228, device 0
    {
    &analogL = DIV &anaSpdBrkL ,10
    }
    
    
    
    
    Var 5006, name analogL
    {
    IF &analogL < 1
    {
    V1388 = 0 
    }
    
    
    
    
    IF &analogL > 3
    {
    V1388 = 200 
    IF &analogL < 4
    {
    V1388 = 200 
    }
    }
    
    
    
    
    IF &analogL > 4
    {
    V1388 = &analogL * 32 
    }
    
    
    
    
    }
    
    
    
    
    
    
    
    
    Var 5014 name Ana_Tla1, link IOCARD_ANALOGIC, Input 1, posL 55, posC 135, posR 215, device 2
    {
      L0 = &Ana_Tla1 * 20
      &Tla1 = 5000 - L0
    }
    
    
    
    
    Var 5016 name Ana_Tla2, link IOCARD_ANALOGIC, Input 2, posL 55, posC 135, posR 215, device 2
    {
      L0 = &Ana_Tla2 * 20
      &Tla2 = 5000 - L0
    }
    
    
    
    
    Var 5018 name Ana_Tla3, link IOCARD_ANALOGIC, Input 3, posL 55, posC 135, posR 215, device 2
    {
      L0 = &Ana_Tla3 * 20
      &Tla3 = 5000 - L0
    }
    
    
    
    
    Var 5020 name Ana_Tla4, link IOCARD_ANALOGIC, Input 4, posL 55, posC 135, posR 215, device 2
    {
      L0 = &Ana_Tla4 * 20
      &Tla4 = 5000 - L0
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    Var 3700 Static name Tla1
    
    
    
    
    
    
    
    
    Var 3701 Static name Tla2
    
    
    
    
    Var 3702 Static name Tla3
    
    
    
    
    Var 3703 Static name Tla4
    
    
    
    
    Var 5022 Static name Tla1V
    
    
    
    
    Var 5024 Static name Tla2V
    
    
    
    
    
    
    
    
    
    
    
    
    Var 5030 name SW_REV Link IOCARD_SW Device 2 Input 16 Type i 
    {
      IF &SW_REV = 1
      {
        
    &Tla1 = -8925
      }
    IF &SW_REV = 0
      {
        &Tla1 = -925 
    &Tla1 = &Tla1V 
    
    
    
    
      }
    }

    Hello Nico,

    You're the best

    Best Regards;

    Thierry