Jump to content
Sign in to follow this  
taguilo

XML Engine Start

Recommended Posts

(G:Var1) if{ (L:SYSTEM_POWER,bool) (A:ENG1 N2 RPM, percent) 50 < && if{ 0 (>K:TOGGLE_STARTER1) } els{ (G:Var1) -- (>G:Var1) } } (G:Var1) 0 != (A:GENERAL ENG1 STARTER, bool) ||(L:SYSTEM_POWER,bool)(A:GENERAL ENG1 STARTER, bool)5 (>G:Var1)- And in FS it won't work I click it and it goes back to the un-clicked possition, I have four of them and none work, they all do the same thing. Only difference bettween the four is they're changed for the respective engines.Thx for anything!


Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

Share this post


Link to post
Share on other sites

Is the gauge intended for FS9 or FSX? The starting 'procedure' is different for the two. In FSX you do NOT want to be sending multiple "K:TOGGLE_STARTER1" events since in FSX it is now a true toggle. Test for the conditions for start to be true then send one and only one "K:TOGGLE_STARTER1" event. Once you detect the conditions indicating a successful start, send one more "K:TOGGLE_STARTER1" to shut off the starter. Paul


Wide-5.jpg

Share this post


Link to post
Share on other sites
Guest Sterk

1.What this code is supposed to do?If to start engines it wont do that,because there is no starting engines command in this code.2.What condition is checked in first line,here:(G:Var1) if{...You havent specified any value for G:Var1 to check,so,as far as I know, in this case condition will be true when G:Var1 will get value of 1.But in your code G:Var1 will never be 1,so all this portion of code:...if{ (L:SYSTEM_POWER,bool)(A:ENG1 N2 RPM, percent) 50 < && if{ 0(>K:TOGGLE_STARTER1) } els{ (G:Var1) --(>G:Var1) } }...will never be executed...

Share this post


Link to post
Share on other sites

Hi,Consider these two things for FS9 version:-The toggle starter event isn't really a toggle but instead a "timer" that reverts the starter from on to off automatically after few milliseconds; that's the reason you'll see the switch go back to off a while since released. So the solution is to keep clicking the switch until N2 RPM is higher enough (50%).-The local var (L:SYSTEM_POWER,bool) needs to have a value of 1 for the starter event to actually fire; remember to do this in any part of your code otherwise the engine won't start at all.Tom

Share this post


Link to post
Share on other sites

Hi,>1.What this code is supposed to do?If to start engines it>wont do that,because there is no starting engines command in>this code.Yes there is a starting command : (>K:TOGGLE_STARTER1)>>2.What condition is checked in first line,here:>>(G:Var1) if{...>>You havent specified any value for G:Var1 to check,so,as far>as I know, in this case condition will be true when G:Var1>will get value of 1.But in your code G:Var1 will never be 1,so>all this portion of code:>>...if{ (L:SYSTEM_POWER,bool)>(A:ENG1 N2 RPM, percent) 50 < && if{ 0>(>K:TOGGLE_STARTER1) } els{ (G:Var1) -->(>G:Var1) } }...>>will never be executed...When the switch is clicked, GVAR1 takes a value of 5. This is a boolean TRUE : any boolean value is false (or "0") only if greater than -1 and lesser than 1, the rest of the range is true (or "1"). Tom

Share this post


Link to post
Share on other sites

Hey mate, could you give me a whole engine start XML? I'm not really understanding this, I know that to start the engines I need to keep on clicking the button until the engine has started, but I don't want to do that, I want to click the starter and it stays on until 50 N2.Thx for the help so far mate!


Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

Share this post


Link to post
Share on other sites

If you want it to work like that, just try replacing in your own code:(L:SYSTEM_POWER,bool)with (A:ELECTRICAL MASTER BATTERY,bool)Tom

Share this post


Link to post
Share on other sites

Fantastic! Thanks loads mate, you're a great help!!!One more thing, can anyone tell me what's wrong with this XML gauge:(A:FUEL TANK RIGHT AUX QUANTITY WEIGHT,pound)!5d!- I'm trying to make a C-17 Fuel Display Guage I just need it to display the amount of fuel in lbs, and is there a whay I can control the color it gives the # in?


Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

Share this post


Link to post
Share on other sites

Hi,Don't mean to be rude, but what is wrong is that you can't notice what is wrong in that piece of code. Which also means you need to study a bit :-) I suggest FS SDK and Nick Pike's wonderful tutorials (links are available in other posts doing a search) as reasonable sources for a good start point.Tom

Share this post


Link to post
Share on other sites

Sorry mate, to be honest I posted that before I gave it to much though, as humans we usually find it easier to have other people answer our questions - hehe.Anyway I've got that handled and I've even began work on a full-functional MFD - so far I've got Engine Page, a PFD, ND, and I'm modifing my Controls page and I've got a few other pages to work on.Anyway thanks loads mate you've been a huge deal of help!!!


Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

Share this post


Link to post
Share on other sites

You can also keep the starter held down in FS9 by creating the code within a fairly fast Update Frequency tag loop and stop issuing the starter command when you detect a successful start (I test the N2 RPM.)-Pv-

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...