Jump to content

Recommended Posts

I need to determine when EGT has "peaked" during the leaning process.I have a digital display that will show the EGT for cylinders 1 through 6, and the "average EGT." Since on most Lycoming engines, cylinder #5 will nearly always be the 'hottest,' I'm tracking the delta of #5 during the "LeanFind" process.I've tried the following logic, but it isn't working... :(case PANEL_SERVICE_PRE_UPDATE:if ( leanfind == 1 && stopfind == 0 ) { peak_egt = cyl5_egt ; } if ( peak_egt > cyl5_egt ) { stopfind = 1 ; } The above should record the current cyl5_egt, store it to peak_egt, and then STOP whenever the highest temp is found, leaving the 'peak value' stored in peak_egt.Then for the digital display, I use this in the callback...FLOAT64 FSAPI callback3( PELEMENT_STRING pelement){float rwert=pelement->source_var[0].var_value.n;if ( step == 0 && stopfind == 0 ) { rwert = (float)cyl1_egt ; } if ( step == 1 && stopfind == 0 ) { rwert = (float)cyl2_egt ; } if ( step == 2 && stopfind == 0 ) { rwert = (float)cyl3_egt ; } if ( step == 3 && stopfind == 0 ) { rwert = (float)cyl4_egt ; } if ( step == 4 && stopfind == 0 ) { rwert = (float)cyl5_egt ; } if ( step == 5 && stopfind == 0 ) { rwert = (float)cyl6_egt ; } if ( step == 6 && stopfind == 0 ) { rwert = (float)eng1_egt ; } if ( stopfind == 1 ) { rwert = (float)peak_egt ; } if ( GENERAL_PANEL_CIRCUIT_ONvar.var_value.n == 1 ) { LIGHT_IMAGE(pelement) ; SHOW_IMAGE(pelement) ; } else { HIDE_IMAGE(pelement) ; } sprintf(pelement->string,"%4.0f",rwert);return 0;}The above should display the values for cyl1_egt through cly6_egt, then the 'average value' eng1_egt.If the variable stopfind is 1, then it should display only peak_egt, which will LOCK once the peak is found.Can anyone explain why this isn't working the way I intend? :)


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 jk

the first thing I see, is that during the leanfind, peak_egt can never be greater than cyl5_egt, because you are making every time peak_egt equal to cyl5_egt.

Share this post


Link to post
Share on other sites

>the first thing I see, is that during the leanfind, peak_egt>can never be greater than cyl5_egt, because you are making>every time peak_egt equal to cyl5_egt.Duh! Why could I not see the obvious... I simply need to move the comparison to one line *before* the assignment... :)Thanks for finding my silliness... That's what I get for working until 3am on a project...


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

I think you want:case PANEL_SERVICE_PRE_UPDATE:if ( leanfind == 1 && stopfind == 0 && peak_egt < cyl5_egt) { peak_egt = cyl5_egt ; }if ( peak_egt > cyl5_egt ) { stopfind = 1 ; }Doug

Share this post


Link to post
Share on other sites

Doug, that doesn't seem to have solved the problem either...Let me restate the goal, and see if anyone can think of a different approach...Whenever you adjust the mixture control, the EGT will rise as you slowly lean mixture, until it reaches a "peak value," and then will begin decreasing until you've leaned too much, at which time the engine will suffer from fuel starvation and stop.This is, of course, because the excess fuel that is fed into the cylinders acts as a 'coolant,' resulting in a lower exhaust gas temperature.What I need to do is "capture" the peak temperature, and then display it on a digital readout. This will provide a base value from which the pilot can either adjust the mixture to run LOP or ROP, as he chooses.Ideally, when the 'peak' is found and locked into the peak_egt variable, the display will briefly flash "PK FND," and then several seconds later will display the contents of peak_egt.Any ideas, anyone? :)


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

Bill,It occurs to me that FS variables are seldom 100% rock solid stable at any value. I'm wondering if your trap (the second if statement) is being triggered by a trivial fluctuation in EGT, while the mixture is still at 'full rich'. Have you tried this same rountine while rounding the temperatures to full degrees, or, alternatively, a variation like this:if ( peak_egt > cyl5_egt + 2 ) { stopfind = 1 ; } Doug

Share this post


Link to post
Share on other sites

>Bill,>>It occurs to me that FS variables are seldom 100% rock solid>stable at any value. I'm wondering if your trap (the second>if statement) is being triggered by a trivial fluctuation in>EGT, while the mixture is still at 'full rich'. Have you>tried this same rountine while rounding the temperatures to>full degrees, or, alternatively, a variation like this:>>if ( peak_egt > cyl5_egt + 2 ) { stopfind = 1 ; } No. When I get back this afternoon, I'll change the variables to int type instead of float, and give it another whirl... Thanks for the suggestions!


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