• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSX XML gauge stops working

Messages
71
Country
switzerland
Hi there,

I'm loosing all my hairs to find a solution for a very strange issue. I developped a interactive checklist, with vocal items, working with Doug Dawson's sound gauge.

Here is a part of the code.

Code:
  <!-- BS-5 Generators -->     
     (L:CL-item) 10 == (L:CaptOFF) ! &amp; (L:GPU Disconnected) ! &amp;   
     if{ 11 (>L:CL-item) 1 (>L:BS-5) }   
     (L:CL-item) 11 == (L:BS-5) ! &amp; (A:GENERAL ENG MASTER ALTERNATOR:1,number) &amp; (A:GENERAL ENG MASTER ALTERNATOR:2,number) &amp;   
     if{ 1 (L:Capt) - (>L:CaptOFF) (L:Capt) (>L:Both ON) 12 (>L:CL-item) }   
   <!-- BS-6 Beacon -->     
     (L:CL-item) 12 == (L:CaptOFF) ! &amp; (L:Both ON) ! &amp;   
     if{ 13 (>L:CL-item) 1 (>L:BS-6) }   
     (L:CL-item) 13 == (L:BS-6) ! &amp; (A:LIGHT BEACON,number) &amp;   
     if{ 1 (L:Capt) - (>L:CaptOFF) (L:Capt) (>L:ON2) 14 (>L:CL-item) }

On my FSX, Windows 7 computer, it works perfectly. But, by a friend of mine, same configuration, the items suddenly stop.

I have a gauge, where it is possible to click "next item", but in his case, it does not work.

It seams that the xml gauge suddenly stop working.

I have this :

Code:
    (L:CL-item) 41 == (A:Eng oil temperature:1, celsius) 50.5 &gt; &amp; (A:Eng oil temperature:1, celsius) 50.5 &gt; &amp;   
     if{ 42 (>L:CL-item) (L:Capt) (>L:AS-4a) }   
     (L:CL-item) 42 == (L:AS-4a) ! &amp;   
     if{ 43 (>L:CL-item) 1 (>L:AS-4b) }   
     (L:CL-item) 43 == (L:AS-4b) ! &amp; (L:Electrical inverter switch) &amp;   
     if{ 1 (L:Capt) - (>L:CaptOFF) (L:Capt) (>L:ON3) 44 (>L:CL-item) }

Where the checklist automatically continues when oil temp reaches 50.5°C, but here again, in his case, it is like the gauge does not read the oil temp value.

Do you have any idea ?

I'm sad because I cannot help my friend, and I'm afraid that other simers could have the same issue...

Thanks

Daniel
 
It would be hard to diagnose on why the gauge / sounds would would stop working without the code including the ini for Doug's gauge.

One thing I did notice in your second script example -
Should -
Code:
(L:CL-item) 41 == (A:Eng oil temperature:1, celsius) 50.5 &gt; &amp; (A:Eng oil temperature:1, celsius) 50.5 &gt; &amp;
Actually be?
Code:
(L:CL-item) 41 == (A:Eng oil temperature:1, celsius) 50.5 &gt; &amp; (A:Eng oil temperature:2, celsius) 50.5 &gt; &amp;
(Although it shouldn't keep it from working)

What's before item 41?? That's where I would start looking.

Since the logic is highly based on L:Vars maybe monitor those to isolate that it's the gauge script rather than the sound.ini or sound gauge.
Doug Dawson's LVar monitor gauge - monitor gauge.
If you have a registered FSUIPC you could use these lua scripts which may be easier to follow - fsuipc lua.
-or- make your own XML string display gauge to monitor all ( L: & A: ) variables in your project.
 
It doesn't really matter what you use for L vars in the end. The only units that really count are number, enum, and bool, and even then, from the internal sim's perspective, they may as well have no difference, as all L vars are 64bit double variables capable of floating point numbers as well as integer values.
 
Thanks Roman. 100 times re-read, never saw this small error. Now corrected. It probably changes nothing, but now it's correct. Of course, I want to read oil for engine 1 AND 2....

OK. All informations are recorded. Will try them. Thanks for your help guys.
 
If you leave out the ,number or ,bool the XML parser doesn't recognise it as an Lvar so the value of (L:whatever) is always returns 0.
But the XML gauge is executed (doesnt give an error).
Which makes me wonder how you can say that everything works Ok on your own PC ....

Rob
 
Where the checklist automatically continues when oil temp reaches 50.5°C, but here again, in his case, it is like the gauge does not read the oil temp value.

In that code there is no assignments to (L:Capt) variable, so it is not possible to know which value it holds.
Supposing there is in fact no assignment at all, (L:Capt) would be 0, then 1 (L:Capt) - (>L:CaptOFF) assigns 1 to (L:CaptOff)
When it happens, (L:CaptOFF) ! returns 0 because (L:CaptOff) holds 1.

Perhaps those are the sources of your problem?

Tom
 
I don't use "&amp;", I use AND, but I think that in this old syntax, "&amp;" must be doubled : "&amp;&amp;" ; isn't it ?
 
Last edited:
The remark about the "fuel weight per gallon" variable has the sims mixed up since I'm (very successfully) using it in FSX.
Not mixed up. It is a handy XML way to tell if the sim is FS9 or FSX.

Bob
 
I don't use "&amp;", I use AND, but I think that in this old syntax, "&amp;" must be doubled : "&amp;&amp;" ; isn't it ?

A single "&amp;" is used for bitwise addition. See the list here:
https://msdn.microsoft.com/en-us/library/cc526953.aspx#mozTocId231151


Not mixed up. It is a handy XML way to tell if the sim is FS9 or FSX.

Code:
(A:FUEL TANK LEFT MAIN QUANTITY, gallons) (A:Fuel Weight Per Gallon, pounds) *

Used numerous times throughout a variety of fuel related gauges in FSX and works just fine.
 
Thanks to all, you help me well. For the moment, the issue is not cure, because my friend who has it, did not spend time yet to test...

I use &amp; and it works without problem because I only do simple "and" test, mostly with boolean value.

But I have another "stupid" question... open a new topic!
 
Code:
(A:FUEL TANK LEFT MAIN QUANTITY, gallons) (A:Fuel Weight Per Gallon, pounds) *

Used numerous times throughout a variety of fuel related gauges in FSX and works just fine.

I don't mean the A:Var doesn't work. It's the choice of units for A:Fuel Weight Per Gallon that's the key. It's described in this wiki too.

The point is (A:Fuel Weight Per Gallon, pounds per gallon) returns one value in FS9 and a different value in FSX, and because of that, it can be used to differentiate between the sims. I use it in my panel refresh button (gauge), as described in the Refreshing Panels in FS9 & FSX wiki.

Bob
 
Last edited:
Back
Top