June 15, 201312 yr Need help on a set of fuel tank selector knobs for a 4 engined DC4. I have 4 tanks referred to as Left AuxilliaryRight AuxilliaryLeft MainRight Main but called in AIRCRAFT.CFG (to agree with MS naming configuration) Center1=0,-10,0,1000,10 Center2=0,10,0,1000,10 LeftAux=0,-20,0,800,10 RightAux=0,20,0,800,10 I am trying to set up the selection process so that the tank that feeds each engine can be manually selected. This means that EACH tank can supply EACH engine. By using CENTER1 and CENTER2 instead of LEFT MAIN and RIGHT MAIN the burning sequence set up by Microsoft, will be ignored, and if a tank is emptied, the next tank in the sequence will NOT be followed and the respective engine will stop. The gauge is part of a full Engine Control Unit and the selectors are a set of 4 levers that move vertically between 5 positions (off and 4 tanks). The attached gauge coding seems to work exactly as required for engines 3 and 4, but the selectors for engines 1 and 2 do not work. When selected the lever just jumps and then returns to some default position about halfway between the OFF and LEFT AUX positions. The coding I am using is the same for each selector (except for the number) <Element> <Image Name="Fuel Tank Lever.bmp" ImageSizes="26,36"> <Axis X="0" Y="10"/> </Image> <Shift> <Value Minimum="0" Maximum="7"> (A:Fuel tank selector 1,enum) </Value> <Nonlinearity> <Item Value="0" X="208" Y="5"/> <!-- Off --> <Item Value="4" X="208" Y="20"/> <!-- Left Aux --> <Item Value="5" X="208" Y="75"/> <!-- Right Aux--> <Item Value="6" X="208" Y="40"/> <!-- Left Main --> <Item Value="7" X="208" Y="60"/> <!-- Right Main --> </Nonlinearity> </Shift> </Element> I have used .....SELECTOR:1 etc as suggested by MS Sim Variables (FUEL TANK SELECTOR:index) but there is no difference. [similar coding for selectors 2-4 follow] <Area Left="208" Top="26" Width="26" Height="14"> <Tooltip ID="">Engine 1 Fuel Selector Off</Tooltip> <Help ID=""/> <Cursor Type="Hand"/> <Click>(>K:FUEL_SELECTOR_OFF)</Click> </Area> <Area Left="208" Top="40" Width="26" Height="17"> <Tooltip ID="">Engine 1 Fuel Selector Left Aux</Tooltip> <Help ID=""/> <Cursor Type="Hand"/> <Click>4 (>K:FUEL_SELECTOR_SET) </Click> </Area> <Area Left="208" Top="57" Width="26" Height="17"> <Tooltip ID="">Engine 1 Fuel Selector Left Main</Tooltip> <Help ID=""/> <Cursor Type="Hand"/> <Click>6 (>K:FUEL_SELECTOR_SET) </Click> </Area> <Area Left="208" Top="74" Width="26" Height="17"> <Tooltip ID="">Engine 1 Fuel Selector Right Main</Tooltip> <Help ID=""/> <Cursor Type="Hand"/> <Click>7 (>K:FUEL_SELECTOR_SET)</Click> </Area> <Area Left="208" Top="91" Width="26" Height="15"> <Tooltip ID="">Engine 1 Fuel Selector Right Aux</Tooltip> <Help ID=""/> <Cursor Type="Hand"/> <Click>5 (>K:FUEL_SELECTOR_SET) </Click> </Area> <Area Left="236" Top="26" Width="26" Height="14"> <Tooltip ID="">Engine 2 Fuel Selector Off</Tooltip> <Help ID=""/> <Cursor Type="Hand"/> <Click>(>K:FUEL_SELECTOR_2_OFF)</Click> </Area> <Area Left="236" Top="40" Width="26" Height="17"> <Tooltip ID="">Engine 2 Fuel Selector Left Aux</Tooltip> <Help ID=""/> <Cursor Type="Hand"/> <Click>4 (>K:FUEL_SELECTOR_2_SET) </Click> </Area> <Area Left="236" Top="57" Width="26" Height="17"> <Tooltip ID="">Engine 2 Fuel Selector Left Main</Tooltip> <Help ID=""/> <Cursor Type="Hand"/> <Click>6 (>K:FUEL_SELECTOR_2_SET) </Click> </Area> <Area Left="236" Top="74" Width="26" Height="17"> <Tooltip ID="">Engine 2 Fuel Selector Right Main</Tooltip> <Help ID=""/> <Cursor Type="Hand"/> <Click>7 (>K:FUEL_SELECTOR_2_SET)</Click> </Area> <Area Left="236" Top="91" Width="26" Height="15"> <Tooltip ID="">Engine 2 Fuel Selector Right Aux</Tooltip> <Help ID=""/> <Cursor Type="Hand"/> <Click>5 (>K:FUEL_SELECTOR_2_SET) </Click> </Area> [similar coding for selectors 3-4 follow] Any help ith this will be much appreciated.
June 15, 201312 yr Hi, I should make a debug test gauge to see what is happening. Something like this string: (and that for all engines) %((A:FUEL TANK SELECTOR 1,ENUM)) %{case} %{:0}Cut Off %{:1}All %{:2}Left %{:3}Right %{:4}Aux Left %{:5}Aux Right %{:6}Center %{:7}2nd Center %{:8}3rd Center %{:9}External %{:10}2nd External %{:11}Right Tip %{:12}Left Tip %{:13}Crossfeed %{:14}Crossfeed LeftToRight %{:15}Crossfeed RightToLeft %{:16}Both %{:17}All External %{else}Other%{end} Jan "Beatus ille qui procul negotiis..."
June 15, 201312 yr Moderator You are missing the "colon" before the index number:This should be...(A:Fuel tank selector:1,enum) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
June 15, 201312 yr Author Thanks guys Just like to repeat that this gauge works fine for engines 3 and 4 but NOT 1 and 2. Maybe something in the aircraft.cfg or somewhere else. I have tried other similar (rotrary) gauges in this aircraft and they do the same thing. phjvh Never set up a debug gauge before. Is there anything else required in the coding? Or is that all? How does it tell you what is happening. n4gix I know the sdk has a colon, but some gauges I have seen do not use one for fuel selectors. I tried both ways - no good. Thanks
June 15, 201312 yr The string shows what is happening with the fuelselectors. Sometimes there is conflicting code elsewhere in the panel, mostly in an <update> or <value> section. If you move the fuelselectors they jump back to the starting position: continuus firing of events. Then you have to find and correct that code. Very useful is the eventlogger of Doug Dawson, (fsx_event_logger.zip), here at Avsim. Jan "Beatus ille qui procul negotiis..."
June 16, 201312 yr Author Downloaded and set up Doug Dawson's event logger gauge. It appears that there is a 2 (>K:FUEL_SELECTOR_2_SET) event being issued from somewhere. 2 represents LEFT tank and there is no "LEFT" tank. My gauge does not have this Key Event and I cannot find any gauge or anywhere else that it could be coming from. 333488 KEY_FUEL_SELECTOR_2_SET 2 333488 KEY_FUEL_SELECTOR_2_SET 2 333489 KEY_FUEL_SELECTOR_2_SET 2 333489 KEY_FUEL_SELECTOR_2_SET 2 333490 KEY_FUEL_SELECTOR_2_SET 2 333490 KEY_FUEL_SELECTOR_2_SET 2 333491 KEY_FUEL_SELECTOR_2_SET 2 333491 KEY_FUEL_SELECTOR_2_SET 2 333492 KEY_FUEL_SELECTOR_2_SET 2 333492 KEY_FUEL_SELECTOR_2_SET 2..............................just keeps going
June 16, 201312 yr Well, That is the answer, keep searching....! Comment-out all gauges till you find the offending one. Another solution(?): Change the names of your tanks in the aircraft.cfg.: Take out the centers and use the externals. Then try again. Succes! Jan "Beatus ille qui procul negotiis..."
June 17, 201312 yr Author Finally found the culprit that was triggering the event. After working through every gauge I found a section of unwanted code in a fuel/air mixture ratio gauge that should have been deleted. Removed it and everything works as required.
June 18, 201312 yr Moderator I'm so glad that you finally found the problem, given that (aside from the missing colon) your script was perfect! BTW, if you have Pete Dawson's FSUIPC (registered only) you can use his built-in logging function along with the popup console window to read all sorts of neat things in real time. One of the worst offenders in any gauge or update logic system is an event that's constantly fired, such as the one which was resetting your tank selection. Every one writing any sort of C code or XML script must be sure to check the variable state before issuing a command! This is absolutely required if the command is a "toggle" type, where unless you know what the current setting is, you may wind up doing the exact opposite of what you actually want. For example: <!--SYNCH ENGINE ALTERNATORS --> (A:GENERAL ENG MASTER ALTERNATOR:1,bool) 0 == (A:GENERAL ENG COMBUSTION:1,bool) and if{ (>K:TOGGLE_ALTERNATOR1) } els{ (>K:TOGGLE_ALTERNATOR1) } The script above checks first to see if the alternator 1 is off, and if the engine is running. If true, then turn alternator 1 ON, otherwise turn alternator 1 OFF. This is why I commented this routine as "SYNCH ENGINE ALTERNATORS" Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment