Results 1 to 8 of 8
  1. #1
    10+ Posting Member
    Join Date
    Nov 2012
    Location
    Netherlands
    Posts
    19
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Temperature digits not correct

    Hello Nico,

    I programmed the following script for my Compartment temperature digits:
    Var 840 Link IOCARD_DISPLAY Device 0 Digit 30 Numbers 2
    Var 841 Link IOCARD_DISPLAY Device 0 Digit 28 Numbers 2
    Var 842 Link IOCARD_DISPLAY Device 0 Digit 26 Numbers 2
    But all the indicators give me 17 degrees C to high in my panel.
    If I see 32 degrees C inFS, then in my panel 49 degrees is displayed.

    When I use Fahrenheit, the temperature is given correct.

    Kind regards,
    Kees

  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: Temperature digits not correct

    Hello Kees,

    Vars 840, 841 and 842 are in BCD2b format (not in integer), so you need a different script.
    You have to decode ("uitpakken") these variables first. The file 1_Digit.txt (in folder cockpit767) contains the needed subroutine and help variables, so just (multiple) compile 1_Digit.txt together with your script (or copy its contents in your script if you prefer the one file approach, -not recommended-).

    Your script should be like this:
    Code:
    Var 840 Static
    {
      CALL &DecBCD2 v840
      &D_FwdCTemp0 = &Digit0
      &D_FwdCTemp1 = &Digit1
    }
    Var 9001 name D_FwdCTemp0 Link IOCARD_DISPLAY Device 0 Digit 30 Numbers 1 
    Var 9002 name D_FwdCTemp1 Link IOCARD_DISPLAY Device 0 Digit 31 Numbers 1   
    
    Var 841 Static
    {
      CALL &DecBCD2 v841
      &D_MidCTemp0 = &Digit0
      &D_MidCTemp1 = &Digit1
    }
    Var 9003 name D_MidCTemp0 Link IOCARD_DISPLAY Device 0 Digit 28 Numbers 1 
    Var 9004 name D_MidCTemp1 Link IOCARD_DISPLAY Device 0 Digit 29 Numbers 1   
    
    Var 842 Static
    {
      CALL &DecBCD2 v842
      &D_AftCTemp0 = &Digit0
      &D_AftCTemp1 = &Digit1
    }
    Var 9005 name D_AftCTemp0 Link IOCARD_DISPLAY Device 0 Digit 26 Numbers 1 
    Var 9006 name D_AftCTemp1 Link IOCARD_DISPLAY Device 0 Digit 27 Numbers 1
    With this script you will get blanked leading zeroes, and, if the left electrical bus is OFF, the values will be blanked just as in the real thing (and all this for free ! )

    Vars 986, 987 and 988 are in plain old integer format, but contrary to what you read in the Manual they are in Celcius too (will correct that in the Manual). With these variables you have to add leading blank functionality, and so on, yourself, so I recommend to use the vars with the built in support (840, 841 and 842).

    Groeten,
    Nico
    Last edited by kiek; 11-28-2012 at 09:39 AM.

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

    Re: Temperature digits not correct

    Hello Nico,

    I first tried the script you write above. I did copy it from yours "2.26_CompTempIndicators.txt". I had to change that script a little because you used it (I think) for testing some other digits (fuel temp etc.) in you cockpit. I also merged the "1_Digit.txt in my script" into my script, because I saw that you used some subroutines.
    But when I did compile it to a ssi-file, I got an error about unknown variable v840. That is why tried the script I wrote in my message and if that would work, I was willing to add your subroutines, step-by-step. But I did forget that the temperature was not in integers. So that is where it went wrong... (but it was allready late in the evening, so forgive me )
    But I will give it another try today. Maybe I did something wrong.

    And you are right, it is more realistic to use the script for blanking out the digits if the real thing also does. Especially when it's free .

    Till now I use a one-file script, but the more panels become ready, the more complicate the script is. And for finding things back in Notepad, I am glad CTRL-F exists . So maybe I will spent some time to make a script for each panel in the near future. And maybe that is also the moment to start using Lekseecon 9.2....

    Bedankt!

    Kees

  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: Temperature digits not correct

    Kees,
    I'm sorry, I forgot to add the keyword Static to var 840 and so on.
    Please try again.
    Nico

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

    Re: Tempeture digits not correct

    Nico,

    I still use Lekseecon Version 3.14 with SIOC 3.5, so I don't need the Static, or am I wrong?

    Regards,
    Kees

  6. #6
    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: Tempeture digits not correct

    Quote Originally Posted by kees69 View Post
    I still use Lekseecon Version 3.14 with SIOC 3.5, so I don't need the Static, or am I wrong?
    No you're right. But in 3.14 the concept of BCB2 did not exist. Vars 840, 841 and 842 are not available there. This is very confusing.

    You better update to 9.2 first, like Pete Dowson always says, I do not give support on older versions...
    (or continue for the time being with the integer vars).

    Groeten,
    Nico

  7. #7
    10+ Posting Member
    Join Date
    Nov 2012
    Location
    Netherlands
    Posts
    19
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Tempeture digits not correct

    Ok, Nico you are right, maybe I first update to the new versions and the try it again. I think I will spend this evening on that. It is because I did a few years nothing at all, but I am totaly back now...

    As said in aviation: I call you back

    Groeten,
    Kees

  8. #8
    10+ Posting Member
    Join Date
    Nov 2012
    Location
    Netherlands
    Posts
    19
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Tempeture digits not correct

    Hello Nico,

    I have updated the Lekseecon and SIOC to the latest versions. Because of the updates, I had to rewrite some parts of the scripts. Because I had the whole script in just one file, I have now also made a script-file of each panel apart. Now I have a much better overview of the script. It works much easier.

    And last but not least, the temperature in my panel is now given correct!

    Thx,
    Kees