Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

FS9 no amps from generator-alternator

Featured Replies

Hi,all I wanted was a small xml-gauge that would display amps from engines alternators.This is the code I used:(A:ELECTRICAL GENALT1 BUS AMPS, amps)Getting absolute no result, I tried with all other available bus-types, but no matter what I try, the needle wont move.Is this covered by the wide choice of bugs in the simulators electrical system?best regards and thanks in advance for any hint or comment.

For a generator to be powering the main bus, the engine must be running. Also, while volatage can be negative with AC current, amps are always going to be a positive number.You'll need to post more of your code for us to be able to see if it needs debugging.Suggest you take a look at one of the XML files that comes with a default aircraft. Just unzip it.

Hi,Use this string somewhere in a gauge and it will read amps:%((A:ELECTRICAL GENALT1 BUS AMPS,amps))%!d!As an element:%((A:ELECTRICAL GENALT1 BUS AMPS,amps))%!d!Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

thx alot, primary problem solved.but there's one last question:I use local vars to simulate APU. It works fine - except 2 last problems.1st. I try to delay the reaction of the needle on the ammeter and voltmeter. The code looks like this for the ammeter, same for the volts with different vars and values:(L:ELECTRICAL APU BUS AMPS, amps) Works, but the needle jumps right up to 60, and I want it to take some time on it's way. Any way to do that?edit: 2nd problem solved, topic found.

Hi,Try:orAnother way is:(L:ELECTRICAL APU BUS AMPS,amps) 1 + (>L:ELECTRICAL APU BUS AMPS,amps) But I don't know what gives the value 60 to the amps in your gauge.A possibility is:(L:APU,bool (on)if{ (L:ELECTRICAL APU BUS AMPS,amps) 1 + 60 min (>L:ELECTRICAL APU BUS AMPS,amps) } els{ (L:ELECTRICAL APU BUS AMPS,amps) 1 - 0 max (>L:ELECTRICAL APU BUS AMPS,amps) } So the gauge becomes:(L:APU,bool) if{ (L:ELECTRICAL APU BUS AMPS,amps) 1 + 60 min (>L:ELECTRICAL APU BUS AMPS,amps) } els{ (L:ELECTRICAL APU BUS AMPS,amps) 1 - 0 max (>L:ELECTRICAL APU BUS AMPS,amps) } (L:ELECTRICAL APU BUS AMPS,amps) You don't need "imagesizes".Hope it helps,Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

One last thing.. I want to change several local vars with the click-event. In my code it looks like that: 0 (>L:ELECTRICAL APU BUS VOLTAGE,volts) 0 (>L:ELECTRICAL APU BUS AMPS, amps) Needless to say, this is not working. I guessed it should, I saw it in several other gauges.. but it just does nothing. Each event put there as a single one works.

Hi,Why should you want to set amps and volts at zero in the click?If the previous case is still valid the amount of amps or volts are determinded in the value statement.So if you click 0 the value is going to override this.On the other hand you can put as many >L, >G, >P and >K's in the click section as you want.Logically in your APU it should contain:0 (>L:APU,bool) or(L:APU,bool) ! (>L:APU,bool) Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

I have several other gauges that display volts and amps from different sources, like the alternators-generators of the engines, the avionics-bus, the battery and hot-battery and so on.Those instruments already have a readout for L:ELECTRICAL APU BUS AMPS and L:ELECTRCAL APU BUS VOLTS. So I tried to set those values from within the new APU-gauge without changing the code of the existing gauges. This is why I wanted that to happen on click. The code-snipet was from the "off"-section of the switch, intended to set all the values back to zero when the APU is shut down.I still try to find out - with kind help of the SDK and your way more helpfull hints - what the different event-types really do, and were to use which of them.I guess, there is no way to code an APU in XML that will really "replace" or at least recharge the battery, right? Would C++ do the trick?

Hi,You can set battery life in the registered version of FSUIPC.The more difficult way, but with a lot of satisfaction, is to create a custom elec. system 100% real as designed for the plane.Then the aircraft becomes independant of FS and you can recharge batteries by the generators, apu or external power unit.Jan"Beatus ille qui procul negotiis..."

Jan

 

 

 

"Beatus ille qui procul negotiis..."

>One caveat regarding battery life. If FS sees the battery>dead, no amount of custom code will start the engines. ;)This entry in aircraft.cfg will give unlimited battery power, a good start point for a custom electrical system.[electrical]......electric_always_available = 1Tom

Well,I guessed it would be like that. Makes sense, from the pov of the simulator ;-)But if it does only apply to the startes - and I guess the radios - it's not quite a problem. The "virtual" electric system will run, and when it comes to starting the engines, it's not a problem to make the starter-switch turn on the batt and hook up a gen-alt when the engine is running.Looks different if more systems need "real" battery-power. Then you could drain the battery quite fast while going thru the prestart-procedures.There is a section in the acft.cfg that sets load for several systems in amps. Would it help if the load is set to zero there and only simulated using local vars in the virtual electric system?

>>One caveat regarding battery life. If FS sees the battery>>dead, no amount of custom code will start the engines. ;)>>This entry in aircraft.cfg will give unlimited battery power,>a good start point for a custom electrical system.>>[electrical]>...>...>electric_always_available = 1>>Tom>Okay, then one doesn't need to tinker with the other stuff at all :-D

>>Okay, then one doesn't need to tinker with the other stuff at>all :-DProbably no :-) I can assure you that my a/c will go completely dark after 40 mins of battery only power draining...Tom

  • Author
  • Moderator

>I guess, there is no way to code an APU in XML that will>really "replace" or at least recharge the battery, right?>Would C++ do the trick?Just for sake of completeness... although FS9 doesn't have a GPU or APU system available......FSX does. The new APU "system" will actually keep the battery "charged" and supply unlimited power to the a/c systems. ;)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.