Sign in to follow this  
Guest Eugen

Timer

Recommended Posts

Hi,I would like to do a timer that increase the var after 10 seconds but I cannot get it to work.Any suggestionsBrgdsEugen(A:Auto brake switch cb, enum) 0 == if{ (P:Local Time, seconds) 6 % int 10 == if{ (>K:INCREASE_AUTOBRAKE_CONTROL) } }

Share this post


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

Hi Eugen,Just busy with this one, you for sure can get something useful out of it.It is a rotating knob after one click, just for investigating possibility's of the timers.After 5(!) seconds it moves and completes the whole circle with 5 seconds intervals.(G:Var1) (G:Var1) 1 == if{ (P:Local Time, seconds) (G:Var2) > if{ 2 (>G:Var1) (P:Local Time, seconds) 5 + (>G:Var2) } } (G:Var1) 2 == if{ (P:Local Time, seconds) (G:Var2) > if{ 3 (>G:Var1) (P:Local Time, seconds) 5 + (>G:Var2) } } (G:Var1) 3 == if{ (P:Local Time, seconds) (G:Var2) > if{ 4 (>G:Var1) (P:Local Time, seconds) 5 + (>G:Var2) } } (G:Var1) 4 == if{ (P:Local Time, seconds) (G:Var2) > if{ 5 (>G:Var1) (P:Local Time, seconds) 5 + (>G:Var2) } } (G:Var1) 5 == if{ (P:Local Time, seconds) (G:Var2) > if{ 6 (>G:Var1) (P:Local Time, seconds) 5 + (>G:Var2) } } (G:Var1) 6 == if{ (P:Local Time, seconds) (G:Var2) > if{ 7 (>G:Var1) (P:Local Time, seconds) 5 + (>G:Var2) } } (G:Var1) 7 == if{ (P:Local Time, seconds) (G:Var2) > if{ 0 (>G:Var1) } } time test(G:Var1) 0 == if{ 1 (>G:Var1) (P:Local Time, seconds) 5 + (>G:Var2) } els{ 0 (>G:Var1) (>K:TOGGLE_AFTERBURNER1) } Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites

Hi, This may work ---(A:Auto brake switch cb, enum) 0 == (G:Var1) 0 == & if{ (P:Absolute Time, seconds) 10 + (>G:Var1) } (P:Absolute Time, seconds) (G:Var1) > if{ (>K:INCREASE_AUTOBRAKE_CONTROL) 0 (>G:Var1) }The use of absolute time will rid you of any rollover IE 58,59,0,1,2 . It continuously counts upwards. Regards,Roman

Share this post


Link to post
Share on other sites

Hi,Thanks for your repliesI tried the following but I couldn't get it to work.(A:Auto brake switch cb, enum) 0 == (G:Var1) 0 == && if{ (P:Absolute Time, seconds) 10 + (>G:Var1) } (P:Absolute Time, seconds) (G:Var1) == if{ 1 (>K:INCREASE_AUTOBRAKE_CONTROL) 0 (>G:Var1) } RegardsEugen

Share this post


Link to post
Share on other sites

Eugen,What click-event do you use?Watch the spaces and accolades.Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites

Eugen,Guaranteed to work.. DAH!!!! The time is always greater than 0 so when this thing resets it went straight to max. Whew !!!! Pulled the rest of what hair I have to figure this out LOL!!! Just added a check to see if brake is still in RTO when it resets and sets it to OFF . A big LOL !!!! sometime the simplist of things can drive you nuts !!(A:AUTO BRAKE SWITCH CB, enum) 0 == (G:Var1) 0 == & if{ (P:Absolute Time, seconds) 10 + (>G:Var1) } (P:Absolute Time, seconds) (G:Var1) > (A:AUTO BRAKE SWITCH CB, enum) 0 == & if{ 0 (>G:Var1) (>K:INCREASE_AUTOBRAKE_CONTROL) }Regards,Roman

Share this post


Link to post
Share on other sites

Eugen and Roman,Myself still wrestling with the automatic function of the autobrake-system (767-300), what are you trying to achieve with this code functions?Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites

Thanks, I'll try this, but what I don't understand is why the time condition == doesn't work(P:Absolute Time, seconds) 10 +(>G:Var1) } (P:Absolute Time, seconds) (G:Var1) == if{ 1(>K:INCREASE_AUTOBRAKE_CONTROL) 0 (>G:Var1) }Jan,I am gonna do an automatic disarment 10 sec after takeoff.BrgdEugen

Share this post


Link to post
Share on other sites

"but what I don't understand is why thetime condition == doesn't work"00.010.020.030.040.050.060.07 etc.... up to9.999999 secondsthe chances of hitting at 10 right on the nuts when the gauge updates is about the same as getting hit by lightning :-)Regards,RomanGREEN BAY PACKERS][/i :-ukliam :-beerchug

Share this post


Link to post
Share on other sites

Eugen,Aha, i understand now, i use the gear position to achieve the same:(A:Auto brake switch cb, enum) 0 == (A:GEAR CENTER POSITION,percent) 10 < && if{ (>K:INCREASE_AUTOBRAKE_CONTROL) }Works also and always.Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites

Roman,Ok I thought it was whole seconds, then could integer be a solution?//Eugen

Share this post


Link to post
Share on other sites

Jan,that is also an option but according the information that I got so will the autobreak unarm after 10 s when airborn for the aircraft I create my panel.//Eugen

Share this post


Link to post
Share on other sites

Hi,Got it to work I think(A:Auto brake switch cb, enum) 0 == (G:Var1) 0 == (A:SIM ON GROUND,bool) 0 == & & if{ (P:Absolute Time, seconds) int 10 + (>G:Var1) } (P:Absolute Time, seconds) int (G:Var1) == if{ 1 (>K:INCREASE_AUTOBRAKE_CONTROL) 0 (>G:Var1) } //Eugen

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