Results 1 to 8 of 8
  1. #1
    David Rabiner
    Guest

    Baffled by Programming Logic

    Hi, there.

    I've spent a lot of time on this, and I'm baffled. I'm working with the 737

    file.

    I can't figure out why the source1off and source2off lights are not ON when

    I start up the program up. I know the light should, of course, be linked to

    the battery, and I know it acts properly, but I can't figure out why.

    The line reads as follows:

    source1off = (elecbus1 = 0) and (apubus = 0)

    I monitored all three using FSUPIC, and I discovered that all three are
    cleared when the program starts cold and dark. That doesn't make sense to
    me because if elecbus1 and apubus are cleared, then source1off should be
    set. When I switch on the battery, source1off gets set. However, I can't
    see any link in the code between source1off and the battery.

    I'm wondering if the textlightboxes are connected to the battery somehow
    someplace else? If so, where?

    Warm regards,
    David


  2. #2
    Thomas Richter
    Guest

    Baffled by Programming Logic

    Hi David,
    I have to correct.

    >The line reads as follows:
    >
    >source1off = (elecbus1 = 0) and (apubus = 0)
    >

    source1off will set to 1 (ON) if one off "elecbus1 or apubus" is set to 0
    (OFF).
    It will set to 0 (OFF) if elecbus1 and apubus are ON or if Battery is OFF.

    Best Regards
    Thomas Richter


  3. #3
    Thomas Richter
    Guest

    Baffled by Programming Logic

    deleted, was wrong.


  4. #4
    Enrico Schiratti
    Guest

    Re: Baffled by Programming Logic


    > I'm wondering if the textlightboxes are connected to the
    > battery somehow
    > someplace else? If so, where?


    They are connected *inside* of pmSystems, otherwise you
    would have to have a *very* long list of lights with:

    if batt1 = 0 then
    this off
    that off
    theother off
    yetanother off
    endif

    Thus in other words, you want the source lights to be on
    even when the battery is off?

    "David Rabiner" wrote in message
    news:384074.77081@wb.onvix.com...
    > Hi, there.
    >
    > I've spent a lot of time on this, and I'm baffled. I'm
    > working with the 737
    >
    > file.
    >
    > I can't figure out why the source1off and source2off
    > lights are not ON when
    >
    > I start up the program up. I know the light should, of
    > course, be linked to
    >
    > the battery, and I know it acts properly, but I can't
    > figure out why.
    >
    > The line reads as follows:
    >
    > source1off = (elecbus1 = 0) and (apubus = 0)
    >
    > I monitored all three using FSUPIC, and I discovered that
    > all three are
    > cleared when the program starts cold and dark. That
    > doesn't make sense to
    > me because if elecbus1 and apubus are cleared, then
    > source1off should be
    > set. When I switch on the battery, source1off gets set.
    > However, I can't
    > see any link in the code between source1off and the
    > battery.
    >
    > I'm wondering if the textlightboxes are connected to the
    > battery somehow
    > someplace else? If so, where?
    >
    > Warm regards,
    > David
    >



  5. #5
    David Rabiner
    Guest

    Re: Baffled by Programming Logic

    Thanks, Enrico. I appreciate that.

    >
    > Thus in other words, you want the source lights to be on
    > even when the battery is off?



    It's not that I want textlightboxes to light when the battery is off. I've

    just created boxes without making that assumption:

    textlightbox = this-condition AND that condition AND batt1

    Knowing that the textlightboxes are already dependent on batt1 (or
    standbypower, I'm guessing) will streamline my code.

    Do you have other internal conditions that might be helpful without spending

    a lot of time or compromising secrets ?

    Warm regards,
    David


  6. #6
    Enrico Schiratti
    Guest

    Re: Baffled by Programming Logic

    > Do you have other internal conditions that might be
    > helpful without spending
    > a lot of time or compromising secrets ?


    There is nothing secret about a light being off when the
    battery is off without putting you through the trouble of
    switching them all of individually. I hope you do see that.

    Can't think of anything, but perhaps you will find it? If
    you do, just ask. If it is urgent, send an e-mail to
    support@projectmagenta.com

    Ciao

    Enrico


    "David Rabiner" wrote in message
    news:385480.77081@wb.onvix.com...
    > Thanks, Enrico. I appreciate that.
    >
    >>
    >> Thus in other words, you want the source lights to be on
    >> even when the battery is off?

    >
    >
    > It's not that I want textlightboxes to light when the
    > battery is off. I've
    >
    > just created boxes without making that assumption:
    >
    > textlightbox = this-condition AND that condition AND batt1
    >
    > Knowing that the textlightboxes are already dependent on
    > batt1 (or
    > standbypower, I'm guessing) will streamline my code.
    >
    > Do you have other internal conditions that might be
    > helpful without spending
    >
    > a lot of time or compromising secrets ?
    >
    > Warm regards,
    > David
    >



  7. #7
    Enrico Schiratti
    Guest

    Re: Baffled by Programming Logic

    Further to my reply, there are two variables that handle
    these things internally.

    mainpwr - used to tell pmSystems whether lights or
    light-based outputs can be handled ... normally it would be
    controlled by the batt1 variable

    basepwr - used for the digital texts and gauge needle
    movement

    Thus if you want to handle all light outputs individually,
    set mainpwr to on all the time, and add the code so that the
    lights are switched off. But this is easier I think.

    Ciao

    Enrico


    "Enrico Schiratti" wrote in message
    news:385557.77081@wb.onvix.com...
    >> Do you have other internal conditions that might be
    >> helpful without spending
    >> a lot of time or compromising secrets ?

    >
    > There is nothing secret about a light being off when the
    > battery is off without putting you through the trouble of
    > switching them all of individually. I hope you do see
    > that.
    >
    > Can't think of anything, but perhaps you will find it? If
    > you do, just ask. If it is urgent, send an e-mail to
    > support@projectmagenta.com
    >
    > Ciao
    >
    > Enrico
    >
    >
    > "David Rabiner" wrote in message
    > news:385480.77081@wb.onvix.com...
    >> Thanks, Enrico. I appreciate that.
    >>
    >>>
    >>> Thus in other words, you want the source lights to be on
    >>> even when the battery is off?

    >>
    >>
    >> It's not that I want textlightboxes to light when the
    >> battery is off. I've
    >>
    >> just created boxes without making that assumption:
    >>
    >> textlightbox = this-condition AND that condition AND
    >> batt1
    >>
    >> Knowing that the textlightboxes are already dependent on
    >> batt1 (or
    >> standbypower, I'm guessing) will streamline my code.
    >>
    >> Do you have other internal conditions that might be
    >> helpful without spending
    >>
    >> a lot of time or compromising secrets ?
    >>
    >> Warm regards,
    >> David
    >>

    >



  8. #8
    David Rabiner
    Guest

    Re: Baffled by Programming Logic

    Thanks, Enrico.

    I think I might have seen that in the docs.

    David


    "Enrico Schiratti" wrote in message
    news:385859.77081@wb.onvix.com...
    > Further to my reply, there are two variables that handle
    > these things internally.
    >
    > mainpwr - used to tell pmSystems whether lights or
    > light-based outputs can be handled ... normally it would be
    > controlled by the batt1 variable
    >
    > basepwr - used for the digital texts and gauge needle
    > movement
    >
    > Thus if you want to handle all light outputs individually,
    > set mainpwr to on all the time, and add the code so that the
    > lights are switched off. But this is easier I think.
    >
    > Ciao
    >
    > Enrico



Similar Threads

  1. Programming Throttles in the FCU ???
    By brianwilliamson in forum PM Airbus FCU
    Replies: 5
    Last Post: 05-01-2011, 01:17 AM
  2. Programming CDU
    By Martin Cumming in forum Westozy's Mechanical Engineering
    Replies: 0
    Last Post: 11-16-2009, 03:52 PM
  3. programming Opencockits FMC?
    By Mathias357 in forum I/O Interfacing and Hardware
    Replies: 3
    Last Post: 10-13-2009, 08:00 AM
  4. totally baffled
    By tiburon in forum OpenCockpits General Discussion
    Replies: 11
    Last Post: 04-24-2009, 07:23 AM
  5. [LOGIC] Center logic 0 Three position toggle switch
    By null null in forum PM General Q & A
    Replies: 2
    Last Post: 11-24-2004, 03:42 PM