PDA

View Full Version : Baffled by Programming Logic



David Rabiner
01-17-2006, 01:22 PM
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

Thomas Richter
01-17-2006, 02:17 PM
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

Thomas Richter
01-17-2006, 02:18 PM
deleted, was wrong.

Enrico Schiratti
01-22-2006, 04:49 AM
> 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
>

David Rabiner
01-22-2006, 05:10 PM
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

Enrico Schiratti
01-23-2006, 03:19 AM
> 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
>

Enrico Schiratti
01-24-2006, 04:06 AM
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
>>
>

David Rabiner
01-26-2006, 02:22 AM
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