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

Circuit Systems 'On' ; How To?

Messages
10,158
Country
us-arizona
Hey guys,

Sorry.. Its me, the Kindergardner again.

If I am making an Annunciator, and I wish to have a bitmap show up per a 'Value' (if I am correct, I dont think a String is used here), then I have say, a 'Circuit Pitot Heat On' for instance. That is my Variable. From what I read in the FS2004 SDK Doc, its a Bool. (No.. Not a Goa-uld from Stargate.. nevermind).. But would I have 'only' that set of parameters in parenthesis? How do I tell the system to bring up the bitmap?

For some reason, this is not working. I have changed all the measures and things out, with no success. I had better luck wtih 'Strings' in the Text font callups then I am having on the Annunciator.

arrghh.. I will have white hair in 2 weeks at this rate. :eek:

Bill
 
Here is some of my work on this from yesterday.

What I was doing was constantly re-writing my 'Value' strings, trying to get them to work. What usually happens, is they stay on and will not turn off, or they will not function at all.

Here is my questions.

* Should one, on making annunciators (lights that appear per a parameter callup) use a Value, Visible, or String? I had thought it is Value, but its not working.

* When making a 'electrically based' parameter callup, such as 'Pitot On' or Generator Failure, how would one write its string? Would it be (Circuit Pitot On, voltage) 0 ?

* When one makes a component of the plane (such as the passenger door) to register to open, how would would have this to work on a bitmap. My String worked fine, but when I changed it to Value, it stopped working. (I used a String parameter with this one in my Font callup, but on the annunciator, it is not functioning).

Here is an example on the door that doesnt work;
Code:
<Element Name="CABIN DOOR OPEN">
      <Position X="1067" Y="40"/>
       <Image Name="CabinDoor.bmp" Bright="Yes" ImageSizes="124,86">
      </Image>
   <Visible>%((A:EXIT OPEN,percent)   100%</Visible>
</Element>

Here is the String from the PFD that works with Font;

Code:
<Element Name="EXIT OPEN MESSAGE">
  <Position X="65" Y="20"/>
   <Text X="135" Y="20" Bright="Yes" Length="120" Font="Arial Bold" FontSize="18" Color="Red" Adjust="Left" VerticalAdjust="Bottom" Multiline="No">
   <String>%((A:EXIT OPEN,percent)  near 100 ==)%{if}EXIT OPEN%{end}%</String>
     </Text>
</Element>

On the above, on the first one, I have changed it around repeatedly, so you are seeing the final one before calling it a day.

Here is a couple of electrical variants I have also been trying to get to work, but with no success;

Code:
<Element Name="DEICE CYCLE">
   <Position X="309" Y="42"/>
      <Image Name="DeiceCycle.bmp" Bright="Yes" ImageSizes="129,82">
      </Image>
     <Value>(L:Test Mode Display, bool) (A:STRUCTURAL DEICE SWITCH,voltage)  0 </Value>
</Element>

<Element Name="GEN FAIL">
   <Position X="453" Y="139"/>
    <Image Name="GenFail.bmp" Bright="Yes" ImageSizes="117,85">
    </Image>
    <Value> if{ (A:Electrical total load amps,amps) 22 &lt;  (L:Test Annun1, bool) ||  }  els{ 0 } </Value>
</Element>

The two above do not function.

Anyone have some advice for this Kindergardner? What am I doing wrong that these just will not work? I had hoped that a simple Value would cause them to function properly. I have gone through many variants of parameters and volumes (amounts such as Percentage and Voltage) with no luck, so surely its the way I am writing these.

Thanks for any input.


Bill
LHC
 
Bill,

Are you trying to do this - infix code

if( (A:Electrical total load amps, amps) < 22 or (L:Test Annun1, bool) )
{ 0 }
else
{ 1 }

If the amps are less than 22 or the annun is already true then turn off the annun?

then it should be


(A:Electrical total load amps , amps) 22 (L:Test Annun1 , bool) or < if{ 0 } els{ 1 }

then you change < to &lt; and or to ||

(A:Electrical total load amps , amps) 22 (L:Test Annun1 , bool) || &lt; if{ 0 } els{ 1 }

Are you using the infix2postfix program?

Then using the boolean logic to NOT the whole thing - change or to and and < to >

if( (A:Electrical total load amps, amps) > 22 and !(L:Test Annun1, bool) )
{ 1 }
else
{ 0 }

is

(A:Electrical total load amps , amps) 22 (L:Test Annun1 , bool) ! and > if{ 1 } els{ 0 }

if amps > 22 and anunn is off the anunn on else stay off
 
Last edited:
Hey Ron,


I am not using that program, no. I hadnt heard of it. I'll google it and check it out. I am manually editing mine through Notepad.

I must say that some of what you wrote did go over my head, but I knew some of the other parts. Glad I am this far along to start to understand alot of this. Learning &lt and &gt yesterday (fully understanding how it works in a string as well) really helped alot.

Back to the salt mine....


Bill
 
Bill, here is the first bit of script with the syntax adjusted to work:

Code:
<Element Name="CABIN DOOR OPEN">
      <Position X="1067" Y="40"/>
      <Visible>(A:EXIT OPEN,percent) 0 &gt;</Visible>
       <Image Name="CabinDoor.bmp" Bright="Yes" ImageSizes="124,86">
      </Image>
</Element>
 
Thanks Fr. Bill.

Saw it at the other thread first and used your existing code and came up with exactly that.

Good feeling to start to understand this.. and especially, to have a 'blinky light' that can go 'blinky' when its supposed too.



Bill
 
Well.. I had to share this. I just got my oil light to turn on when the engine shuts down. Converting Variables to 'Visible' and adding a SemiColon has my Oil Light functioning properly.

Thats a wopping 2 lights in almost 2 days! I am thankful, lol...

<--- jumps up on the desk and dances a jig


Here is the code for the oil light appearence;
Code:
<Visible>(A:Eng1 oil pressure,PSI) 50 &lt; </Visible>

Bill
 
A small tip: When you're using lights, make sure you use the brightness directive, otherwise they'll be as dark as the rest of your cockpit at night.

Si
 
Are you using the infix2postfix program?

Then using the boolean logic to NOT the whole thing - change or to and and < to >

if( (A:Electrical total load amps, amps) > 22 and !(L:Test Annun1, bool) )
{ 1 }
else
{ 0 }

is

(A:Electrical total load amps , amps) 22 (L:Test Annun1 , bool) ! and > if{ 1 } els{ 0 }

if amps > 22 and anunn is off the anunn on else stay off

Beware infix2postfix sometimes doesn't work properly, and this is a perfect example of bad conversion.

Right postfix sintax should be

(A:Electrical total load amps , amps) 22 > (L:Test Annun1 , bool) ! and if{ 1 } els{ 0 }

The most recommendable thing is try to understand how RPN and FS XML scripting works :)

Tom
 
Thanks Tom and Ron for the heads up on that program. I'll hunt it down. This is really intriquing though and I kind of admit that I like hand writing the code and learning each symbols meaning and function. Reminds me of doing AI traffic program strings. After a couple of them, its faster to just hand write them rather then have a program do them for you.


Thanks Simon.

Will do. I think I did leave that off of some.



Bill
 
Tom,

Beware infix2postfix sometimes doesn't work properly, and this is a perfect example of bad conversion.

Your right, just took the conversion at face value. You do get the correct script if you add brackets.

Code:
if([COLOR="Red"]([/COLOR](A:Electrical total load amps, amps) > 22[COLOR="red"])[/COLOR] && !(L:Test Annun1, bool))
{1} 
else 
{0}



Sorry Bill If I made waste any more time.
 
Last edited:
Back
Top