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

MSFS20 GNS 430 implementation

Lagaffe

Resource contributor
Messages
992
Country
france
Hello,

Trying to implement an Asobo GARMIN 430 in my current aircraft, I ran into a rather annoying problem with it:
- I have a switch Battery and another switch for Avionics and at last a switch that allows you to display or not the garmin.
- When GNS430 is displayed and after the user puts the switch Battery ON, the GNS 430 is automatically ON whereas the transponder and secondary radio need the Avionics switch ON to be able to be commuted ON.

In the system.cfg file, bus 2 is dedicated to avionic, and all elements of this type are connected to this bus.
[ELECTRICAL]
bus.1 = Name:MAIN_BUS
bus.2 = Connections:bus.1 #Name:AVIONICS_BUS
bus.3 = Connections:bus.1 #Name:Alternator_Bus
bus.4 = Name:Battery_drain
battery.1 = Connections:bus.1, bus.4 #Capacity:24.0 #Voltage:curve.1 #Name:Main_Battery ; Main Battery
alternator.1 = Connections:bus.3 #iEng:0# RatedVoltage:28 #Load:curve.2 #Name:Main_Alternator
curve.1 = 0:2, 0.1:12.5, 0.5:24, 0.9:25, 1:25.4 ; Battery voltage for capacity %
curve.2 = 0.3:10, 0.5:50, 0.80:60, 0.95:80 ; Load from RPM table - 80A max
circuit.1 = Type:CIRCUIT_GENERAL_PANEL #Connections:bus.1 #Power:0.5, 1, 10.0 #Name:General_Panel ; General panel
circuit.2 = Type:CIRCUIT_STARTER #Connections:bus.1 #Power:200, 350, 10.0 #Name:Starter_1 ; Starter 3500W
circuit.3 = Type:CIRCUIT_DIRECTIONAL_GYRO #Connections:bus.1 #Power:10, 15, 10.0 #Name:Directional_Gyro ; directional gyro 15W
circuit.4 = Type:CIRCUIT_STANDBY_VACUUM #Connections:bus.1 #Power: 5, 10, 10.0 #Name:STBY_Vacuum ; stby vacuum
circuit.5 = Type:CIRCUIT_XPNDR #Connections:bus.2 #Power:10, 18, 10.0 #Name:Transponder ; Transponder 18W
circuit.6 = Type:CIRCUIT_TURN_COORDINATOR #Connections:bus.1 #Power:10, 15, 10.0 #Name:Turn_Coordinator ; turn coordinator 15W
circuit.7 = Type:CIRCUIT_AVIONICS #Connections:bus.2 #Power:20, 25, 10.0 #Name:Avionics_1 ; avionics 1
circuit.8 = Type:CIRCUIT_AUDIO #Connections:bus.2 #Power:10, 15, 10.0 #Name:Audio ; Audio 15W
circuit.9 = Type:CIRCUIT_PITOT_HEAT #Connections:bus.2 #Power:30, 40, 10.0 #Name:pitot_Heat ; pitot_heat 40W
circuit.10 = Type:CIRCUIT_NAV:1 #Connections:bus.2 #Power: 0, 0, 0 #Name:NAV1 ; NAV 1 5W
circuit.11 = Type:CIRCUIT_COM:1 #Connections:bus.2 #Power: 4, 5, 10.0 #Name:COM1 ; COM 1 5W
circuit.12 = Type:CIRCUIT_LIGHT_PANEL:1 #Connections:bus.1 #Power:10, 15, 10.0 #Name:Instruments_Lights ; panel lights (11) 15W
circuit.13 = Type:CIRCUIT_LIGHT_CABIN:1 #Connections:bus.1 #Power:10, 15, 10.0 #Name:Cabin_Light_pilot ; Cabin light 15W
circuit.14 = Type:CIRCUIT_LIGHT_CABIN:2 #Connections:bus.1 #Power:10, 15, 10.0 #Name:Cabin_Light_copilot ; Cabin light 15W
circuit.15 = Type:CIRCUIT_LIGHT_NAV #Connections:bus.1 #Power:10, 15, 10.0 #Name:Nav_Light_1 ; nav 1 light 15W
circuit.16 = Type:CIRCUIT_LIGHT_WING #Connections:bus.1 #Power:10, 15, 10.0 #Name:Wing_Light ; wing light 15W
circuit.17 = Type:CIRCUIT_LIGHT_LOGO #Connections:bus.1 #Power:10, 15, 10.0 #Name:Logo_Light ; logo light 15W
circuit.18 = Type:CIRCUIT_XML #Connections:bus.2 #Power:10, 15, 10.0 #Name:Aera_Tablet
circuit.19 = Type:CIRCUIT_GPS:1 #Connections:bus.2 #Power:10, 15, 10.0 #Name:AS430 ; AS430 30W
circuit.20 = Type:CIRCUIT_FUEL_PUMP:1 #Connections:bus.1 #Power:0.003, 0.005, 11.5 #Name:Fuel_Pump ; Fuel pump 5W

For the Interior.xml file, the Battery and GNS 430 declarations are standard and refers to the circuit number that is associated with the GPS:1
<UseTemplate Name="M75_switch_template">
<NODE_ID>ELECTRICAL_Switch_Battery_Master_1</NODE_ID>
<ANIM_NAME>ELECTRICAL_Switch_Battery_Master_1</ANIM_NAME>
<ANIM_CODE>(A:ELECTRICAL MASTER BATTERY, Boolean) 100 *</ANIM_CODE>
<Cursor>Hand</Cursor>
<TooltipID>Master battery Switch (%((A:electrical master battery,bool) 0 &gt;)%{if}on%{else}off%{end})</TooltipID>
<MOUSEFLAGS>LeftSingle</MOUSEFLAGS>
<ANIM_LAG>600</ANIM_LAG>
<CALLBACKCODE_DEFAULT_IM>
(M:Event) 'LeftSingle' scmi 0 ==
if{ 1 (&gt;K:TOGGLE_MASTER_BATTERY) (>K:TOGGLE_ELECT_FUEL_PUMP) }
</CALLBACKCODE_DEFAULT_IM>
</UseTemplate>

<Component ID="AS430">
<UseTemplate Name="ASOBO_AS430_Template">
<NAV_INDEX>1</NAV_INDEX>
<COM_INDEX>1</COM_INDEX>
<POTENTIOMETER>1</POTENTIOMETER>
<FAILURE>(A:CIRCUIT ON:19, Bool)</FAILURE>
<CIRCUIT_ID>19</CIRCUIT_ID>
</UseTemplate>
</Component>
When the GNS430, the transponder and the secondary radio are ON and display their informations, if you swith AVIONIC OFF, only the transponder and the secondary radio are cut OFF !

The problem is like this: https://www.fsdeveloper.com/forum/t...-a-circuit-and-providing-it-with-power.455186 but this thread don't give me the solution.

That's wrong ?
 
Last edited:
Well, by testing each potential source independently I have not found a solution. As a last resort, I decided to review the code used for the avionics switch and it paid off since the problem came from there.

The old code:
<UseTemplate Name="M75_switch_template">
<NODE_ID>switch_avionics_master</NODE_ID>
<ANIM_NAME>switch_avionics_master</ANIM_NAME>
<ANIM_CODE>(A:AVIONICS MASTER SWITCH, Boolean) 100 *</ANIM_CODE>
<Cursor>Hand</Cursor>
<TooltipID>Avionics Master Switch (%((A:Avionics master switch,bool) 0 &gt;)%{if}on%{else}off%{end})</TooltipID>
<MOUSEFLAGS>LeftSingle</MOUSEFLAGS>
<ANIM_LAG>600</ANIM_LAG>
<CALLBACKCODE_DEFAULT_IM>
(M:Event) 'LeftSingle' scmi 0 ==
if{
(A:BUS CONNECTION ON:1, Bool) != if{ 1 1 (&gt; K:2:ELECTRICAL_BUS_TO_BUS_CONNECTION_TOGGLE) }
(A:CIRCUIT SWITCH ON:7, Bool) != if{ 7 (&gt; K:ELECTRICAL_CIRCUIT_TOGGLE) }
(L:GAS_AVIONICS_SWITCH, Bool) ! (&gt; L:GAS_AVIONICS_SWITCH,bool)
(L:GAS_AVIONICS_SWITCH, Bool) (&gt; K:AVIONICS_MASTER_SET)
(L:GAS_AVIONICS_SWITCH, Bool) 100 * (&gt; K:LIGHT_POTENTIOMETER_30_SET)
}
</CALLBACKCODE_DEFAULT_IM>
</UseTemplate>
The new one ... new not exactly because is a standart code used in several aircrafts.
<UseTemplate Name="ASOBO_ELECTRICAL_Switch_Avionics_Bus_template">
<ID>1</ID>
<AVIONICS_BUS_ID>2</AVIONICS_BUS_ID>
<SOURCE_BUS_ID>1</SOURCE_BUS_ID>
<AVIONICS_CIRCUIT_ID>7</AVIONICS_CIRCUIT_ID>
<NODE_ID>switch_avionics_master</NODE_ID>
<ANIM_NAME>switch_avionics_master</ANIM_NAME>
<PART_ID>AVIONICS BUS SWITCH</PART_ID>
</UseTemplate>

In addition, I have just noticed that my local variable GAS_AVIONICS_SWITCH was only used for this model behavior so it also saves me on variables.
 
Back
Top