Sign in to follow this  
Guest A320 Co-Pilot

Delay in an XML Gauge

Recommended Posts

Taking my Virtual First Officer a bit further, I thought about gettng him to set up the Aircraft, so at the start he could turn on the APU, Nav lights etc. To make things a little easier I thought I would test a code that got the VFO to turn on the Taxi lights and Landing lights, when that code worked I could then add the rest. My problem how do you add a delay in XML ? My code: (L:PreFlight,bool) 1 == if{ (P:Local Time, seconds) 5+ (A:LIGHT TAXI,bool) 0 == if{ 1 (>K:TOGGLE_TAXI_LIGHTS) 1 } (P:Local Time, seconds) 5+ (A:LIGHT LANDING,bool) 0 == if{ 1 (>K:LANDING_LIGHTS_TOGGLE) } } This turns on the Taxi Lights and Landing Lights together and I would like there to be a delay in flicking one switch and then the other.Thanks in advance for any help.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi,Experiment with:(L:PreFlight,bool) if{ ........(P:Local Time,seconds) 5 + (>L:taxi lights timer,seconds) (P:Local Time,seconds) (L:taxi lights timer,seconds) > if{ (A:LIGHT TAXI,bool) ! if{ (>K:TOGGLE_TAXI_LIGHTS) (P:Local Time,seconds) 5 + (>L:landing lights timer,seconds) } } (P:Local Time,seconds) (L:landing lights timer,seconds) > if{ (A:LIGHT LANDING,bool) ! if{ (>K:LANDING_LIGHTS_TOGGLE) (P:Local Time,seconds) 5 + (>L:other lights timer,seconds) } } (P:Local Time,seconds) (L:other lights timer,seconds) > etc.......0 (>L:PreFlight,bool) } Hope it helps,Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

HiStill can not get it to work after trying alot of different ways to use the code above, and trying code of my own. So if anyone has any idea's please post.

Share this post


Link to post
Share on other sites

Hi,This combination works: (L:PreFlight,bool) (P:Local Time,seconds) (L:taxi lights timer,seconds) > and if{ (A:LIGHT TAXI,bool) ! if{ (>K:TOGGLE_TAXI_LIGHTS) (P:Local Time,seconds) 5 + (>L:landing lights timer,seconds) } (P:Local Time,seconds) (L:landing lights timer,seconds) > if{ (A:LIGHT LANDING,bool) ! if{ (>K:LANDING_LIGHTS_TOGGLE) 0 (>L:PreFlight,bool) } } with the click:1 (>L:PreFlight,bool) (P:Local Time,seconds) 5 + (>L:taxi lights timer,seconds) Hope it helps,Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

HiThanks Jan for the working code, but I need the delay to be activated by a On Event. I will try to explain how I would like it to work, and will use the Before Start Checklist as a guide this is roughtly how the rest will work. After I complete the Before Start Checklist (using the On Event code I used for the After Takeoff Checklist) the FO should go into his flow, ie turn fuel tanks on, beacon light etc. So the delay needs to activated by the On Event, I have tried adding the above code and getting the last press of the button of the Before Start Checklist to active the Preflight switch, which it does, and it does work to a degree as the Taxi light switch turn's straight on and the Landing light switch is switched on a few second later. I have been playing about with this code for a while, and still have not managed to get it to work as I would like it too, so if you have any more idea's or anyone new has any idea's I would be greatful if they would post.

Share this post


Link to post
Share on other sites

I see,May be this sequence (not tested)?:(P:Local Time,seconds) 5 + (>L:preflight timer,seconds) (L:PreFlight,bool) ! (P:Local Time,seconds) (L:preflight timer,seconds) > and if{ 1 (>L:PreFlight,bool) (P:Local Time,seconds) 5 + (>L:taxi lights timer,seconds) } (P:Local Time,seconds) (L:taxi lights timer,seconds) >if{ (A:LIGHT TAXI,bool) ! if{ (>K:TOGGLE_TAXI_LIGHTS) (P:Local Time,seconds) 5 + (>L:landing lights timer,seconds) } } (P:Local Time,seconds) (L:landing lights timer,seconds) > if{ (A:LIGHT LANDING,bool) ! if{ (>K:LANDING_LIGHTS_TOGGLE) (P:Local Time,seconds) 5 + (>L:other timer,seconds) } } (P:Local Time,seconds) (L:other timer,seconds) > if{ (A:...,bool) ! if{ (>K:...) (P:Local Time,seconds) 5 + (>L:last timer,seconds) } } etc.(P:Local Time,seconds) (L:last timer,seconds) > if{ (L:...,bool) ! if{ (>L:...,bool) 0 (>L:PreFlight,bool) } } Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Hi Jan I have tried you code, and unfortunaly it does the same as the code I am trying to get to work at the moment.My Code:(L:PreFlight,bool) if{ (P:Local Time,seconds) && (L:preflight timer,seconds) > ! && if{ 1 (P:Local Time,seconds) 5 + (>L:taxi lights timer,seconds) } (P:Local Time,seconds) (L:taxi lights timer,seconds) > if{ (A:LIGHT TAXI,bool) ! if{ (>K:TOGGLE_TAXI_LIGHTS) (P:Local Time,seconds) 5 + (>L:landing lights timer,seconds) } } (P:Local Time,seconds) (L:landing lights timer,seconds) > if{ (A:LIGHT LANDING,bool) ! if{ (>K:LANDING_LIGHTS_TOGGLE) } } } The taxi light switch is switched on as soon as the Preflight switch is either clicked on, or turned on via the On Event, and then the Landing light Switch is turned on 5 seconds later. If I take the if{ from between the (L:PreFlight,bool) and the (P:Local Time,seconds) the taxi light switch is moved to the on postion as soon as the panel the switch is on becomes visible, this also happens if I move the } from the end of the line to after (>L:taxi lights timer,seconds). For some reason the delay only become active if the taxi light switch is on, and it should be active as soon as the PreFlight switch is active. Help !

Share this post


Link to post
Share on other sites

Hi,Tested this one:1 (>L:PreFlight,bool) (P:Local Time,seconds) 3 + (>L:taxi lights timer,seconds) } (P:Local Time,seconds) 6 + (>L:landing lights timer,seconds) (P:Local Time,seconds) 9 + (>L:other timer,seconds) (P:Local Time,seconds) 12 + (>L:last timer,seconds) 1 (>L:button,number) (L:PreFlight,bool) if{ (P:Local Time,seconds) (L:taxi lights timer,seconds) > if{ (A:LIGHT TAXI,bool) ! if{ (>K:TOGGLE_TAXI_LIGHTS) } (P:Local Time,seconds) (L:landing lights timer,seconds) > if{ (A:LIGHT LANDING,bool) ! if{ (>K:LANDING_LIGHTS_TOGGLE) } (P:Local Time,seconds) (L:other timer,seconds) > if{ (A:LIGHT NAV,bool) ! if{ (>K:TOGGLE_NAV_LIGHTS) } (P:Local Time,seconds) (L:last timer,seconds) > if{ (A:LIGHT PANEL,bool) ! if{ (>K:PANEL_LIGHTS_TOGGLE) } 0 (>L:PreFlight,bool) } Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

"More clean"1 (>L:PreFlight,bool) (P:Local Time,seconds) 3 + (>L:taxi lights timer,seconds) (P:Local Time,seconds) 6 + (>L:landing lights timer,seconds) (P:Local Time,seconds) 9 + (>L:other timer,seconds) (P:Local Time,seconds) 12 + (>L:last timer,seconds) (P:Local Time,seconds) 15 + (>L:PreFlight timer,seconds) (L:PreFlight,bool) if{ (P:Local Time,seconds) (L:taxi lights timer,seconds) > (A:LIGHT TAXI,bool) ! and if{ (>K:TOGGLE_TAXI_LIGHTS) } (P:Local Time,seconds) (L:landing lights timer,seconds) > (A:LIGHT LANDING,bool) ! and if{ (>K:LANDING_LIGHTS_TOGGLE) } (P:Local Time,seconds) (L:other timer,seconds) > (A:LIGHT NAV,bool) ! and if{ (>K:TOGGLE_NAV_LIGHTS) } (P:Local Time,seconds) (L:last timer,seconds) > (A:LIGHT PANEL,bool) ! and if{ (>K:PANEL_LIGHTS_TOGGLE) } (P:Local Time,seconds) (L:PreFlight timer,seconds) > (L:PreFlight,bool) and if{ 0 (>L:PreFlight,bool) } } Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Hi JanI have altered how my FO first flow is started so the code you posted works for the first flow, The FO then needs to start his second flow (setting the panel up for start) and this needs to be activated by doing the Before Start Checklist I was hoping by adding another L:Var I could get the Before Start Checklist to activate another switch that would then start your delay code, but at the moment I can not get it to work. When I use another code to activate the switch there is no delay in the switch at all, and at the minute the (>L:Start Second Flow,bool) turns on, so does everything else. This is the last bit of code I have got to get to work as the rest of it, will use the same code(s) as I already have working.My Code So Far:(L:BeforeStart,bool)(L:Start Second Flow,bool) if{ (L:BeforeStart,bool) (P:Local Time,seconds) (L:taxi lights timer,seconds) > if{ (A:LIGHT TAXI,bool) ! if{ (>K:TOGGLE_TAXI_LIGHTS) } (P:Local Time,seconds) (L:landing lights timer,seconds) > if{ (A:LIGHT LANDING,bool) ! if{ (>K:LANDING_LIGHTS_TOGGLE) } (P:Local Time,seconds) (L:other timer,seconds) > if{ (A:LIGHT NAV,bool) ! if{ (>K:TOGGLE_NAV_LIGHTS) } (P:Local Time,seconds) (L:last timer,seconds) > if{ (A:LIGHT PANEL,bool) ! if{ (>K:PANEL_LIGHTS_TOGGLE) } } (L:BeforeStart,bool) (A:Indicated Altitude, feet) 6000 < && (L:ATOC,number) ! && if{ 1 (>L:FO_Sound_ATOCS,enum) 1 (>L:ATOC,number) 1 (>L:NextChecklist,number) } els{ (L:BeforeStart,bool) (L:NextChecklist,number) && (L:ATOC1,number) ! && if{ 1 (>L:FO_Sound_UpFlaps,enum) 1 (>L:ATOC1,number) 1 (>L:NextChecklist1,number) } els{ (L:BeforeStart,bool) (L:NextChecklist1,number) && (L:ATOC2,number) ! && if{ 1 (>L:FO_Sound_ATOCF,enum) 1 (>L:ATOC2,number) 0 (>L:NextChecklist1,number) 1 (>L:Start Second Flow,bool) } } Before Start(L:BeforeStart,bool) ! (>L:BeforeStart,bool) (P:Local Time,seconds) 3 + (>L:taxi lights timer,seconds) } (P:Local Time,seconds) 6 + (>L:landing lights timer,seconds) (P:Local Time,seconds) 9 + (>L:other timer,seconds) (P:Local Time,seconds) 12 + (>L:last timer,seconds) 1 Any Idea ?

Share this post


Link to post
Share on other sites

It is a "monstrum", but it works a little bit:1 (>L:PreFlight,bool) (P:Local Time,seconds) 2 + (>L:taxi lights timer,seconds) (P:Local Time,seconds) 4 + (>L:landing lights timer,seconds) (P:Local Time,seconds) 6 + (>L:other timer,seconds) (P:Local Time,seconds) 8 + (>L:last timer,seconds) (P:Local Time,seconds) 10 + (>L:PreFlight timer,seconds) (L:PreFlight,bool) if{ (P:Local Time,seconds) (L:taxi lights timer,seconds) > (A:LIGHT TAXI,bool) ! and if{ (>K:TOGGLE_TAXI_LIGHTS) 0 (>L:taxi lights timer,seconds) 0 (>L:PostFlight timer,seconds) } (P:Local Time,seconds) (L:landing lights timer,seconds) > (A:LIGHT LANDING,bool) ! and if{ (>K:LANDING_LIGHTS_TOGGLE) 0 (>L:landing lights timer,seconds) } (P:Local Time,seconds) (L:other timer,seconds) > (A:LIGHT NAV,bool) ! and if{ (>K:TOGGLE_NAV_LIGHTS) 0 (>L:other timer,seconds) } (P:Local Time,seconds) (L:last timer,seconds) > (A:LIGHT PANEL,bool) ! and if{ (>K:PANEL_LIGHTS_TOGGLE) 0 (>L:last timer,seconds) } (P:Local Time,seconds) (L:PreFlight timer,seconds) > (L:PreFlight,bool) and if{ 1 (>L:NEXT,bool) 0 (>L:PreFlight,bool) 0 (>L:PreFlight timer,seconds) (P:Local Time,seconds) 2 + (>L:taxi lights timer 1,seconds) (P:Local Time,seconds) 4 + (>L:landing lights timer 1,seconds) (P:Local Time,seconds) 6 + (>L:other timer 1,seconds) (P:Local Time,seconds) 8 + (>L:last timer 1,seconds) } } (L:NEXT,bool) if{ (P:Local Time,seconds) (L:taxi lights timer 1,seconds) > (A:LIGHT TAXI,bool) and if{ (>K:TOGGLE_TAXI_LIGHTS) 0 (>L:taxi lights timer 1,seconds) } (P:Local Time,seconds) (L:landing lights timer 1,seconds) > (A:LIGHT LANDING,bool) and if{ (>K:LANDING_LIGHTS_TOGGLE) 0 (>L:landing lights timer 1,seconds) } (P:Local Time,seconds) (L:other timer 1,seconds) > (A:LIGHT NAV,bool) and if{ (>K:TOGGLE_NAV_LIGHTS) 0 (>L:other timer 1,seconds) } (P:Local Time,seconds) (L:last timer 1,seconds) > (A:LIGHT PANEL,bool) and if{ (>K:PANEL_LIGHTS_TOGGLE) 0 (>L:last timer 1,seconds) 0 (>L:NEXT,bool) } } Change the events and var's to your need.Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Hi JanAfter a lot of thought I have changed the way the whole thing works, so the code now works the FO first and second flows, and I will need to click switches to start the FO next flows, ie after start, before take off etc.Here is the code for the Pre Departure:(L:PreDep,bool)3 mins First Officers Walkaround Complete(L:PreDep,bool) (L:WARC,number) and if{ (P:Local Time,seconds) (L:warc timer,seconds) > if{ (>L:FO_Sound_WARC,enum) 1 (>L:WARC,number) } } 5 mins First Officers First Flow(L:PreDep,bool) if{ (P:Local Time,seconds) (L:seat belt timer,seconds) > if{ (L:SEAT_BELT,bool) 1 (>L:SEAT_BELT,bool) } (P:Local Time,seconds) (L:no smoking timer,seconds) > if{ (L:NO_SMOKE,bool) 1 (>L:NO_SMOKE,bool) } (P:Local Time,seconds) (L:irs 1 timer,seconds) > if{ (L:IRS1,enum) 1 (>L:IRS1,enum) } (P:Local Time,seconds) (L:irs 2 timer,seconds) > if{ (L:IRS2,enum) 1 (>L:IRS2,enum) } (P:Local Time,seconds) (L:irs 3 timer,seconds) > if{ (L:IRS3,enum) 1 (>L:IRS3,enum) } (P:Local Time,seconds) (L:pitch trim 1 timer,seconds) > if{ (L:1Trim,bool) 1 (>L:1Trim,bool) } (P:Local Time,seconds) (L:pitch trim 2 timer,seconds) > if{ (L:2Trim,bool) 1 (>L:2Trim,bool) } (P:Local Time,seconds) (L:yaw 1 timer,seconds) > if{ (L:1Yaw,bool) 1 (>L:1Yaw,bool) } (P:Local Time,seconds) (L:yaw 2 timer,seconds) > if{ (L:2Yaw,bool) 1 (>L:2Yaw,bool) } } 10 mins First Officers Second Flow (L:PreDep,bool) if{ (P:Local Time,seconds) (L:left tank1 timer,seconds) > if{ (L:FPumpL1,bool) 1 (>L:FPumpL1,bool) } (P:Local Time,seconds) (L:left tank timer,seconds) > if{ (L:FPumpL,bool) 1 (>L:FPumpL,bool) } (P:Local Time,seconds) (L:centre tank2 timer,seconds) > if{ (L:FPumpC2,bool) 1 (>L:FPumpC2,bool) } (P:Local Time,seconds) (L:right tank timer,seconds) > if{ (L:FPumpR,bool) 1 (>L:FPumpR,bool) } (P:Local Time,seconds) (L:right tank1 timer,seconds) > if{ (L:FPumpR1,bool) 1 (>L:FPumpR1,bool) } (P:Local Time,seconds) (L:hyd1 timer,seconds) > if{ (L:Blue_pump,bool) 1 (>L:Blue_pump,bool) } (P:Local Time,seconds) (L:hyd2 timer,seconds) > if{ (L:Green_pump1,bool) 1 (>L:Green_pump1,bool) } (P:Local Time,seconds) (L:hyd3 timer,seconds) > if{ (L:Green_pump2,bool) 1 (>L:Green_pump2,bool) } (P:Local Time,seconds) (L:hyd4 timer,seconds) > if{ (L:Yellow_pump,bool) 1 (>L:Yellow_pump,bool) } } 15 mins FO Turns Beacon On - Ready for Before Start Checklist(L:PreDep,bool) if{ (P:Local Time,seconds) (L:beacon timer,seconds) > if{ (A:LIGHT BEACON,bool) ! if{ (>K:TOGGLE_BEACON_LIGHTS) 0 (>L:PreDep,bool) } } Pre Departure(L:PreDep,bool) ! (>L:PreDep,bool) (P:Local Time,seconds) (>L:warc timer,seconds) 180 + (P:Local Time,seconds) 300 + (>L:seat belt timer,seconds) } (P:Local Time,seconds) 302 + (>L:no smoking timer,seconds) (P:Local Time,seconds) 304 + (>L:irs 1 timer,seconds) (P:Local Time,seconds) 306 + (>L:irs 2 timer,seconds) (P:Local Time,seconds) 308 + (>L:irs 3 timer,seconds) (P:Local Time,seconds) 310 + (>L:pitch trim 1 timer,seconds) (P:Local Time,seconds) 312 + (>L:pitch trim 2 timer,seconds) (P:Local Time,seconds) 314 + (>L:yaw 1 timer,seconds) (P:Local Time,seconds) 316 + (>L:yaw 2 timer,seconds) (P:Local Time,seconds) 600 + (>L:left tank1 timer,seconds) (P:Local Time,seconds) 602 + (>L:left tank timer,seconds) (P:Local Time,seconds) 604 + (>L:centre tank2 timer,seconds) (P:Local Time,seconds) 606 + (>L:right tank timer,seconds) (P:Local Time,seconds) 608 + (>L:right tank1 timer,seconds) (P:Local Time,seconds) 610 + (>L:hyd1 timer,seconds) (P:Local Time,seconds) 612 + (>L:hyd2 timer,seconds) (P:Local Time,seconds) 614 + (>L:hyd3 timer,seconds) (P:Local Time,seconds) 616 + (>L:hyd4 timer,seconds) (P:Local Time,seconds) 900 + (>L:beacon timer,seconds) It still has a few problems, The 3 minute code for the FO Walkaround complete does not work, it works fine untill I add the two L:Var to get the sound file to play only once, and what ever I try it does not work. The same for the First Flow, I need to be able to turn it off like you do a sound file, as at the minute it hold the three IRS switches to on, and the IRS does not align untill the pre departure switch is turn off, which is not untill the Beacon Lights are on. I have tried adding another L:Var to the First flow value like the one I use in the take off switch which does the required tasks and then is no longer active, I surpose I could use a G:Var, but I perfer to use L:Var. I thought changing the way it worked would solve the problem I was having, looks like I have just created some different ones. I am hopeing that these will be easier to solve though.

Share this post


Link to post
Share on other sites

Hi,I cannot test, but try:(P:Local Time,seconds) s1 (L:PreDep,bool) if{ (L:WARC,number) 1 != if{ l1 (L:warc timer,seconds) > if{ 1 (>L:WARC,number) } (L:WARC,number) 1 == if{ 1 (>L:FO_Sound_WARC,enum) } } l1 (L:seat belt timer,seconds) > if{ 1 (>L:SEAT_BELT,bool) } l1 (L:no smoking timer,seconds) > if{ 1 (>L:NO_SMOKE,bool) } l1 (L:irs 1 timer,seconds) > if{ 1 (>L:IRS1,enum) } l1 (L:irs 2 timer,seconds) > if{ 1 (>L:IRS2,enum) } l1 (L:irs 3 timer,seconds) > if{ 1 (>L:IRS3,enum) } l1 (L:pitch trim 1 timer,seconds) > if{ 1 (>L:1Trim,bool) } l1 (L:pitch trim 2 timer,seconds) > if{ 1 (>L:2Trim,bool) } l1 (L:yaw 1 timer,seconds) > if{ 1 (>L:1Yaw,bool) } l1 (L:yaw 2 timer,seconds) > if{ 1 (>L:2Yaw,bool) } l1 (L:left tank1 timer,seconds) > if{ 1 (>L:FPumpL1,bool) } l1 (L:left tank timer,seconds) > if{ 1 (>L:FPumpL,bool) } l1 (L:centre tank2 timer,seconds) > if{ 1 (>L:FPumpC2,bool) } l1 (L:right tank timer,seconds) > if{ 1 (>L:FPumpR,bool) } l1 (L:right tank1 timer,seconds) > if{ 1 (>L:FPumpR1,bool) } l1 (L:hyd1 timer,seconds) > if{ 1 (>L:Blue_pump,bool) } l1 (L:hyd2 timer,seconds) > if{ 1 (>L:Green_pump1,bool) } l1 (L:hyd3 timer,seconds) > if{ 1 (>L:Green_pump2,bool) } l1 (L:hyd4 timer,seconds) > if{ 1 (>L:Yellow_pump,bool) } l1 (L:beacon timer,seconds) > if{ (A:LIGHT BEACON,bool) ! if{ (>K:TOGGLE_BEACON_LIGHTS) } } (A:LIGHT BEACON,bool) if{ 0 (>L:PreDep,bool) } } Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Hi JanYour code works perfectly, and it is a lot tider than mine, but it still has the same problem, it holds the switches in there positions untill the pre depature switch is turned off. This is what is causing the problem with the IRS system. So I need a way of turning the FO Flows off after they have been completed. I have gone back to the basic code for testing purposes.The Basic Code:(L:PreFlight,bool) if{ (P:Local Time,seconds) (L:taxi lights timer,seconds) > if{ (A:LIGHT TAXI,bool) ! if{ (>K:TOGGLE_TAXI_LIGHTS) } (P:Local Time,seconds) (L:landing lights timer,seconds) > if{ (A:LIGHT LANDING,bool) ! if{ (>K:LANDING_LIGHTS_TOGGLE) } (P:Local Time,seconds) (L:other timer,seconds) > if{ (A:LIGHT NAV,bool) ! if{ (>K:TOGGLE_NAV_LIGHTS) } (P:Local Time,seconds) (L:last timer,seconds) > if{ (A:LIGHT PANEL,bool) ! if{ (>K:PANEL_LIGHTS_TOGGLE) } } (L:PreFlight,bool) ! (>L:PreFlight,bool) (P:Local Time,seconds) 3 + (>L:taxi lights timer,seconds) } (P:Local Time,seconds) 6 + (>L:landing lights timer,seconds) (P:Local Time,seconds) 9 + (>L:other timer,seconds) (P:Local Time,seconds) 12 + (>L:last timer,seconds) 1 (>L:button,number) This is the code which works but holds the switches in there postions untill PreFlight switch is off, so I need to find someway of adding another variable or changing the code so that when the flow is finished, the PreFlight switch stays on, but the switches are no longer held in the on position by the code.

Share this post


Link to post
Share on other sites

My code for the predeparture, works ok, apart from holding the switch in the on position, untill pre deparure switch is turn off, To continue this project I need it to not hold the switch in the on position once it has turned it on, but as of yet I have not been able to do this. Is there anyone who knows how I can get this code to do this ? I have been trying to get it work for the past two nights and still no sucess.The Code:(L:PreDep,bool)(P:Local Time,seconds) s1 (L:PreDep,bool) if{ (L:WARC,number) 1 != if{ l1 (L:warc timer,seconds) > if{ 1 (>L:WARC,number) } (L:WARC,number) 1 == if{ 1 (>L:FO_Sound_WARC,enum) } } l1 (L:seat belt timer,seconds) > if{ 1 (>L:SEAT_BELT,bool) } l1 (L:no smoking timer,seconds) > if{ 1 (>L:NO_SMOKE,bool) } I1 (L:pitot heat timer,seconds) > if{ (A:PITOT HEAT,bool) ! if{ (>K:PITOT_HEAT_TOGGLE) } l1 (L:irs 1 timer,seconds) > if{ 1 (>L:IRS1,enum) } l1 (L:irs 2 timer,seconds) > if{ 1 (>L:IRS2,enum) } l1 (L:irs 3 timer,seconds) > if{ 1 (>L:IRS3,enum) } l1 (L:pitch trim 1 timer,seconds) > if{ 1 (>L:1Trim,bool) } l1 (L:pitch trim 2 timer,seconds) > if{ 1 (>L:2Trim,bool) } l1 (L:yaw 1 timer,seconds) > if{ 1 (>L:1Yaw,bool) } l1 (L:yaw 2 timer,seconds) > if{ 1 (>L:2Yaw,bool) } l1 (L:left tank1 timer,seconds) > if{ 1 (>L:FPumpL1,bool) } l1 (L:left tank timer,seconds) > if{ 1 (>L:FPumpL,bool) } l1 (L:centre tank2 timer,seconds) > if{ 1 (>L:FPumpC2,bool) } l1 (L:right tank timer,seconds) > if{ 1 (>L:FPumpR,bool) } l1 (L:right tank1 timer,seconds) > if{ 1 (>L:FPumpR1,bool) } l1 (L:hyd1 timer,seconds) > if{ 1 (>L:Blue_pump,bool) } l1 (L:hyd2 timer,seconds) > if{ 1 (>L:Green_pump1,bool) } l1 (L:hyd3 timer,seconds) > if{ 1 (>L:Green_pump2,bool) } l1 (L:hyd4 timer,seconds) > if{ 1 (>L:Yellow_pump,bool) } l1 (L:pack1 timer,seconds) > if{ 0 (>L:LPack_Auto,bool) } l1 (L:pack2 timer,seconds) > if{ 0 (>L:RPack_Auto,bool) } l1 (L:beacon timer,seconds) > if{ (A:LIGHT BEACON,bool) ! if{ (>K:TOGGLE_BEACON_LIGHTS) } (L:CRFD,number) 1 != if{ l1 (L:crfd timer,seconds) > if{ 1 (>L:CRFD,number) } (L:CRFD,number) 1 == if{ 1 (>L:FO_Sound_CRFD,enum) 0 (>L:PreDep,bool) } } } Pre Departure(L:PreDep,bool) ! (>L:PreDep,bool) (P:Local Time,seconds) 300 + (>L:warc timer,seconds) (P:Local Time,seconds) 480 + (>L:seat belt timer,seconds) } (P:Local Time,seconds) 483 + (>L:no smoking timer,seconds) (P:Local Time,seconds) 486 + (>L:pitot heat timer,seconds) (P:Local Time,seconds) 489 + (>L:irs 1 timer,seconds) (P:Local Time,seconds) 492 + (>L:irs 2 timer,seconds) (P:Local Time,seconds) 495 + (>L:irs 3 timer,seconds) (P:Local Time,seconds) 498 + (>L:pitch trim 1 timer,seconds) (P:Local Time,seconds) 501 + (>L:pitch trim 2 timer,seconds) (P:Local Time,seconds) 504 + (>L:yaw 1 timer,seconds) (P:Local Time,seconds) 507 + (>L:yaw 2 timer,seconds) (P:Local Time,seconds) 720 + (>L:left tank1 timer,seconds) (P:Local Time,seconds) 723 + (>L:left tank timer,seconds) (P:Local Time,seconds) 726 + (>L:centre tank2 timer,seconds) (P:Local Time,seconds) 729 + (>L:right tank timer,seconds) (P:Local Time,seconds) 731 + (>L:right tank1 timer,seconds) (P:Local Time,seconds) 734 + (>L:hyd1 timer,seconds) (P:Local Time,seconds) 737 + (>L:hyd2 timer,seconds) (P:Local Time,seconds) 740 + (>L:hyd3 timer,seconds) (P:Local Time,seconds) 743 + (>L:hyd4 timer,seconds) (P:Local Time,seconds) 1140 + (>L:pack1 timer,seconds) (P:Local Time,seconds) 1143 + (>L:pack2 timer,seconds) (P:Local Time,seconds) 1146 + (>L:beacon timer,seconds) (P:Local Time,seconds) 1200 + (L:crfd timer,seconds)

Share this post


Link to post
Share on other sites

Hi,Which switch must stay on?(L:PreDep,bool)? In that case leave it out the value section.You can switch it off in the click section.Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Hi JanThe (L:PreDep,bool) must stay on untill the sound plays for the cabin crew to tell the Captain cabin is ready for departure, it is then turned off by the code. I want the code to turn on all the switch and leave them in the on position, but not keep them held in the on position. I think the easiest way to explain this is: When I turn on the switch (L:PreDep,bool) to start the pre departure procedure, after 5 mins plays sound for FO entering cockpit after performing walk around. Then on 8 minutes he starts his first flow Seat belt switch - On, No Smoking switch - on etc. After he has complete the first flow, the switches which he has turned on, are stuck on, if I click on them to turn them to the off position, then the code automatically turns them back on. This is not a realy a problem for the fuel switches etc, but is a problem for the IRS system. The 3 IRS switches are held in the on position and not released by the code untill the PreDep switch is turned off, and so will not align. The IRS System has two switch position off and Nav(On), but must be in the Nav position to align, there is a timer in the IRS code which once all switches are in the on position, after a short time the IRS will align, but as I said before using this code they do not align, as it will not let the code in the IRS go on to the aligning part as it wants to keep the switches held on. The code below is a simplifed version, I have not tested it, but I think it should work. It turns taxi, landing and beacon lights on, once the code has turned on the lights, try turning them off. It will not let you, clicking the switches flicks the switch to off but the code moves it straight to on again. Turn the PreFlight,switch off and the switches will remain in the on position, but can be switched off if needed to be. So for the IRS system the three switches need to kept in the on postion, but not held permantly on by the code. I have tried adding another variable to the Value part, but that either does not work, or makes the first three Variable turn on with the first one. I have tried a lot of different if{. I also added another L:Var to the ie (L:Preflight,bool) ! (>L:PreFlight,bool) (>L:FirstFlow,bool) (P:Local Time,seconds) and then putting (L:FirstFlow,bool) in place of (L:PreFlight,bool) but that did not work. I have tried every thing I can think of and no joy. I am begining to wonder if this is not possible. I could go back to the old idea I had of after 12 mins PreDeparture switch is switched off, and then you must click another switch Before Start, to go to the next set of events, then the IRS system would align, but was hopeing that I could get it all in one switch, do you think it is possible to get it to work in one switch ?(L:PreFlight,bool)(P:Local Time,seconds) s1 (L:PreFlight,bool) if{ l1 (L:taxi timer,seconds) > if{ (A:LIGHT TAXI,bool) ! if{ (>K:TOGGLE_TAXI_LIGHTS) } l1 (L:landing timer,seconds) > if{ (A:LIGHT LANDING,bool ! if{ (>K:LANDING_LIGHTS_TOGGLE } l1 (L:beacon timer,seconds) > if{ (A:LIGHT BEACON,bool) ! if{ (>K:TOGGLE_BEACON_LIGHTS) } } Preflight(L:PreFlight,bool) ! (>L:PreFlight,bool) (P:Local Time,seconds) 2 + (>L:taxi timer,seconds) (P:Local Time,seconds) 4 + (>L:landing timer,seconds) (P:Local Time,seconds) 6 + (>L:beacon timer,seconds)

Share this post


Link to post
Share on other sites

Hi,So if I do understand you well the IRS switches are the problem.My switches has 4 positions: off, align, nav and att.Do your switches have 3: off, align and nav?In that case you could try(not tested):(L:irs switch,enum)(P:Absolute Time,seconds) s1 (L:predep,bool) etc. etc.if{ l1 (L:irs timer align,number) > if{ 1 (>L:irs switch,enum) 0 (>L:irs timer align,number) }//alignl1 (L:irs timer nav,number) > if{ 2 (>L:irs switch,enum) }//nav } etc. etc.(L:predep,bool) ! (>L:predep,bool) etc. etc.l1 xxx + (>L:irs timer align,seconds) l1 xxx + align time + (>L:irs timer nav,seconds) Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Hi JanNo the IRS has two switch positions, on and off. When the three switches are in the on position, after a few seconds the IRS Aligns, but the switches remain in the on position. The panel I am trying to get this to work with is not a panel I have made so the IRS code is not mine, otherwise I would post the code for the IRS system. I have looked at the code for the IRS Switches and it is full of G:Var and I do not understand them. The IRS Alignment is not very realistic, and would be more realistic to Align at 12 mins, so I might go back to my first idea of the pre dep switch doing up to 12 mins, and then a before start switch needing to be turned on after that to start the next flow. If I do decide to go back to the first idea, then I will need to make a timer which counts down from 20 so I no where I am in the program, the only thing putting me off is the G:Var in a clocktimer.I would like to thank you for your time in this problem, I am very greatful for the help you have given me. I wil get this to work one way or another, the timer route is looking my best option at the moment.

Share this post


Link to post
Share on other sites

Hi,The (G:Var) is not that difficult, only 9 per gauge.Try to translate them in (L:var's)!Example:(P:absolute Time,seconds) 10 + (>G:Var1) is the same as:(P:absolute Time,seconds) 10 + (>L:Var1,seconds) //or number or enumOnly when changing vieuws, or reload or new startup the (G:Var) always will be 0!Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Hi JanI have decide to leave the code as it is and go the two switch route, then the IRS Aligns after 12 mins, so I will need to make a timer. Thanks for the tip about G:Var I will have a look at the default 747 clock and see if I can work out how the timer code works.If I do get any problems I no where to post, Thanks once again for your help.

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