Jump to content
Sign in to follow this  
n4gix

Hydraulic System

Recommended Posts

Guest A320 Co-Pilot

HiI am working on an old prop aircraft, and having a little trouble getting the Hydraulic to work as they should. Should work like this: It has Hydraulic Pumps on engine 2 and 3, and on the Engineers panel there is a switch which selects which Hydraulic pump is used. So when Hydraulic pump 2 is selected and Engine 2 is running Hydraulic pressure should equals about 650 psi, same goes for Engine 3. If Hydraulic Pump 2 or 3 is selected and the selected Engine is not running then no Hydraulic pressure should be got from that Engine. If both engine are shut down then Hydraulic pressure comes from an electric pump.The selector on the engineers panel has 3 position, Up selects Engine 2 (0), central (1) for off, and down (2) for Engine 3.This code works correctly for engine 2:(L:Hydraulic Select,enum) 0 == (A:ENG2 COMBUSTION, bool) && if{ 650 (>L:Hydraulic Pressure,psi) } els{ 0 (>L:Hydraulic Pressure,psi) }So if the engine is not running, and the switch is selected, no Hydraulic pressure is provided, and if the engine is running and the switch is not selected then that also provides no hydraulic pressure, the problem comes when I add the code for Engine number 3 to work the same(L:Hydraulic Select,enum) 0 == (A:ENG2 COMBUSTION, bool) && if{ (650 (>L:Hydraulic Pressure,psi) } els{ (L:Hydraulic Select,enum) 2 == (A:ENG3 COMBUSTION, bool) && if{ 650 (>L:Hydraulic Pressure,psi) } } els{ 0 (>L:Hydraulic Pressure,psi) } Everything stops working using the above code, I have always had a few problem linking code, but after hours of checking and trying other codes, still no joy.This is the working code for the Auxiliary switch:(L:Auxiliary Hydraulic Switch,bool) if{ 450 (>L:Hydraulic Pressure,psi) } els{ 0 (>L:Hydraulic Pressure,psi) } Thanks in advance for any help.

Share this post


Link to post
Share on other sites

Hi Russell,One of the greatest advantages of XML is the possibilty to use briefed code:(L:Hydraulic Select,enum) 0 == (A:ENG2 COMBUSTION, bool) and(L:Hydraulic Select,enum) 2 == (A:ENG3 COMBUSTION, bool) andor 650 * (>L:Hydraulic Pressure,psi) And you can use registers to shorten the code even more.Tom

Share this post


Link to post
Share on other sites
Guest A320 Co-Pilot

Hi TomTried your code Tom and unfortunatly it did not work, when the pump for engine 3 was selected and engine 3 was running, worked as it should, but when pump 2 was selected and engine was running, there was no hydraulic pressure. I have however managed to get it working using this code:(L:Hydraulic Select,enum) 0 == (A:ENG2 COMBUSTION, bool) 1 == && if{ 650 (>L:Hydraulic Pressure,psi) } els{ (L:Hydraulic Select,enum) 2 == (A:ENG3 COMBUSTION, bool) 1 == && if{ 650 (>L:Hydraulic Pressure,psi) } els{ (L:Auxiliary Hydraulic Switch,bool) if{ 450 (>L:Hydraulic Pressure,psi) } els{ 0(>L:Hydraulic Pressure,psi) } } } I tried this code last night before posting, but could not get it to work, this morning I had a look at it and moved the } } to the end of the code and it works excatly as it should.Thanks for posting.

Share this post


Link to post
Share on other sites

Russell,THe code I posted MUST work, if properly set. It's a logical fact.But...whatever :-)Tom

Share this post


Link to post
Share on other sites

You will find such errors faster if you get in the habit of using indented lines for your code: (L:Hydraulic Select,enum) 0 == (A:ENG2 COMBUSTION, bool) 1 == && if{ 650 (>L:Hydraulic Pressure,psi) } els{ (L:Hydraulic Select,enum) 2 == (A:ENG3 COMBUSTION, bool) 1 == && if{ 650 (>L:Hydraulic Pressure,psi) } els{ (L:Auxiliary Hydraulic Switch,bool) if{ 450 (>L:Hydraulic Pressure,psi) } els{ 0(>L:Hydraulic Pressure,psi) } } }


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest A320 Co-Pilot
The code I posted MUST work, if properly set. It's a logical fact.But...whatever
I give it another try, it might well have been me not setting the code out right.
You will find such errors faster if you get in the habit of using indented lines for your code:
I will give it a try BillCheers.

Share this post


Link to post
Share on other sites

BTW, in case you aren't aware, there's a rather neat new tool in the FSX SDK that will allow us to convert from "infix notation" to "postfix notation" and vice-versa.Sometimes it helps to convert from XML to C$ stype "infix" to validate our logic. Here is the same XML code in C# "infix notation": if ( ( (L:Hydraulic Select , enum) == 0 ) && ( (A:ENG2 COMBUSTION , bool) == 1 ) ) { (L:Hydraulic Pressure , psi) = 650 ; } else { if ( ( (L:Hydraulic Select , enum) == 2 ) && ( (A:ENG3 COMBUSTION , bool) == 1 ) ) { (L:Hydraulic Pressure , psi) = 650 ; } else { if (L:Auxiliary Hydraulic Switch , bool) { (L:Hydraulic Pressure , psi) = 450 ; } else { (L:Hydraulic Pressure , psi) = 0 ; } } }


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest A320 Co-Pilot

Hi BillI have not made the move to FSX yet, but I will make a note of your post for future reference.Thanks

Share this post


Link to post
Share on other sites

>Hi Bill>>I have not made the move to FSX yet, but I will make a note of>your post for future reference.Just to be clear, although this tool is in the FSX SDK, it will work with FS9 XML just as well... ;)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Is it possible for Fs9 users to download the FSX SDK and use this tool?

Share this post


Link to post
Share on other sites

>Is it possible for Fs9 users to download the FSX SDK and use>this tool?Unfortunately, no. The SDK SP1a download will only install if the user already has the FSX RTM SDK installed.


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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