Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Transponder

Featured Replies

Hello folks, looking for some further advice, this time re the transponder, and the Copilot action to automatically change this.

I have noticed that P2ATC no longer does this although the check box is ticked. The radio frequencies change, and the copilot responds to the radio as desired, but not the transponder. I am mainly using Toliss aircraft and the JD Coilot add on and was wondering if there is perhaps a connection?

Any obvious reason why the transponder would not change automatically? I am sure it used to. Have been living with this for quite a while now, so can't recall when it stopped working.

Thanks

BTW, this is till bt far one of the best X-Plane add ons... can't live without it!!

 

  • 2 weeks later...

Don't know if it works in X-Plane, for P3D Flysimware Learjet I had to set the transponder squawk by an FSUIPC LUA script created b a friend of mine.
The reason is: P2A sets the default P3D transponder offset while the Learjet uses internal LVARs for its display (it uses the P3D offset too but not for the display).

This LUA script is started by the FSUIPC [Auto] section as the Learjet is loaded.
It reads the P3D offset and sets the Learjet's transponder squawk LVAR accordingly.
At it's end, it requests its own start 10 seconds later, so it effectively runs in a loop.
Now, when the P2A copilot sets the P3D offset squawk, after at least 10 seconds the script sets the Learjet LVAR so it is displayed in the cockpit.

Maybe this is possible in your X-Plane TOLISS aircraft too, but it's a little work to get the correct LVARs and fill them with the appropriate values.
According to  this mobiflight thread, reading of the Xplane transponder squawk should be possible as "pizman82" wrote:

Xplane using XPUIPC.... ( Instead of FSUIPC in FSX)
In Xplane ( As i know) you can NOT use EventID ! Thats only for FSX/P3D and not included in XPUIPC.
If you like to change a value in Xplane via XPUIPC you need to directly write the Offset !
Check " Offset: 0354 Size 2 Byte Transponder setting : 4 digits in BCD format: 0x1200 means 1200 on the dials.

If you are able to find the corresponding TOLISS squawk LVARs you may use an adapted version of my P3D Learjet LUA below.
In FSUIPC P3D a list of LVARs is shown by  FSUIPC function "List local panel variables" on a joystick button to show them in FSUIPC.log,
don't know if this works in a similar way in Xplane,

The script starts as the Learjet is loaded by an entry in FSUIPC.ini:

[Auto.Flysimware_Learjet35A_FMS]
1=LUA Lear35A_SyncXPDR

It reads the four Flysimware Learjet LVARs "Digit1" through "Digit4" (BCD coded) and sets them out of P3D offset 0x0354 (seems the same as above mentioned for Xplane ?!?)
Dialing the virtual cockpit squawk wheel manually results in Learjet setting both, its Digit... LVARs and the P3D offset, so I still can set it manually and as they're equal, the script doesn't modify them.
If the P2A copilot sets the P3D offset to another value, the script find them "not equal" and changes the LVARs.

But it's required that your aircraft uses such LVARs and you find them.

-- 23.07.23/AH Learjet 35A FMS Synchronize "Digital Transponder" to P3D internal transponder
--
--	Flysimware Learjet 35A FMS Expansion Pack delivers a new "Digital Transponder" that synchronizes in a one-way fashion
--	the P3D internal transponder. This leads to a conflict with Pilot2ATC's "Copilot sets Squawk" option (overwriting the latter)
--	
--	This script starts by FSUIPC.ini [Auto] or [Auto.<profile>] Section, it could be started manually by FSUIPC button definition.
--		[Profile.Flysimware_Learjet35A_FMS]
--		1=Learjet 35A FMS N548PA
--		[Auto.Flysimware_Learjet35A_FMS]
--		1=LUA Lear35A_SyncXPDR
 
--	The Script's main procedure starts the sync function every 10.000 ms (or another value in variable cycletime)
--
--  The function LearSyncXpndr reads Digital Transponders LVARs and, if not existing, terminates itself (no Lear FMS aircraft)
--	The P3D internal transponder Squawk (2 bytes BCD coded at offset 0x0354) is divided into its nibbles (halfbytes)
--	They have to be combined digit by digit to a decimal number to compare (BCD x01200 = decimal 4608 <> decimal 1200)
--	If the Squawks are different, the Digital Transponder Squawk is set according to P3D internal Squawk.
--
--	It's a compromise:
--  On one site, manual setting of Digital Transponder is possible:
--  even if P3D internal transponder changes, there's a 10 seconds gap until the function runs again
--	On the other site if a tool like Pilot2ATC sets the P3D internal transponder and there's no focus in VC on the Digital Transponder
--	(knobs not activated by clicking on them), this script sets Digital Transponder accordingly after max. 10 seconds.

--
-- Sync function, called by main entry's event.timer every 10 seconds
--
function LearSyncXpndr(CurrentTime)
-- Get "Digital Transponder" Squawk Code
  DIGSQ1=ipc.readLvar("L:Digit1")
  DIGSQ2=ipc.readLvar("L:Digit2")
  DIGSQ3=ipc.readLvar("L:Digit3")
  DIGSQ4=ipc.readLvar("L:Digit4")
-- Check if "L:Digit..." LVARs were returned, if not: no Lear FMS - end timer procedure
  if DIGSQ1 == nil or DIGSQ2 == nil or DIGSQ3 == nil or DIGSQ4 == nil then
    ipc.display("LUA only for Flysimware Learjet 35A with FMS (L:Digit... undefined)")
	ipc.sleep(2000)
	ipc.exit()
  end
-- Combine Digital Transponder Squawk digits to decimal number
  DIGSQ=(DIGSQ1 * 1000) + (DIGSQ2 * 100) + (DIGSQ3 * 10) + DIGSQ4
-- Get P3D BCD-coded Squawk Code and extract nibbles (halfbytes)
-- we need them to build a decimal compare number and to set Digital Transponder if not equal
  XPNDR=ipc.readUW(0x0354)
  XPNDR1=logic.Shr(XPNDR,12)		-- get first nibble by shift right 12 bits
  XPNDR1=logic.And(XPNDR1,15)		-- and leave only rightmost four bits
  XPNDR2=logic.Shr(XPNDR,8)		-- get second nibble by shift right 8 bits
  XPNDR2=logic.And(XPNDR2,15)		-- and leave only rightmost four bits
  XPNDR3=logic.Shr(XPNDR,4)		-- get third nibble by shift right 4 bits
  XPNDR3=logic.And(XPNDR3,15)		-- and leave only rightmost four bits
  XPNDR4=logic.And(XPNDR,15)		-- get fourth nibble: leave only rightmost four bits
-- Combine P3D internal transponder digits to decimal number
  XPNDRDEC=(XPNDR1 * 1000) + (XPNDR2 * 100) + (XPNDR3 * 10) + XPNDR4
-- If Digital Transponder Squawk and P3D-internal Squawk are not equal: set "Digital Transponder"
  if DIGSQ ~= XPNDRDEC then
-- Set Digital Transponder Squawk to P3D Squawk 
    ipc.WriteLvar("L:Digit1", XPNDR1)
    ipc.WriteLvar("L:Digit2", XPNDR2)
    ipc.WriteLvar("L:Digit3", XPNDR3)
    ipc.WriteLvar("L:Digit4", XPNDR4)
  end

-- just for debugging: show nibbles in hex  
--  XPNDR1X=string.format("%x", XPNDR1)
--  XPNDR2X=string.format("%x", XPNDR2)
--  XPNDR3X=string.format("%x", XPNDR3)
--  XPNDR4X=string.format("%x", XPNDR4)
--  ipc.display("P3D XPD: " .. XPNDR1 .. "-" .. XPNDR2 .. "-" .. XPNDR3 .. "-" .. XPNDR4 .. ".") 
--  ipc.sleep(1000)
--  XPNDRX=string.format("%x", XPNDR)
--  ipc.display("P3D XPX: " .. XPNDR1X .. "-" .. XPNDR2X .. "-" .. XPNDR3X .. "-" .. XPNDR4X .. ".") 
--  ipc.sleep(1000)
--  ipc.display("P3D XP: " .. XPNDRX .. " (BCD !) DigXP: " .. DIGSQ)

end

--
-- Main Entry, called by FSUIPC.ini LUA entry in Section "[Auto]" or "[Auto.<profilename>]"
--
cycletime=10000
-- Display in P3D before starting cyclic function to prevent msg removal by function's own msgs
ipc.display("Starting Lear 35A Digital Transponder sync every " .. cycletime .. "ms")
ipc.sleep(8000)
ipc.display("")	-- clear display
-- Now start cyclic function for XPDR Sync
event.timer(cycletime, "LearSyncXpndr")
--

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.