October 19, 200223 yr I'm reworking the MWS and have arrived at the CG warning light - when the Center of Gravity is out of the limits this gauge will illuminate. The CG gauge included in the Concorde gauge has an example of what I am after. When out of limits, a red warning light will illuminate. I have the following code - but it was really just a stab in the dark. Can anyone offer any suggestions? (A:Circuit general panel on, bool) 1 == (A:CG FWD LIMIT, percent) %d <(A:CG PERCENT, percent) %d >(A:CG AFT LIMIT, percent) %d & & &Again, any help is appreciated. TIAAndrewhttp://ftp.avsim.com/dcforum/User_files/3db1858910fad6ad.jpgEdit: Thought I'd also show a little pic of what the overhead is looking like now (as many of the readers/posters here have all contributed in some way ;-)) Slowly making progress. Includes just over 80 gauges, Anti Ice, Hydraulic flight control systems, lights, Engine rating switches, throttle master, ignition switches, relay jack system, and the MWS (Master warning system) - coupled with the main panel which now has around 120 gauges it's working quite nicely! :-hahhttp://ftp.avsim.com/dcforum/User_files/3db18cb032d83952.jpg
October 19, 200223 yr I would place only (A:Circuit general panel on, bool) in the <Visible> tag and put the actual lighting in a <Select>, but I won't stop you the other way.<Value>(A:CG PERCENT, percent) d (A:CG FWD LIMIT, percent) < r (A:CG AFT LIMIT, percent) > && &&</Value>(for <Select>)<Visible> (A:Circuit general panel on, bool)(A:CG PERCENT, percent) d (A:CG FWD LIMIT, percent) < r (A:CG AFT LIMIT, percent) > && && && </Visible>(alternative without <Select>)Arne Bartels
October 20, 200223 yr Sorry Arne - I'm having a few problems with this. I've played around with a few things trying to get it to work - but still no joy. Any ideas? (A:CG PERCENT, percent) d (A:CG FWD LIMIT, percent) < r (A:CG AFT LIMIT, percent) > & & &Thanks again,Andrew
October 20, 200223 yr Thanks Arne, but I've tried several combinations of amp ;'s and still nothing. I have had a look through some similar gauges - if the A;vars are percentages, should there not be a few % lables in there somewhere? Coupled to the d and r? Also could you explain what the 'd' and 'r' codes are for? Many thanks. Andy
October 20, 200223 yr The '%' don't make any sense here, they are "modulo" divisors (remainder of division). The d is duplicating of the highest stack value (since the COG value has to be compared with two limits, it is duplicated). r replaces the two highest stack values. Both are declared in the Panel SDK and also in xmlgau01.zip, which you have surely read ;-).Arne Bartels
October 20, 200223 yr "Both are declared in the Panel SDK and also in xmlgau01.zip, which you have surely read"Oh of course, cover to cover!:-roll:-lolOk I'm trying to make a simpler one to get it working. Just want an indication light to illuminate when the CG is above the aft limit. Have this: -(A:CG PERCENT, percent) d > (A:CG AFT LIMIT, percent) I know I'm missing bits, but I haven't programed a gauge like this before where the limits are constantly changing. Have been working on it for 2 hours now - and nothing! :-zhelp ! How can one little light cause soo much frustration! Cheers,Andy
October 20, 200223 yr The changing limits aren't the problem, you might have to think about the sequence of operations in your gauge, please check again the RPN described in xmlgau01.zip.Your example needs first the two values to compare and then the compare operator (the duplicating isn't needed here):<Value>(A:CG PERCENT, percent) (A:CG AFT LIMIT, percent) > </Value>It might be < instead of > I always confuse them, so it's usually try and error here.Anyway, I attached a tested example the last problmes where the if it is < or > and that the logical AND operation is always a double ampersand not a single one. (&& instead of & , no spaces allowed!). Arne Bartels
October 20, 200223 yr Ah it works now :-)Thanks for all your time and help on this Arne, appreciated!I haven't read the RPN doc before - will give it a read.Regards,Andrew
October 20, 200223 yr I wonder if someone could help me with just one last thing. I'm trying to get a sound to play when the warning light illuminates. I have an xmlsound gauge which Bill kindly provided - but I have no idea how to implement this K:event into the following gauge without adding a click tag. Any ideas?(A:CG PERCENT, percent) (A:CG AFT LIMIT, percent) > (A:CG PERCENT, percent) (A:CG FWD LIMIT, percent) < And I want to insert:-(>K:MAGNETO4_LEFT)Thanks again,Andrew
Create an account or sign in to comment