Jump to content
Sign in to follow this  
johnk51

Offsets for switches Phenom 100 fsuipc

Recommended Posts

Is there a list of offsets I can use to assign switches to?  I can do the nav, beacon strobe lights, but like the taxi/landing lights I have a 3 way switch.  When I try to assign off, taxi, landing, it doesn't work.  Also some of the other switches don't work.  I have 2 usb boards with 20 spdt and 10 3pdt switches.


John K
 

Share this post


Link to post
Share on other sites

Here is a helpful lua file I wrote to handle the Phenom 100 3 position landing and taxi lights in addition to the Nav and Strobe lights.  You can ignore whichever parameters you don't want to assign.  

 

Save the the text below in a text editor to a file called "LUACMDS" or whatever else you choose.  Then use FSUIPC to assign the function "Lua LUACMDS" to a button or switch with a parameter of 1 to move the switch up and parameter 2 to move it down  

Bruce 

 

--------------------------------------------

-- Scripts for special switches and functions

--------------------------------------------

 

--------------------------------------------

-- Parameters by Number

--------------------------------------------

-- 1    Move Ldg_Taxi Lt SW UP one position  --  E50P

-- 2    Move Ldg_Taxi Lt SW DN one position  --  E50P

-- 3    Turn ON NAV & STROBE Lts             --  E50P, PA28, C172

-- 4    Turn OFF NAV & STROBE Lts             --  E50P, PA28, C172

-- 5    Turn ON Fuel Pump                       --  PA28, C172

-- 6    Turn OFF Fuel Pump                     --  PA28, C172

 

--------------------------------------------

---- Variables

--------------------------------------------

    SW_Pos      = "L:ASD_SWITCH_LANDING_TAXI_EMB500"

 

--------------------------------------------

---- Scripts

--------------------------------------------

 

-- Move Ldg_Taxi Lt SW UP one position

if ipcPARAM == 1 then

    SWPos = ipc.readLvar(SW_Pos)

    if SWPos == 0 then

        ipc.writeLvar(SW_Pos, 1) 

        ipc.setbitsUW(0x0D0C, 8) 

    end

    if SWPos == 1 then

        ipc.writeLvar(SW_Pos, 2)

        ipc.clearbitsUW(0x0D0C, 8)        

        ipc.setbitsUW(0x0D0C, 4)

    end

end

 

-- Move Ldg_Taxi Lt SW DN one position

if ipcPARAM == 2 then

   SWPos = ipc.readLvar(SW_Pos)

    if SWPos == 2 then

        ipc.writeLvar(SW_Pos, 1) 

        ipc.clearbitsUW(0x0D0C, 4)            

        ipc.setbitsUW(0x0D0C, 8)     

    end

    if SWPos == 1 then

        ipc.writeLvar(SW_Pos, 0) 

        ipc.clearbitsUW(0x0D0C, 8)

    end

end

 

-- Turn Nav & Strobes ON

if ipcPARAM == 3 then

    ipc.setbitsUW(0x0D0C, 1)

    ipc.setbitsUW(0x0D0C, 16)

end

 

-- Turn Nav & Strobes OFF

if ipcPARAM == 4 then

    ipc.clearbitsUW(0x0D0C, 1)

    ipc.clearbitsUW(0x0D0C,16)

end

 

-- Turn ON Fuel Pump

if ipcPARAM == 5 then

    ipc.setbitsUW(0x3104, 1)

end

 

-- Turn OFF Fuel Pump

if ipcPARAM == 6 then

    ipc.clearbitsUW(0x3104, 1)

end

 


[CPL]  I9-9900K @5.0GHz HT ON, Maximus XI Hero, ASUS TUF RTX4080 OC, 32GB DDR4 3200 14, 1TB NVMe SSD, 500GB SSD, 1TB HDD, 40" Samsung 4K TV, Honeycomb Alpha & Bravo, Logitech Rudder Pedals, WIN11

Share this post


Link to post
Share on other sites

FSUIPC4 Offsets

Took me a while but here is a doc that describes most offsets.  It's a little dated and for FSUIPC4 but still pretty good if you get the desire to do it yourself.

And here is the LUACMDS file.

 

 


[CPL]  I9-9900K @5.0GHz HT ON, Maximus XI Hero, ASUS TUF RTX4080 OC, 32GB DDR4 3200 14, 1TB NVMe SSD, 500GB SSD, 1TB HDD, 40" Samsung 4K TV, Honeycomb Alpha & Bravo, Logitech Rudder Pedals, WIN11

Share this post


Link to post
Share on other sites

I've tried, but nothing happens.  The switch doesn't move nor does the taxi or landing lights come on.  Any ideas.  It's just like you have it.

 

Here's from the log file.

********* LUA: "Luacmd" Log [from FSUIPC version 4.966c] *********
  2928047 System time = 28/08/2017 20:46:32, Simulator time = 20:15:22 (03:15Z)
  2928047 *** LUA Error: cannot open D:\Steam\steamapps\common\FSX\Modules\ipcDebug.lua: No such file or directory
  2928047 LUA: beginning "D:\Steam\steamapps\common\FSX\Modules\Luacmd.lua"
  2928047 *** LUA Error: D:\Steam\steamapps\common\FSX\Modules\Luacmd.lua:1: unexpected symbol near ' '
  2928047 >>> Thread forced exit (ipc.exit or os.exit) <<<
  2928047 System time = 28/08/2017 20:46:32, Simulator time = 20:15:22 (03:15Z)
********* LUA execution terminated: Log Closed *********
 


John K
 

Share this post


Link to post
Share on other sites

Several thoughts:

1. 4.971 is the latest FSUIPC4 for FSX-SE.  Probably not the problem but if all else fails try updating.

2. The line below seems to indicate there might be a typo or stray character in the LUACMD.lua file.  PM me and attach that file and I'll look it over.  

On ‎8‎/‎28‎/‎2017 at 11:48 PM, johnk51 said:

2928047 *** LUA Error: D:\Steam\steamapps\common\FSX\Modules\Luacmd.lua:1: unexpected symbol near ' '

I'm using this lua file in both FSX and P3Dv4 and it works great.  And I've shared it with others here that have also used it successfully so we'll figure it out.  I don't do Steam so I'm not sure why it couldn't find the debug file.


[CPL]  I9-9900K @5.0GHz HT ON, Maximus XI Hero, ASUS TUF RTX4080 OC, 32GB DDR4 3200 14, 1TB NVMe SSD, 500GB SSD, 1TB HDD, 40" Samsung 4K TV, Honeycomb Alpha & Bravo, Logitech Rudder Pedals, WIN11

Share this post


Link to post
Share on other sites

I don't know either.  I use some other lua files for other planes and they work fine.  I'll keep working on it.


John K
 

Share this post


Link to post
Share on other sites

Hi all,

sorry for jumping in....

It seems you use a kind of homecockpit. I'm in the building process of a biz jet cockpit based on G1000 like. My question is: How will you get the screens of the PFD and MFD on a monitor without using the VC?

There is no 2D cockpit to derive the 3 screens as I do it with the Mustang. I'd love to have also the Phenom in my home cockpit.

Thanks a lot,
Peter

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...