Header Fly Engravity
Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    767 builder edo17982's Avatar
    Join Date
    Jun 2008
    Location
    Milano, Italy
    Posts
    75
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Implement digit "6" with segment

    Hello Nico I was looking at the display II card manual and I understood that there is a way to display the digit "6" with the upper segment, which adds a bit of realism to the 7segs, by sending the value -999997 to the display...
    The question is: is there a way to implement that thing in your code, let's say for example the XPNDR one without a really big repropgramming of it or not?
    If it is goin to be too difficult I'll give up but if there is an easy way to do that I would add that feature for all displays...

    Here the XPDR example


    Var 833 Static
    {
    L0 = v833
    L1 = MOD L0 16
    IF L1 = 10
    {
    &D_XPDR0 = -999999 // blank
    &D_XPDR1 = -999999 // blank
    &D_XPDR2 = -999999 // blank
    &D_XPDR3 = -999999 // blank
    }
    ELSE
    {
    &D_XPDR0 = L1
    L0 = DIV L0 16
    &D_XPDR1 = MOD L0 16
    L0 = DIV L0 16
    &D_XPDR2 = MOD L0 16
    L0 = DIV L0 16
    &D_XPDR3 = MOD L0 16
    }
    }

    Var 9001 name D_XPDR0 Link IOCARD_DISPLAY Device 0 Digit 130 Numbers 1
    Var 9002 name D_XPDR1 Link IOCARD_DISPLAY Device 0 Digit 131 Numbers 1
    Var 9003 name D_XPDR2 Link IOCARD_DISPLAY Device 0 Digit 132 Numbers 1
    Var 9004 name D_XPDR3 Link IOCARD_DISPLAY Device 0 Digit 133 Numbers 1


    Thanks

    Edoardo

  2. #2
    767 builder edo17982's Avatar
    Join Date
    Jun 2008
    Location
    Milano, Italy
    Posts
    75
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Implement digit "6" with segment

    Oh I forgot....With particular reference on this XPDR code, when I press the CLR button, the digits all display "0" instead of goin blank...any way to correct this?

    Thanks again and sorry to bother you

  3. #3
    1000+ Poster - Fantastic Contributor kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    1,385
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Implement digit "6" with segment

    Hi Eduardo,
    Everything is possible in SIOC ... no problem, just give me some time.
    However, from my recollection (I'm not at my sim now) I do not see that behaviour in the Level-D panel (display-ing "bbbb" in XPDR display).
    Is what you ask, something visible in a real 767?
    Nico

  4. #4
    767 builder edo17982's Avatar
    Join Date
    Jun 2008
    Location
    Milano, Italy
    Posts
    75
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Implement digit "6" with segment

    Hi Nico, thanks for the reply.
    If you observ to any real 767 module with display, you can note that in all of them the 6 is shown WITH upper segment on. the same is done in leveld panel.
    Take the time you need and thanks in advance for the try

    About the XPDR: when I start the sim thay are all blank.
    Then I put a code in and I press the CLR button they all go to 0 instead of blank...maybe someone else is experiencing the same with this code?

    Thanks again

    Edoardo

  5. #5
    767 builder edo17982's Avatar
    Join Date
    Jun 2008
    Location
    Milano, Italy
    Posts
    75
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Implement digit "6" with segment

    Quote Originally Posted by edo17982 View Post
    About the XPDR: when I start the sim thay are all blank.
    Then I put a code in and I press the CLR button they all go to 0 instead of blank...maybe someone else is experiencing the same with this code?

    Thanks again

    Edoardo
    Just to confirm...in the leveld panel the digits go blank as they should...but the 7segments display 0 instead of bein blank

  6. #6
    767 builder edo17982's Avatar
    Join Date
    Jun 2008
    Location
    Milano, Italy
    Posts
    75
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Implement digit "6" with segment

    Nico, I made few tries and I got the result
    Here is how I changed the code to solve everything:
    about the blank problem I solved by adding the red lines.
    About the 6 with segment I added at bottom the code to do it. Maybe it can be worth for someone I hope!
    I think will be harder where the digits are grouped, I guess I'll ask you hel soon about

    Var 833 Static
    {
    L0 = v833
    L1 = MOD L0 16
    IF L0 = 0
    {
    &D_XPDR0 = -999999 // blank
    &D_XPDR1 = -999999 // blank
    &D_XPDR2 = -999999 // blank
    &D_XPDR3 = -999999 // blank
    }

    ELSE
    {
    IF L1 = 10
    {
    &D_XPDR0 = -999999 // blank
    &D_XPDR1 = -999999 // blank
    &D_XPDR2 = -999999 // blank
    &D_XPDR3 = -999999 // blank
    }
    ELSE
    {
    &D_XPDR0 = L1
    L0 = DIV L0 16
    &D_XPDR1 = MOD L0 16
    L0 = DIV L0 16
    &D_XPDR2 = MOD L0 16
    L0 = DIV L0 16
    &D_XPDR3 = MOD L0 16
    }
    }
    }Var 9001 name D_XPDR0 Link IOCARD_DISPLAY Device 0 Digit 130 Numbers 1
    {
    IF &D_XPDR0 = 6
    {
    &D_XPDR0 = -999997 // 6 with segment
    }
    }
    Var 9002 name D_XPDR1 Link IOCARD_DISPLAY Device 0 Digit 131 Numbers 1
    {
    IF &D_XPDR1 = 6
    {
    &D_XPDR1 = -999997 // 6 with segment
    }
    }
    Var 9003 name D_XPDR2 Link IOCARD_DISPLAY Device 0 Digit 132 Numbers 1
    {
    IF &D_XPDR2 = 6
    {
    &D_XPDR2 = -999997 // 6 with segment
    }
    }
    Var 9004 name D_XPDR3 Link IOCARD_DISPLAY Device 0 Digit 133 Numbers 1
    {
    IF &D_XPDR3 = 6
    {
    &D_XPDR3 = -999997 // 6 with segment
    }
    }

  7. #7
    1000+ Poster - Fantastic Contributor kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    1,385
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Implement digit "6" with segment

    Hi,
    Good thinking edoardo! Your changes are right.

    Finally I understand what you meant... I'll change my code at several places and find a way to solve a 6 in a group of digits.

    You only could have coded var 833 a little bit shorter, like this: (tip for posting: put SIOC code in code brackets, it will be easier to read and copy)

    Code:
    Var 833 Static
    {
      L0 = v833
      C0 = L0 = 0
      L1 = MOD L0 16
      C1 = L1 = 10
      IF C0 OR C1
      {
        &D_XPDR0 = -999999 // blank
        &D_XPDR1 = -999999 // blank
        &D_XPDR2 = -999999 // blank
        &D_XPDR3 = -999999 // blank
      }
      ELSE
      {
        &D_XPDR0 = L1
        L0 = DIV L0 16
        &D_XPDR1 = MOD L0 16
        L0 = DIV L0 16
        &D_XPDR2 = MOD L0 16
        L0 = DIV L0 16
        &D_XPDR3 = MOD L0 16
      }
    }
    Nico

  8. #8
    1000+ Poster - Fantastic Contributor kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    1,385
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Implement digit "6" with segment

    Hi,

    For 'grouped' digits we have to split them up in single digits and treat them individually.
    For instance: a solution for a three digit HDG (or CRS) display would be:

    Code:
    Var 8000 name HDG  // 0 .. 359 
    {
      CALL &OutHDG
    }
    
    Var 9000 name OutHDG Link SUBRUTINE    
    {
      L0 = TOBCD &HDG
      L1 = MOD L0 16
      IF L1 = 6 
      {
        L1 = -999997
      }
      &D_HDG1 = L1
      L0 = DIV L0 16
      L1 = MOD L0 16
      IF L1 = 6 
      {
        L1 = -999997
      }
      &D_HDG2 = L1
      L0 = DIV L0 16
      L1 = MOD L0 16
    // left most digit of HDG cannot be 6, no need to test
      &D_HDG3 = L1
    }
    
    Var 9001 name D_HDG1 Link IOCARD_DISPLAY  Digit 0 Numbers 1
    Var 9002 name D_HDG2 Link IOCARD_DISPLAY  Digit 1 Numbers 1
    Var 9003 name D_HDG3 Link IOCARD_DISPLAY  Digit 2 Numbers 1
    Nico
    Last edited by kiek; 04-21-2010 at 12:18 PM.

  9. #9
    767 builder edo17982's Avatar
    Join Date
    Jun 2008
    Location
    Milano, Italy
    Posts
    75
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Implement digit "6" with segment

    It was like I thought then.. Could you please post the example for the Ils freq and crs please? I will try then to manage the adf on that example. Thanks

  10. #10
    1000+ Poster - Fantastic Contributor kiek's Avatar
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    1,385
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Implement digit "6" with segment

    Here is my updated file 5.13_ILS.TXT (from powerd_by_lekseecon\cockpit767\shared folder )
    Code:
    // ILS  generic part (Fs9 + FSX)
    //
    // updated April 21, 2010: now displays a 6 with upper segment on
    //
    Var 9001 name ILSFreqLow
    Var 9002 name ILSFreqHigh
    Var 9003 name ILSFreq
    
    Var 9004 name ILSFromPanel Link SUBRUTINE
    {
      L0 = FROMBCD &ILSFromPanel
      &ILSFreq = L0
      &ILSFreqHigh = DIV L0 100
      &ILSFreqLow = MOD L0 100
      CALL &OutILSFreq               // display new freq value 
    }
    
    Var 9005 name CalcILSFreq Link SUBRUTINE
    {
      L0 = &ILSFreqHigh * 100            // high * 100 
      &ILSFreq = L0 + &ILSFreqLow        // + low 
      &ILSFreqToPanel = TOBCD &ILSFreq   //  to panel 
      CALL &OutILSFreq                   // display new freq value 
    }
    
    Var 9006 name OutILSFreq Link SUBRUTINE  
    {
      IF &LeftBusOff = 1
      {
        &D_ILSFreq1 = -999999
        &D_ILSFreq2 = -999999
        &D_ILSFreq3 = -999999
        &D_ILSFreq4 = -999999
        &D_ILSFreq5 = -999999
        &O_ILSDP = 0  
      }
      ELSE 
      {  
        IF &TestPed = 1
        {
          &D_ILSFreq1 = 8    
          &D_ILSFreq2 = 8    
          &D_ILSFreq3 = 8    
          &D_ILSFreq4 = 8    
          &D_ILSFreq5 = 8    
          &O_ILSDP = 1  
        }
        ELSE
        {  
          IF &ILSFreq = 800         // 108.00 = PARKED
          {
            &D_ILSFreq1 = -999998   // -
            &D_ILSFreq2 = -999998   // -
            &D_ILSFreq3 = -999998   // -
            &D_ILSFreq4 = -999998   // -
            &D_ILSFreq5 = -999998   // -
            &O_ILSDP = 0  
          }
          ELSE
          { 
            L0 = TOBCD &ILSFreq
            L1 = MOD L0 16
    // right most digit cannot be 6, no need to test
            &D_ILSFreq1 = L1
            L0 = DIV L0 16
            L1 = MOD L0 16
            IF L1 = 6 
            {
              L1 = -999997
            }
            &D_ILSFreq2 = L1
            L0 = DIV L0 16
            L1 = MOD L0 16
            IF L1 = 6 
            {
              L1 = -999997
            }
            &D_ILSFreq3 = L1
            L0 = DIV L0 16
            L1 = MOD L0 16
    // cannot be 6, no need to test
            &D_ILSFreq4 = L1
            &D_ILSFreq5 = 1    // fixed '1' 
            &O_ILSDP = 1  
          }
        }
      }
    }
    
    Var 9007 name ILSCrs
    {
      CALL &OutILSCrs
    }
    
    Var 9008 name OutILSCrs Link SUBRUTINE    
    {
      IF &LeftBusOff = 1
      {
        &D_ILSCrs1 = -999999
        &D_ILSCrs2 = -999999
        &D_ILSCrs3 = -999999
      }
      ELSE 
      {  
        IF &TestPed = 1
        {
           &D_ILSCrs1 = 8    
           &D_ILSCrs2 = 8    
           &D_ILSCrs3 = 8    
        }
        ELSE
        {  
          L0 = TOBCD &ILSCrs     
          L1 = MOD L0 16
          IF L1 = 6 
          {
            L1 = -999997
          }
          &D_ILSCrs1 = L1
          L0 = DIV L0 16
          L1 = MOD L0 16
          IF L1 = 6 
          {
            L1 = -999997
          }
          &D_ILSCrs2 = L1
          L0 = DIV L0 16
          L1 = MOD L0 16
    // left most digit of ILS CRS cannot be 6, no need to test
          &D_ILSCrs3 = L1
        }
      }
    }
    
    Var 9009 name RO_ILSFL Link IOCARD_ENCODER Device 1 Input 59 Aceleration 1 Type 2     
    {
      L0 = &RO_ILSFL * 5     
      &ILSFreqLow = ROTATE 0 99 L0
      CALL &CalcILSFreq     
    }
    
    Var 9010 name RO_ILSFH Link IOCARD_ENCODER Device 1 Input 57 Aceleration 1 Type 2     
    {
      L0 = &RO_ILSFH      
      &ILSFreqHigh = ROTATE 8 17 L0
      CALL &CalcILSFreq     
    }
    
    Var 9011 name RO_ILSCRS Link IOCARD_ENCODER Device 1 Input 61 Aceleration 4 Type 2     
    {
      L0 = &RO_ILSCRS     
      &ILSCrs = ROTATE 0 359 L0
      &ILSCrsToPanel = &ILSCrs       
    }
    
    Var 9012 name D_ILSFreq1 Link IOCARD_DISPLAY Device 1 Digit 20 Numbers 1  
    Var 9013 name D_ILSFreq2 Link IOCARD_DISPLAY Device 1 Digit 21 Numbers 1  
    Var 9014 name D_ILSFreq3 Link IOCARD_DISPLAY Device 1 Digit 22 Numbers 1  
    Var 9015 name D_ILSFreq4 Link IOCARD_DISPLAY Device 1 Digit 23 Numbers 1  
    Var 9016 name D_ILSFreq5 Link IOCARD_DISPLAY Device 1 Digit 24 Numbers 1  
    
    Var 9017 name D_ILSCrs1 Link IOCARD_DISPLAY Device 1 Digit 25 Numbers 1
    Var 9018 name D_ILSCrs2 Link IOCARD_DISPLAY Device 1 Digit 26 Numbers 1
    Var 9019 name D_ILSCrs3 Link IOCARD_DISPLAY Device 1 Digit 27 Numbers 1
    
    Var 9020 name O_ILSDP Link IOCARD_OUT Device 1 Output 96    
    
    Var 991 Static
    {
      CALL &OutILSFreq 
      CALL &OutILSCrs 
    }

Page 1 of 2 12 LastLast

Similar Threads

  1. Bulk Quarter-Turn "Dzus" fastener purchase
    By fsaviator in forum Cockpit Parts and Motion Platforms
    Replies: 18
    Last Post: 11-18-2010, 09:02 AM
  2. Real Flight Simulators versus PC "Games" - the eternal debate...
    By ryanf in forum Pilots Lounge - Let your Hair down
    Replies: 3
    Last Post: 01-01-2010, 05:32 PM
  3. Fantastic Airshow in Germany "Hahnweide2009"with Spit,B-17,Focke Wulf...
    By Georg Schneider in forum General Aircraft Operations and News Topics
    Replies: 0
    Last Post: 09-07-2009, 03:15 PM
  4. Replies: 17
    Last Post: 03-05-2008, 11:39 AM
  5. Gwyn Perrett's Article "Creating a glass cockpit display"
    By Matt Olieman in forum General Builder Questions All Aircraft Types
    Replies: 0
    Last Post: 08-31-2007, 07:20 PM