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

Using (P:Absolute time, seconds) in conjuction with text

Code:
<Area Left="150.000" Top="677.000" Width="65" Height="61">
    <Tooltip>Main Menu</Tooltip>
    <Click>
      (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) 27 + &gt; if{ 0 (>L:MFDStartSequence, number) }
      (L:MFDMainMenu,bool) ! (>L:MFDMainMenu,bool)
      0 (>L:TrafficRadarPage,bool)
      0 (>L:AirportInfoMenu,bool)

      blah blah to...... </area>

AS I ALREADY posted above....

Code:
    <Click>
      (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) 27 + &gt; if{ 0 (>L:MFDStartSequence, number) }

with one click you deactivate the mouse area again!!!

Because (L:MFDStartSequence, number) must be 1 to keep the mouse area active!!
But as above posted you set (L:MFDStartSequence, number) with on click to 0!!


Code:
    <Visible> 
      (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) 27 + &gt;
      (L:MFDStartSequence, number) 1 == &amp;&amp;
    </Visible>

To keep the mouse area active (L:MFDStartSequence, number) must stay 1!!

Sorry for my ununderstandable english!
 
Thanks Tom, What I am attempting to do is have some buttons on the bezel inactive during a start up sequance.

Currently when the power button is turned on the gauge displays:

1st: Blank screen
2nd: CB Multi Function display warming up.... Please stand by
3rd: Blank Screen
4th: www,coosbayhops.com /n Come check us out
5th: Blank screen
6th: Press Menu Button to Start

When the menu button is pressed is turns "off" the start up sequance and brings up the menu with various options.

I think this code should help you a bit (not tested):


Code:
<!--**************** Multi-Function Display Start-up ****************-->  

 <Update>
  	(L:MFDInit,bool) ! 
  	if{ (P:Absolute time, seconds) (>L:MFDDisplayStart, seconds) 1 (>L:MFDInit,bool) 1 (>L:MFDStartSequence,number) }
  	(L:MFDStartSequence,number) 1 == 
  	if{
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 3 &lt;= if{ 0 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 3 > if{ 1 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 13 > if{ 0 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 15 > if{ 2 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 25 > if{ 0 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 27 > if{ 3 (>L:MFDInitStatus,number) }
  	  }  		 
 </Update>	
<Element Name="Startup">
  <Position X="0.000" Y="0.000"/>
  <Visible>(A:CIRCUIT AVIONICS ON, bool)</Visible>
  <Element Name="Bezel On">
    <Position X="0.000" Y="0.000"/>
    <Visible>(L:MFDOffOn,bool)</Visible>
    <Image Name="Radar_Back.bmp" Bright="Yes">
    </Image>
    <Element>
      <Position X="0.000" Y="0.000"/>
      <Visible>(L:MFDStartSequence,number) 1 == </Visible>
      <Element>
        <Position X="165.00" Y="300.00"/>
	<FormattedText X="450" Y="400" Font="Arial Black" FontSize="24" Adjust="Center" Color="White" Bright="Yes">
		<String>%((L:MFDInitStatus,number))
			%{case}
			%{:1}Coos Bay Multi-Function Display Version 1.0 \n Warming Up ... Please Stand-by
			%{:2}www.coosbayhops.com \n Come Check Us Out
			%{:3}Press the "MENU" Button to Start
			%{end}
		</String>
	</FormattedText>
      </Element>
</Element>
ETC ETC 
<-- Menu Button -->	
  <Area Left="150.000" Top="677.000" Width="65" Height="61">
    <Visible> 
      (L:MFDInitStatus,number) 3 == 
    </Visible>
    <Cursor Type="Hand"/>
    <Tooltip>Main Menu</Tooltip>
    <Click>
      0 (>L:MFDStartSequence, number)
      (L:MFDMainMenu,bool) ! (>L:MFDMainMenu,bool)
      0 (>L:TrafficRadarPage,bool)
      0 (>L:AirportInfoMenu,bool)
      0 (>L:NearestAirportPage,bool)
      0 (>L:MapPage,bool)
      0 (>L:LayerTags,bool)
      0 (>L:TAWSPage,bool)
      0 (>L:TAWSMode, bool)
      (L:TAWSMode, bool)
      if{ (L:map_ZoomFactor,number) (>L:ZFactorOrig, number)
      (L:UpDateAlwaysOrig, bool) (>L:UpDateAlways, bool) }
      0 (>L:TAWSCounter, bool)
      1 (>TAWSRefresh, bool)
      0 (>L:TCASDisplay, bool)
    </Click>  
  </Area>

It is not optimized but rather explicit so you can have a plenty idea on what is done there. Notice that only one element is used for the three sentences, and an example on how to employ <Update> command is given as well.
Hope this helps!

Regards,
Tom
 
Last edited:
As always, Tom, you offer the most advanced solution!

another idea:
the update section should check (A:CIRCUIT AVIONICS ON, bool)

Edi
 
I also would check (A:ELECTRICAL AVIONICS BUS VOLTAGE,Volt).

for ex.
(A:ELECTRICAL AVIONICS BUS VOLTAGE,Volt) 22 &gt;

edi
 
Thank you very much to you both. I never would of imagined to format that code segment like that. I have placed it in the gauge and it is not running the start up sequance, so been chasing and trying to find the error. I am assuming that the code segment is right, although tried different things for awhile.

Code:
<Mouse> 
  <Area Left="93" Top="676" Width="40" Height="40">
    <Visible>(A:Avionics Master Switch,bool)</Visible>
    <Cursor Type="Hand"/> 
    <Tooltip>Power Switch</Tooltip>
    <Click>
      (L:MFDOffOn,bool) ! (&gt;L:MFDOffON,bool) 
     [COLOR="Red"] (P:Absolute time, seconds) (>L:MFDDisplayStart, seconds) 1 (>L:MFDStartSequence,number)[/COLOR] 
  </Click>
  </Area>

Anyways, thanks again and will continue to look for the problem.

Cheers
Greg
 
I have been playing with this code for the last couple days to no avail, As I truly don't understands all the code as it reads I can't see any errors jumping out at me in Tom's code. Below is some of the mouse clicks I have tried with the BlackBox response. Any ideas greatly appreaciated.

Cheers
Greg

Code:
<Area Left="93" Top="676" Width="40" Height="40">
    <Visible>(A:Avionics Master Switch,bool)</Visible>
    <Cursor Type="Hand"/> 
    <Tooltip>Power Switch</Tooltip>
    <Click>
      (L:MFDOffOn,bool) ! (&gt;L:MFDOffON,bool) 
     [COLOR="Red"] 1 (>L:MFDInit,bool)  1 (>L:MFDStartSequence,number) [/COLOR]
  </Click>
  </Area>

Black Box with Power "ON"
    1 (L:MFDInit, bool)
    . (P:Absolute time, seconds)
 0.00 (L:MFDDisplayStart, seconds)
 1.00 (L:MFDStartSequance, number)
 0.00 (L:InitStatus,number)
    1 (L:MFDOffOn, bool)
    0 (L:MainMenu, bool)

Code:
<Click>
(L:MFDOffOn,bool) ! (&gt;L:MFDOffON,bool) 
[COLOR="red"](P:Absolute time, seconds) (>L:MFDDisplayStart, seconds) 1 (>L:MFDStartSequence,number)[/COLOR]
</Click>
Black Box with Power "ON"
    0 (L:MFDInit, bool)
    . (P:Absolute time, seconds)
  ..( (L:MFDDisplayStart, seconds)
 1.00 (L:MFDStartSequance, number)
 0.00 (L:InitStatus,number)
    1 (L:MFDOffOn, bool)
    0 (L:MainMenu, bool)

Code:
<Click>
(L:MFDOffOn,bool) ! (&gt;L:MFDOffON,bool) 
[CODE][COLOR="red"](P:Absolute time, seconds) (>L:MFDDisplayStart, seconds) 
1 (>L:MFDInit,bool) 1 (>L:MFDStartSequence,number) [/COLOR]
</Click>

Black Box with Power "ON"
    1 (L:MFDInit, bool)
    . (P:Absolute time, seconds)
  ..( (L:MFDDisplayStart, seconds)
 1.00 (L:MFDStartSequance, number)
 0.00 (L:InitStatus,number)
    1 (L:MFDOffOn, bool)
    0 (L:MainMenu, bool)

Code:
<Click>
  (L:MFDOffOn,bool) ! (&gt;L:MFDOffON,bool) 
[COLOR="red"]  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) 1 (>L:MFDInit,bool) 1 (>L:MFDStartSequence,number) [/COLOR]
</Click>

Black Box with Power "ON"
    1 (L:MFDInit, bool)
    . (P:Absolute time, seconds)
 0.00 (L:MFDDisplayStart, seconds)
 1.00 (L:MFDStartSequance, number)
 0.00 (L:InitStatus,number)
    1 (L:MFDOffOn, bool)
    0 (L:MainMenu, bool)

Code:
<Click>
  (L:MFDOffOn,bool) ! (&gt;L:MFDOffON,bool) 
[COLOR="red"]  1 (>L:MFDStartSequence,number)[/COLOR]
</Click>

Black Box with Power "ON"
    1 (L:MFDInit, bool)
    . (P:Absolute time, seconds)
 0.00 (L:MFDDisplayStart, seconds)
 1.00 (L:MFDStartSequance, number)
 0.00 (L:InitStatus,number)
    1 (L:MFDOffOn, bool)
    0 (L:MainMenu, bool)
 
Still no luck, I can't find the problem anywhere. This is the current code:

Update (I added the = the last couple changes.)
Code:
<!--**************** MFD Start Sequance Update ****************-->
  (L:MFDInit,bool) != 
  if{ (P:Absolute time, seconds) (>L:MFDDisplayStart, seconds) 1 (>L:MFDInit,bool) 1 (>L:MFDStartSequence,number) }
  (L:MFDStartSequence,number) 1 == 
  if{
  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 3 &lt;= if{ 0 (>L:MFDInitStatus,number) }
  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 3 > if{ 1 (>L:MFDInitStatus,number) }
  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 13 > if{ 0 (>L:MFDInitStatus,number) }
  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 15 > if{ 2 (>L:MFDInitStatus,number) }
  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 25 > if{ 0 (>L:MFDInitStatus,number) }
  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 27 > if{ 3 (>L:MFDInitStatus,number) } }

The Element: (I haven't made any changes nor can I see an error, other than a couple </Elements> missing in the beginning)
Code:
<!--**************** Multi-Function Display Start-up ****************-->  
<Element Name="Startup">
  <Position X="0.000" Y="0.000"/>
  <Visible>(A:CIRCUIT AVIONICS ON, bool)</Visible>
  <Element Name="Bezel On">
    <Position X="0.000" Y="0.000"/>
    <Visible>(L:MFDOffOn,bool)</Visible>
    <Image Name="Radar_Back.bmp" Bright="Yes">
    </Image>
    <Element>
      <Visible>(L:MFDStartSequence,number) 1 == </Visible>
      <Position X="165.00" Y="300.00"/>
      <FormattedText X="450" Y="400" Font="Arial Black" FontSize="24" Adjust="Center" Color="White" Bright="Yes">
		<String>%((L:MFDInitStatus,number))
			%{case}
			%{:1}Coos Bay Multi-Function Display Version 1.3 \n Warming Up ... Please Stand-By
			%{:2}www.coosbayhops.com \n Come Check Us Out
			%{:3}Press the "MENU" Button to Start
			%{end}
		</String>
	</FormattedText>
      </Element>
</Element>
</Element>

Mouse Clicks: (Tried numerous variation and no luck)
The click turns the unti on and should initiate the start sequance:
Code:
<Mouse> 
  <Area Left="93" Top="676" Width="40" Height="40">
    <Visible>(A:Avionics Master Switch,bool)</Visible>
    <Cursor Type="Hand"/> 
    <Tooltip>Power Switch</Tooltip>
    <Click>
      (L:MFDOffOn,bool) ! (&gt;L:MFDOffON,bool) 
      (P:Absolute time, seconds) (>L:MFDDisplayStart, seconds) 1 (>L:MFDStartSequence,number)
  </Click>
  </Area>

This click should activate after 27 seconds and remain so to toggle the main menu button.

Code:
  <Area Left="150.000" Top="677.000" Width="65" Height="61">
    <Visible> 
      (L:MFDInitStatus,number) 3 ==
    </Visible>
    <Cursor Type="Hand"/>
    <Tooltip>Main Menu</Tooltip>
    <Click>
      0 (>L:MFDStartSequence, number)
      (L:MFDMainMenu,bool) ! (>L:MFDMainMenu,bool)
      0 (>L:TrafficRadarPage,bool)
      0 (>L:AirportInfoMenu,bool)
      0 (>L:NearestAirportPage,bool)
      0 (>L:MapPage,bool)
      0 (>L:LayerTags,bool)
      0 (>L:TAWSPage,bool)
      0 (>L:TAWSMode, bool)
      (L:TAWSMode, bool)
      if{ (L:map_ZoomFactor,number) (>L:ZFactorOrig, number)
      (L:UpDateAlwaysOrig, bool) (>L:UpDateAlways, bool) }
      0 (>L:TAWSCounter, bool)
      1 (>TAWSRefresh, bool)
      0 (>L:TCASDisplay, bool)
    </Click>  
  </Area>

This is what the BlackBox is stating with the above coding:
0 L:MFDInit, bool
. P:Absolute time, seconds
..( L:MFDDisplayStart, seconds
1.00 L:MFDStartSequence, number
0.00 L:MFDInitStatus, number
1 L:MFDOffOn, bool
0 L:MFDMainMenu, bool

I keep thinking the error lies in ..( L:MFDDisplayStart, seconds but can;t seem to find anything.

Any ideas or points of interest?

Thanks Greg
 
Greg,

I think the problem here is that, as you don't fully understand what the code does, it turns difficult for you to find a proper way of debbuging it.
For example, you say that it doesn't work but then, what does it mean? If it doesn't show anything, then you should first try making the <Element> show some simple text, like <String>TEST</String>. If it shows properly, then try replacing %((L:MFDInitStatus,number)) with %(1), which should display Coos Bay Multi-Function Display Version 1.3 \n Warming Up ... Please Stand-By. If this doesn't work, the problem is in the {case} construction providing TEST displays correctly; if nothing shows then the problem is in some part of the structure. And so on....

BTW, (L:MFDInit,bool) != is always false as it is written in your code.

Hope this helps

Tom
 
Thank you very much Tom. and your right in saying i don't really understand the working of this section of code. Really, coding is not my strong point, lets just say more of a hobby and I really like that feeling of satisfaction when I have a break through and things come together. I also again thank everyone for their patience and guidance with me and other's when it comes to learning this.

I have run the test and it worked. When i changed %((L:MFDInitStatus,number)) with %(1) it did nothing to trigger the sequance, but I used %((L:MFDInitStatus,number) ! ) and %((L:MFDInitStatus,number) == ) and it displayed the Coos Bay Multi-Function Display Version 1.3 \n Warming Up ... Please Stand-By. Unfortuantly I really don't know what this is telling me, I keep staring at the element section and the update section and I cannot see anything wrong with the code, but that is not saying much. I tried adding 1 (>L:MFDInit,bool) into the mouse section, figuring maybe that would trigger something but nothing. So basically I am at someone's mercy to direct me to some light reading with regards to case statement's or another nudge in the right direction. I have looked at other case statements for reference, and again everything looks like it should work.

Thanks again
Greg
 
The problem you have is that (L:MFDInitStatus,number) never goes out of 0. Let's try with:

Code:
<Update>
  	(L:MFDInit,bool) != 
  	if{ (P:Absolute time, seconds) (>L:MFDDisplayStart, seconds) 1 (>L:MFDInit,bool) 1 (>L:MFDStartSequence,number) }
  	(L:MFDStartSequence,number) 1 == 
  	if{
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 3 &lt;= if{ 0 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 3 > if{ 1 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 13 > if{ 0 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 15 > if{ 2 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 25 > if{ 0 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 27 > if{ 3 (>L:MFDInitStatus,number) }
          [COLOR="Red"]3 (>L:MFDInitStatus,number)[/COLOR]
  	  }  		 
 </Update>


Now it should display Press the "MENU" Button to Start. If it doesn't , then the problem stays within the <Update> command. If if does, then try this one:

Code:
<Update>
  	(L:MFDInit,bool) != 
  	if{ (P:Absolute time, seconds) (>L:MFDDisplayStart, seconds) 1 (>L:MFDInit,bool) 1 (>L:MFDStartSequence,number) }
  	(L:MFDStartSequence,number) 1 == 
  	if{
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - abs 3 &lt;= if{ 0 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - abs 3 > if{ 1 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - abs 13 > if{ 0 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - abs 15 > if{ 2 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - abs 25 > if{ 0 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - abs 27 > if{ 3 (>L:MFDInitStatus,number) }
  	  }  		 
 </Update>

Tom
 
Thanks again Tom,

I tried as you suggested and nothing. As per a previous post I had removed the = sign out of (L:MFDInit,bool) ! at the start. Although I tried both it will not start the sequance. The absolute value actually made sense to me, for reasons unknown. In my mind if 2 = 2 then it will be 2 nothing more and nothing less. I am continueing to attempt to make an effort to solve this issue in between work, getting in my way really, and completly open to ideas and more guidance. Thanks again

Greg
 
If you send me the complete code (the gauge itself:) ) I can take a look and try to make it work. Also, if you would like to know about the logic of those lines used in the <Update> section, I could post an explanation of the method employed.

Tom

PD: Send me a PM with the gauge attached, or post the entire code here, providing it is not too long.
 
Greg,

You should check the gauge's code very carefully, because it might contain some bugs. I found one at least, which was the source of your problem:) Please remove the quit word that is located in <Update> section, line 57:

Code:
[COLOR="Red"]quit[/COLOR] 0 (&gt;C:ITrafficInfo:Filter) (C:ITrafficInfo:ListSize) (&gt;G:Var1)

Otherwise the rest of the <Update> won't execute, including the piece of code that controls the timers in discussion.

Besides, as there are other quits in the code below, I suggest you move the entire

Code:
(L:MFDStartSequence,number) 1 == 
  	if{
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 3 &lt;= if{ 0 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 3 > if{ 1 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 13 > if{ 0 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 15 > if{ 2 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 25 > if{ 0 (>L:MFDInitStatus,number) }
  	  (P:Absolute time, seconds) (L:MFDDisplayStart, seconds) - 27 > if{ 3 (>L:MFDInitStatus,number) }
  	  }
to the top of the <Update> section (abs are not required).
And you can remove

Code:
(L:MFDInit,bool) ! 
  	if{ (P:Absolute time, seconds) (>L:MFDDisplayStart, seconds) 1 (>L:MFDInit,bool) 1 (>L:MFDStartSequence,number) }

as you don't need it to auto execute at startup but rather when you switch the POWER button to ON. You are handling this correctly in the <Mouse> section.

Tom
 
I can't thank you enough Tom, I would of walked away from this portion, because I never would of figured that out or it was even there. I have done as you recommended and all is working as it should. Thank you again for your time and patience with this piece of code. Hope you all have a Happy Holiday and all the best to you and your families.

Cheers
Greg
 
Back
Top