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.

NGX Lua for direct use in FSUIPC?

Featured Replies

Hallo Günter,I see you are not using macros for the new PMDG 737 NGX.Is it possible to use some of the lua-functions direct with FSUIPC.I have the Gear_up and Gear_down assigned to one axis of my Saitek-Throttle-Quadrant via FSUIPC.I love to move a handle to raise or lower the gear :-)

With kind regards

Roland Pohl
Vice chairman FSC e.V.

Hallo Roland, in other words, you'd like to use it as axis?With LINDA, axis are not supported, but you could of course "extract" parts of te LUA code for your needs and make a LUA file as it was in "pre-LINDA-times" Maybe have a look into the FSUIPC forum download sections where all my old scripts are and try it ith the parameter stuff and insert then the LINDA functions you need ...

Guenter Steiner
--------------------------------------------------------------------------------------

Betatester for: A2A, LORBY, FSR-Pillow Tester
--------------------------------------------------------------------------------------

You need the Gear off position too Guenter, otherwise you can get hydraulic pump overheat warnings I think, if you just leave the lever in the up position.

Cheers, Andy.

  • Commercial Member

Gear off function is done and will be in the next update. Or you can just add it yourself:

function NGX_Gear_off ()	ipc.control(74184, 536870912)	ipc.control(74184, 131072)end

Artem Crum, EASA PPL
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
LINDA Lua Integrated Non-complex Device Assigning
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

  • Commercial Member
Hallo Günter,I see you are not using macros for the new PMDG 737 NGX.Is it possible to use some of the lua-functions direct with FSUIPC.I have the Gear_up and Gear_down assigned to one axis of my Saitek-Throttle-Quadrant via FSUIPC.I love to move a handle to raise or lower the gear :-)
This is now impossible with LINDA. I was thinking about this problem already and all solutions I can find are not good. Still thinking about it. The eaiest way to the moment is to extract code from actions.lua to the separate Lua file and put it ino modules folder. Something like that: ngx_gears.lua
function NGX_Gear_up ()	ipc.control(70087, -2147483648)endfunction NGX_Gear_down ()	ipc.control(70087, 536870912)endfunction NGX_Gear_off ()	ipc.control(74184, 536870912)	ipc.control(74184, 131072)endif ipcParam == 1 then	NGX_Gear_up ()elseif ipcParam == 2 then	NGX_Gear_down ()elseif ipcParam == 3 then	NGX_Gear_off ()end

And then assign it with old-style FSUIPC method using "Lua ngx_geer" action with numeric parameters 1/2/3. Script is not tested, but it should work fine.

Artem Crum, EASA PPL
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
LINDA Lua Integrated Non-complex Device Assigning
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

Gear off function is done and will be in the next update. Or you can just add it yourself:
function NGX_Gear_off ()	ipc.control(74184, 536870912)	ipc.control(74184, 131072)end

Thank you Artem.

Cheers, Andy.

  • Author

Hallo Günter,not directly as Axes, but with FSUIPC you can set areas of the controlleraxis to trigger events or funktions.@artem I tried this already with parts of the lua-script, as I have done it with Helges IFly737-script, that worked perfect, but it seems I've done something wrong.I will test.Thx to all for your support.

With kind regards

Roland Pohl
Vice chairman FSC e.V.

  • Author

Unfortunately it does nothing.When I add a line like ipc.display("Hello") this lua-window comes up, so I can see fsuipc calls the right funktion.But I think I should better discuss this in Pete Dawsons forum, cause this is not a LINDA-Problem.

With kind regards

Roland Pohl
Vice chairman FSC e.V.

  • Commercial Member

If function is really called, then there nothing left to not-to-work..The only doubt left is the variable's name. Replace ipcParam with ipcPARAM and try again.

Artem Crum, EASA PPL
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
LINDA Lua Integrated Non-complex Device Assigning
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

  • Author

YES SIR :-)))))It was case sensitive It works like a charm now.

With kind regards

Roland Pohl
Vice chairman FSC e.V.

  • 2 months later...
  • Author

Hi,after the last update of LINDA, my script to move the gear lever by one axis via FSUIPC doesn't work anymore.

function RP_NGX_GEAR_up ()    ipc.control(70087, -2147483648)endfunction RP_NGX_GEAR_down ()    ipc.control(70087, 536870912)endfunction RP_NGX_GEAR_off ()    ipc.control(74184, 536870912)    ipc.control(74184, 131072)endif ipcPARAM == 1 then	    RP_NGX_Gear_up ()elseif ipcPARAM == 2 then	    RP_NGX_Gear_down ()elseif ipcPARAM == 3 then	    RP_NGX_Gear_off ()end

Here is, what the FSUIPC4.log says:

********* FSUIPC4, Version 4.743 by Pete Dowson *********User Name="Roland Pohl"User Addr=xxxxxxxxxxxxxxxFSUIPC4 Key is providedWIDEFS7 not user registered, or expiredRunning inside FSXModule base=61000000Wind smoothing fix is not installedDebugStatus=15 296 System time = 02/11/2011 00:32:13 296 FLT path = "D:Eigene DateienFlight Simulator X-Dateien" 312 Trying to connect to SimConnect Acc/SP2 Oct07 ... 328 FS path = "R:FSX" 1671 Run: "R:FSXModuleslinda.exe" 1781 LogOptions=00000000 00000001 1781 SimConnect_Open succeeded: waiting to check version okay 1781 Trying to use SimConnect Acc/SP2 Oct07 1843 VRI port 1 "com3" opened 5546 VRI FMER ("MCP Combi") detected on port com3 6593 Running in "Microsoft Flight Simulator X", Version: 10.0.61472.0 (SimConnect: 10.0.61259.0) 6593 Initialising SimConnect data requests now 6593 FSUIPC Menu entry added 6890 d:eigene dateienflight simulator x-dateienESSEN Standard.FLT 6890 R:FSXSimObjectsAirplanesbeech_baron_58_new_TCBeech_Baron_58.AIR 38984 R:FSXSimObjectsAirplanesPMDG 737-800NGX WLB737-800WL.AIR 38984 Weather Mode now = Custom 38984 d:eigene dateienflight simulator x-dateienPMDG318.FLT 49390 System time = 02/11/2011 00:33:02, Simulator time = 01:02:46 (00:02Z) 49781 Aircraft="PMDG 737-800NGX PMDG House Winglets" 101250 Starting everything now ... 101265 LUA: beginning "R:FSXModulesipcReady.lua" 101265 LUA: ended "R:FSXModulesipcReady.lua" 101312 LUA: 101312 LUA: [iNIT]LINDA:: Loading... 101468 LUA: LINDA:: Aircraft: PMDG 737-800NGX PMDG House Winglets 101484 LUA: LINDA:: Aircraft module detected: PMDG 737NGX 101609 LUA: LINDA:: AivlaSoft library loaded... 101609 LUA: LINDA:: FSX standard library loaded... 101671 LUA: LINDA:: RealityXP library loaded... 101703 LUA: LINDA:: A2A MAP library loaded... 102468 Advanced Weather Interface Enabled 103671 LUA: LINDA:: Loading a fallback joysticks config... 103687 LUA: LINDA:: Loading PMDG 737NGX joysticks config... 103718 LUA: LINDA:: Module: PMDG 737NGX Started... 103718 LUA: LINDA:: Ready to go, Captain! 103718 LUA: LINDA:: 103859 LUA: LINDA:: Offsets watching list cleared! 179171 *** LUA Error: R:FSXModulesRP_NGX_Gear.lua:15: attempt to call global 'RP_NGX_Gear_up' (a nil value) 181218 *** LUA Error: R:FSXModulesRP_NGX_Gear.lua:19: attempt to call global 'RP_NGX_Gear_off' (a nil value) 181390 *** LUA Error: R:FSXModulesRP_NGX_Gear.lua:17: attempt to call global 'RP_NGX_Gear_down' (a nil value) 185484 *** LUA Error: R:FSXModulesRP_NGX_Gear.lua:15: attempt to call global 'RP_NGX_Gear_up' (a nil value) 186625 *** LUA Error: R:FSXModulesRP_NGX_Gear.lua:19: attempt to call global 'RP_NGX_Gear_off' (a nil value) 186750 *** LUA Error: R:FSXModulesRP_NGX_Gear.lua:17: attempt to call global 'RP_NGX_Gear_down' (a nil value) 187609 *** LUA Error: R:FSXModulesRP_NGX_Gear.lua:15: attempt to call global 'RP_NGX_Gear_up' (a nil value) 190296 *** LUA Error: R:FSXModulesRP_NGX_Gear.lua:19: attempt to call global 'RP_NGX_Gear_off' (a nil value) 190578 *** LUA Error: R:FSXModulesRP_NGX_Gear.lua:17: attempt to call global 'RP_NGX_Gear_down' (a nil value) 191546 *** LUA Error: R:FSXModulesRP_NGX_Gear.lua:15: attempt to call global 'RP_NGX_Gear_up' (a nil value) 273781 LUA: LINDA:: LVars watching list cleared...
Could this be related to the LINDA1.1B5-Update)What does this error mean?

With kind regards

Roland Pohl
Vice chairman FSC e.V.

Hi Roland,do you talk about the LINDA 1.1b5 and NGX module 2.0b?

Guenter Steiner
--------------------------------------------------------------------------------------

Betatester for: A2A, LORBY, FSR-Pillow Tester
--------------------------------------------------------------------------------------

  • Commercial Member

Roland,If you trying to use this EXACT script, it should not work.Note, that your function name is "RP_NGX_GEAR_up" but when you call it you are using this name: "RP_NGX_Gear_up". Letter capitalization does matter.So, I have no idea how this script did work before latest LINDA update.

Artem Crum, EASA PPL
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
LINDA Lua Integrated Non-complex Device Assigning
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

  • Author

Tell me, why could a man be sometimes so blind :-)Artem you are right, i renamed the funktion and it works now.THXWhen I insert the DspShow-funktion, I get a error.Is it nor possible to use it outside of Linda, i.e. my script?

With kind regards

Roland Pohl
Vice chairman FSC e.V.

Is it nor possible to use it outside of Linda, i.e. my script?
no, that is a special LINDA function!(to bond our customers to strictly to LINDA tongue.png )

Guenter Steiner
--------------------------------------------------------------------------------------

Betatester for: A2A, LORBY, FSR-Pillow Tester
--------------------------------------------------------------------------------------

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.