MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

icon
Avatar
Vacicak
Posts: 7
Hi there, I would like to ask how I can made one simply button for XPNDR on PMDG 737 NGX for P3D v4. When pressed and Transporder is on STBY then switch to TA/RA, when pressend and its on TA/RA switch to STBY.

I've read few manuals, SDK, and try find here on forum, but without success. Have anyone some tip please?
2018-07-22 10:44
Avatar
StephanHo
From: EDDG, Germany
Posts: 1819
Supporter
Hi Vacicak,

welcome to MobiFlight!

If you need an event ID for the simulation, you can easily find that out.

Start P3D and open the FSUIPC (menu: Addons). Click the Logging tab. Here you put the hooks in "Button and Key Operations" and "Events". Then you put the hook "Send to console Window" and click OK.

In the opening window you will then see all EventIDs with parameters, if you press the corresponding equivalent in the simulator.

For your project you do not need a simple switch, but a rotary switch for 5 positions in a 30 ° angle.

Then you choose as EventID 70432 (EVT_TCAS_MODE) and create a device for each switch position, which is then always assigned the same EventID. As a parameter you take the 0 = standby ... to 4: TA / RA. For the test mode, you take a button with the EventID 70433 and the parameter 536870912 (left mouse click).

Please report, if it worked.
Grüße,
Stephan (Time: UTC+1)
2018-07-22 12:49
Avatar
Vacicak
Posts: 7
Hi Stephan,

at first thank you for quick reply. So if I understand correctly I cant switch directly from 0 to 4 and when press second time from 4 to 0? Because I am doing only simple panel, not as in real plane. Because I am using FS2Crew is bad for me had 5 position rotary swich, cause my "FO" will switch transporder to TA/RA and on my panel it will be still on OFF positon. :)

Again, thank you for your reply :)
2018-07-22 13:26
Avatar
StephanHo
From: EDDG, Germany
Posts: 1819
Supporter
Hi Vacicak,

what you are planning to do goes well.

If you take a simple ON-OFF switch, then you set up 2 devices (activ + standby) (do not forget to save and upload to the MEGA), then you need 2 configs that you hang on the two devices and use in both configs Event ID 70432. Once with the parameter 0 (standby) and once with 4 (RA/TA). You can then always switch between standy and TA / RA.

If you use FS2Crew, you have a problem. In FS2Crew the switch, or better, all the switches, are virtually pressed, but your external hardware can never be pressed, as well as?
You will have to compromise there.
Grüße,
Stephan (Time: UTC+1)
2018-07-22 15:28
Avatar
Vacicak
Posts: 7
Thank you, I was hoping, that there is chance use standart tacticle switch. So I will use ON-OFF-ON switch which haven't got aretation :)
2018-07-22 16:48
Avatar
StephanHo
From: EDDG, Germany
Posts: 1819
Supporter
Ok, but you should use a switch, not a button
Grüße,
Stephan (Time: UTC+1)
2018-07-22 17:01
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5566
Supporter
Hi Guys.

Here we have a "little" Problem.

Vacicak request a "momentary" Button in that case... Cause if a "other" FO will push the function (Whatever by a software or by a Real person via Shared Virtual Cockpit) the REAL Switch in his cockpit is already in current position.

Normaly this is easy ( For example with Standard Aircrafts or with Prosim and Project Magenta) .... BUT it is not directly possible with PMDG !


Reason:
PMDG work fir INPUTS with EventID Only. A EventID will trigger a Event.... BUT It can NOT support us a current Value of the Offset that we will controll by the Event.

For a "Momentary Button Toggle" we need a logic like " If Switch is in SIM on Position 0 (Stby) THEN Set to 4 (TaRa) .... ELSE If Switch is 4 Then set to 0 "
But as i said... In a EventID we can not use IF Conditions like in Offset Configs.

****
Solution:

1. Work with Original Technic ( 5 Position roatry) or with a ON/OFF static Switch.

2. There is also a alternate with 2 Input configs, 1 Output Config and a litte advanced Precondition System. Here you can use your Momentary Button as you like !!


To help you i need a bit more information....
You say "If Standby then TA ... If TA then Standby"
But what should happend if switch is in the steps between ??

Please tell me exact what conditions the switch should do..... Then i will give you a working solution.
Good Luck !
2018-07-24 15:41
Avatar
Vacicak
Posts: 7
I don't know what do you want. I only need one classic Tactile Push Button when pressed transporder to TA/RA and when pressed again to OFF position. So anythink like:

if pushed and value is 0 then set to 4. If pushed and value is 4 then set value to 0

But I think it is impossible :)
2018-07-26 21:15
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5566
Supporter
As i said .... What should be done when switch is in a position that is NOT "Off" or "TA/RA" at the moment of pushing your button.

( The PMDG 737 XPDR have 5 positions ...0=STBY..... 1=ALT RPTG OFF ..... 2= XPNDR ..... 3=TA ONLY.....4=TA/RA )

So your simple Idea will not work directly.....

"IF Value is 0 then set ot 4 OR If Value is 4 then set to 0 " ....... This Will only work if Value is 0 or 4 at time of button push ...
BUT If Value is 1,2 or 3 then both Conditions are FALSE and your switch will do nothing !

Thats why i ask you what should happend in the steps between. ...
For example... ( I don´t know FS2Crew and how it workes) Normaly after Pushback/ Engine Start the XPDR should be set ONLY to XPNDR. On LineUp it will be change to TA/RA
Same after landing.... At vecation of Runway Transponder must be set back to XPNDR while taxi to gate .... STBY is only used after full stand on the Gate !

iconVacicak:


But I think it is impossible :)



It´s NOT .... But you must tell me what logic you like.

1. For example we can say.... IF Value is NOT TA/RA then set to TA/RA .... ELSE If Value = TA/RA then set to STBY .
But then a Transponder in mode ALT or XPNDR or TA ONLY will also set to TA/RA after pushing the button (same like it would be STBY at the moment)

2. Otherwise we can say IF Value is NOT STBY then set to STBY ....ELSE If Value = STBY then set to TA/RA
Now its inverted.... Now mode ALT,XPNDR and TA ONLY will be set to STBY with a button Push.

3. You can Mix it up in lots of ways with OR Parameters , too ... For example IF mode is 0 OR 1 OR 2 THEN set to 4 ... ELSE IF Mode is 3 OR 4 THEN set to 0 .

****
HOW TO DO

You can try yourself to build this. For example the First System from above.....

1. Make a Output Config that reads.... 65CD 1 BYTE XPDR_ModeSel Named for example "Readout XPDR"

2. Create 2 INPUT Configs .... Both use as device the SAME momentary Button ! And also set proconditions to each config.

Input Config 1 will Set Transponder to Standby (0) EventID 70432 parameter 0
Precondition Config 1 Only work if config "Readout XPDR" =4 (So the button work if Sim have TA/RA and set to STBY )

Input Config 2 will Set Transponder to TA/RA (4) EventID 70432 parameter 4
Preconditon Config2 Only work if config "Readout XPDR" !=4 (This mean that config work if Transponder is NOT TA/RA Whatever its Mode 0,1,2 or 3 .... all will set to TA/RA)

****
Simply Try Out !
Good Luck !
2018-07-27 04:12
icon