Jump to content
Sign in to follow this  
barryward12345

WAAAAH!!! My low voltage warning lights wont work!!

Recommended Posts

As I seem to be in a very steep learning curve with everything I do related to FS2002, I have discovered that I learn more by trying to find out why some things don't work in some aircraft that I download -- rather than to try to create one myself , which is a task way to big for me at the moment.So, I have this aircraft and panel which , amongst other things, has a battery master switch and an old style .GAU low voltage warning light. The warning light is out of the Extra300 and it will not light up when I turn on the power. The rest of the panel does light up.So I installed an additional warning light - an XML one that has featured in this forum recently as a tutorial .Here is the code======================================(A:Electrical main bus voltage,volts) 28 <====================================BUT - it also will not light up!! AS far as I can see , everything appears OK in the Aircraft.cfg file -- so right now , I am beaten!!Any suggestions will be most appreciated.Barry

Share this post


Link to post
Share on other sites
Guest bartels

I havn't tried your code, but checking on low voltage and using electrical failure the same time can make problems. The low voltage line might work below 28 V but the electrical failure will also occur at low voltage, so the light will never show up.Arne Bartels

Share this post


Link to post
Share on other sites

>I havn't tried your code, but checking on low voltage and >using electrical failure the same time can make problems. >The low voltage line might work below 28 V but the >electrical failure will also occur at low voltage, so the >light will never show up. >Arne Bartels Thanks for the input Arne -- but unfortunately , removing the FAILURE section did not make any difference.I can't help but feel that this problem has something to do with the actual aircraft - rather than a gauge problem. The reason I say this is because I have looked at a number of aircraft that have battery switches and low voltage (sometimes called battery) lights and the majority of them do not work either. The only 2 aircraft that seem to work as they should are the default EXTRA and the Debonair. In these aircraft, you turn on the battery master switch and the LV light lights up. You start the engine and the LV light remains lit until you turn on the generator switch. I have noticed that there seems to be a variety of different entries under the [Electrical] section of thse many aircraft.cfg files--Some have only this: [electrical]max_battery_voltage=24.0generator_alternator_voltage=28.0max_generator_alternator_amps=60.0While others have this:[electrical];BusType, MaxAmpLoad, MinVoltage BusTypes:0=MainBus,1=AvionicsBus,2=BatteryBus,3=HotBatteryBus,4-7=Generator/AlternatorBus(1-4)flap_motor=0, 5 , 17.0gear_motor=0, 5 , 17.0autopilot=0, 5 , 17.0avionics_bus=0, 10, 17.0avionics=1, 5 , 17.0pitot_heat=0, 2 , 17.0additional_system=0, 20, 17.0marker_beacon=1, 2 , 17.0gear_warning=0, 2 , 17.0fuel_pump=0, 5 , 17.0starter1=0, 20, 17.0light_nav=0, 5 , 17.0light_beacon=0, 5 , 17.0light_landing=0, 5 , 17.0light_taxi=0, 5 , 17.0light_strobe=0, 5 , 17.0light_panel=0, 5 , 17.0And others have no Electrical section at all.Some aircraft have a battery switch only while others jave both battery and generator switches.HELP!!!!! :)Barry

Share this post


Link to post
Share on other sites
Guest bartels

I just tried the main bus voltage of the Baron with a string gauge: with genrators on it is 28V, with both generators off it drops to 24V and decreases slowly. I assume the prroblem is with the ">". I usually can't recall which would be the right so I try both > and < and use the one that works.Arne Bartels

Share this post


Link to post
Share on other sites
Guest

I found you need the right combination of switches to get a low voltage condition without creating a no voltage condition, which in that case there is no current to light the lamp.This is why it is easier to learn and test an alarm light for low altitude than voltage.I only see the low voltage warning when the engine is running, the battery switch is on and the alternator switch is off. The main bus voltage is 28 volts with battery and alternator running. It drops to 24 volts with only the battery, and the light will come on if you test for lower than 28 volts.I've heard that the battery will show voltage drop in FS if you leave it under load for a while. But I have not seen that happen, except if you leave it under load conditions (alternator off), for a while you can see the load briefly count back up from 24 to zero. But it does not behave the way I would expect.Hope there is nothing wrong with my code (I did test it but may have altered something cleaning it up for presentation. That's happened before.)Steve

Share this post


Link to post
Share on other sites
Guest JeanLuc_

Hi Barry,related to your other post about the B33 Bat light in the FS general forum, here is a piece of code for it:============================================// Set up gauge headerchar LGBAT1_gauge_name[] = GAUGE_NAME;extern PELEMENT_HEADER LGBAT1_list;extern MOUSERECT LGBAT1_MouseRectON[];MOUSE_FUNCTION LGBAT1But_cb;////////////////////////////////////////////////////////////////////////////////////FLOAT64 MBAT1;///////////////////////////////////////////////////////////////////////////////////GAUGE_CALLBACK LGBAT1_Main_cb;GAUGE_HEADER_FS800(GAUGE_W, LGBAT1_gauge_name, &LGBAT1_list, LGBAT1_MouseRectON, LGBAT1_Main_cb, 0, 0, 0);/////////////////////////////////////////////////////////////////////////////FAILURE_RECORD LGBAT1_fail[] ={{FAIL_SYSTEM_ELECTRICAL_PANELS, FAIL_ACTION_NO_DRAW},{FAIL_SYSTEM_ELECTRICAL_AVIONICS, FAIL_ACTION_NO_DRAW},{FAIL_NONE, FAIL_ACTION_NONE}};/////////////////////////////////////////////////////////////////////////////FLOAT64 FSAPI LGBAT1_LG_cb (PELEMENT_ICON pelement){ int v; v = RXP_Rand(100); if (v == 50) return (1); // random loose belt MBAT1 = (pelement->source_var.var_value.n); if (MBAT1 80,72,0) MOUSE_TOOLTIP_STRING("Low Batt Light") MOUSE_PARENT_ENDMOUSE_END/////////////////////// main event loop ///////////////////////////////////void FSAPI LGBAT1_Main_cb( PGAUGEHDR pgauge, int service_id, UINT32 extra_data ){switch(service_id) {/////////////////////////////////////////////////////////////////////////////////////// case PANEL_SERVICE_CONNECT_TO_WINDOW: break;////////////////////////////////////////////////////////////////////////////////////////// case PANEL_SERVICE_PRE_INSTALL: break;///////////////////////////////////////////////////////////////////// case PANEL_SERVICE_DISCONNECT: break;///////////////////////////////////////////////////////////////////// case PANEL_SERVICE_PANEL_OPEN: break;/////////////////////////////////////////////////////////////////// case PANEL_SERVICE_PRE_UPDATE: break;////////////////////////////////////////////////////////////////////////////////////// case PANEL_SERVICE_PRE_DRAW: break;//////////////////////////////////////////////////////////////////////////////////// case PANEL_SERVICE_PRE_INITIALIZE: break;/////////////////////////////////////////////////////////////////////////////////// case PANEL_SERVICE_PRE_KILL: break; }}#undef GAUGE_NAME#undef GAUGEHDR_VAR_NAME#undef GAUGE_W=================================================================Hope this helps!

Share this post


Link to post
Share on other sites
Guest

Here is a low voltage I use to check whenever the "battery" is getting low on power. Note that turning on the battery will drain its voltage very quickly unless settingadditional_system=0,0.1,17.0or any other (0.1) low value. Your settings in Fsuipc might also interfere, although I'm not sure.(*Annunciate at 20 volts, engine start is impossible at 17 volts.*) (A:ELECTRICAL BATTERY VOLTAGE,volts) 20 <=At least this seems to work ok for me. _This_ gauge checks battery voltage, the gauge above seem to (I'm not a C programmer) use the Alternator voltage.You can also use fuel level to check the operational status of the gauge, or monitor the battery bus in a string to find out how things are going. Just be sure to use a !3.2f string format.Many of the items in the full list of electrical items aren't working in FS2002 (doesn't draw current), and could (should?) be accounted for in your own electrical system.As usual, replace the <= with "& l t ; ="Also, check out (and possibly monitor with a string) the different available parameters you can use from SDK parameters.doc. Hope it works out.

Share this post


Link to post
Share on other sites

>>I found you need the right combination of switches to get a >low voltage condition without creating a no voltage >condition, which in that case there is no current to light >the lamp. >>This is why it is easier to learn and test an alarm light >for low altitude than voltage. >>I only see the low voltage warning when the engine is >running, the battery switch is on and the alternator switch >is off. The main bus voltage is 28 volts with battery and >alternator running. It drops to 24 volts with only the >battery, and the light will come on if you test for lower >than 28 volts. >>I've heard that the battery will show voltage drop in FS if >you leave it under load for a while. But I have not seen >that happen, except if you leave it under load conditions >(alternator off), for a while you can see the load briefly >count back up from 24 to zero. But it does not behave the >way I would expect. >>Hope there is nothing wrong with my code (I did test it but >may have altered something cleaning it up for presentation. >That's happened before.) >>Steve G'day Steve I have finally found my problem and everything now works as it should.Basically, I had an aircraft which had an old style .gau low voltage light which would not lightup or do anything at all . So I thought I would replace it with your alarm gauge -- trouble is , it didn't do anything either.I finally traced the problem through to 2 things -- firstly there was a very small syntax error involving an & and an amp; - one too many of these . Removing one of these at last caused the gauge to lightup when I turned the battery switch on -- but it would not extinguish when the engine (and alternator) started. I then removed the = from the :)Considering that I know nothing about the guage syntax or XML programming - but did some BASIC programming around 20 years ago and have a basic understanding of HTML, I feel quite proud of myself :) being able to install this little light and get it running.I have also modified it further to be a low fuel light in a piston engined aircraft.Looking at some of the more complicated XML gauges leaves me a bit cold though!!! :)At least , there is some chance of being able to utilise/modify XML gauges though -- C gauges are a closed shop to me.Barry

Share this post


Link to post
Share on other sites

>Hi Barry, Karl and others, >>Can one of you give me the working code for the LOW VOLTAGE >LIGHT? >Tried everything, but nothing works. This is what I have and it works great for me now===========================(A:Electrical main bus voltage,volts) 28 < Low Voltage light ==============================It is essentialy the same as the code given by Steve in his tutorial -- except for that I had a syntax error in the VALUE line and also I removed the = in the VALUE line. Let us know how you go.It would be good if we could get some more info about XML gauge programming -- there is some good info out there - but a lot of it is based around the idea that we are familiar with both the way gauges are created and the C language -- neither of these apply to me , I'm afraid! :)Barry

Share this post


Link to post
Share on other sites

(A:Electrical main bus voltage,volts) 28 <Just remember though when you are entering this code into a text editor like Notepad , that because Internet Explorer actually reads the base code and puts it into the correct format , you have to use a few terms that are different to what shows in your browser.So for the above line, the < immediately after 28 has to be typed & l t ; (but leave out the spaces) Hope you understand this.Barry

Share this post


Link to post
Share on other sites
Guest

Yeah, that probably crept in there when I decided to change from code for altitude to voltage. The altitude is easier to see and test because you can just slew up and down to watch the light go on and off, where you need to have the correct switches thrown to see the low voltage light work.I thought that I tested it before upload, but perhaps my "cleaning up" did it in.This should work.

<Value>(A:Electrical main bus voltage,volts) 28 <=</Value>

That is AMPERSAND ELL TEE SEMICOLON EQUALS meaning "less than or equal to" the value.

<Value>(A:Electrical main bus voltage,volts) 28 <</Value>

That is AMPERSAND ELL TEE SEMICOLON meaning "less than" the value, which might be more appropriate if the voltage is at 28 volts, otherwise, the light would come on when it is at voltage.If that code checks out I will update my example.Steve

Share this post


Link to post
Share on other sites

>(A:Electrical main bus voltage,volts) 28 < >>That is AMPERSAND ELL TEE SEMICOLON meaning "less than" the >value, which might be more appropriate if the voltage is at >28 volts, otherwise, the light would come on when it is at >voltage. >>If that code checks out I will update my example. Yes Steve-- this is the one that works for me -- if you leave the = in the value statement , the light doesn't go out when the generator runs up .BTW, I have "modified" your simple alarm light to work as a "low fuel" light on a DC3 that I fly a lot. It is set to go off if the total fuel falls to 100 gallons -- DON'T PANIC! DON'T PANIC!!!! as they say in my favourite old TV programme "Dads' Army".Looks like you can use this simple little light to work as an indicator for all sorts of things.Barry

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...