Jump to content

Sign in to follow this  
julian46

MU-2B LVARS - Linda or FSUIPC

Recommended Posts

Has anyone figured out the LVARS for binding lights (TAXI, LANDING, STROBE) and or Fuel / Engine controls to hardware ?

Share this post


Link to post
Share on other sites
Posted (edited)
5 hours ago, julian46 said:

Has anyone figured out the LVARS for binding lights (TAXI, LANDING, STROBE) and or Fuel / Engine controls to hardware ?

(L:MU2B_STROBE ,bool)                0 = Off, 1 = On

(L:MU2B_BEACON ,bool)               0 = Off, 1 = On

(L:MU2B_NAV ,bool)                      0 = Off, 1 = On

(L:MU2B_TAXI ,bool)                      0 = Off, 1 = On

(L:MU2B_SWITCH,bool)                Landing light     -1=retracted, 0=extended but Off, 1= On

For the first 4 switch sounds you can use (L:XMLSND71,n) where n = 0 for Off and n=1 for On. 

For the landing light, (L:XMLSND68,n) is the cockpit switch sound and (L:XMLSND67,n) is the motor sound that moves the lights. Again, n=0 for Off and n=1 for On.

In case something in this code might be helpful to you, the following Lua function will start the MU-2 engines provided you first select Ready to Start on the MU2 Control Panel; put condition Levers at Taxi position, and Throttles at Ground Idle. The code puts the props in Start Lock for the start, and takes props out of Start Lock after the start.

function MU2B_Start_Engs()  
  ipc.writeLvar("L:START_LOCK1",99)              -- Start Locks on
  ipc.writeLvar("L:START_LOCK2",99)

--Start Right Engine
  ipc.writeLvar("L:SWITCH_GND_L", 1)             -- Ground start switch to the right engine (note SWITCH_GND_L=1 is for the right engine, there is no SWITCH_GND_R )
  ipc.writeLvar("L:GND_ON_R", 1)
  ipc.writeLvar("L:GND_ON_L", 0)
  ipc.writeLvar("L:NTS_RIGHT",1)                      -- Right Unfeather switch on
  ipc.writeLvar("L:SFE_R",1)                                -- Right Start fuel enrich on,  actually a dummy switch                   
  ipc.sleep (1000)
  ipc.writeLvar("L:C441_STARTER2", 1)            -- Right engine starter switch down
  ipc.sleep (8000)
  ipc.writeLvar("L:C441_STARTER2", 0)            -- Right engine starter switch up
  ipc.writeLvar("L:NTS_RIGHT",0)                      -- Right Unfeather switch off
  ipc.writeLvar("L:SFE_R",0)                               -- Right Start fuel enrich off
-- Gen reset
  ipc.sleep (1000)
  ipc.writeLvar("L:SWITCH_GND_L", 0)             -- Ground start switch to the center
  ipc.writeLvar("L:GND_ON_R", 0)
  ipc.sleep(1000)
  ipc.writeLvar("L:DC_RH",1)                               -- Reset right DC Generator
  ipc.sleep(500)
  ipc.writeLvar("L:DC_RH",0)
  ipc.sleep(2000)

-- Start Left Engine
  ipc.writeLvar("L:SWITCH_GND_L", -1)             -- Ground start switch to the left engine
  ipc.writeLvar("L:GND_ON_L", 1)
  ipc.writeLvar("L:GND_ON_R", 0)
  ipc.writeLvar("L:NTS_LEFT",1)                          -- Left Unfeather switch on
  ipc.writeLvar("L:SFE_L",1)                                 -- Left Start fuel enrich on;  actually a dummy switch
  ipc.sleep (1000)
  ipc.writeLvar("L:C441_STARTER1", 1)            -- Left engine starter switch down
  ipc.sleep (8000)
  ipc.writeLvar("L:C441_STARTER1", 0)            -- Left engine starter switch up
  ipc.writeLvar("L:NTS_LEFT",0)                        -- Left Unfeather switch off
  ipc.writeLvar("L:SFE_L",0)                               -- Left Start fuel enrich off
-- Gen reset
  ipc.sleep (1000)
  ipc.writeLvar("L:SWITCH_GND_L", 0)             -- Ground start switch to the center
  ipc.writeLvar("L:GND_ON_L", 0)
  ipc.writeLvar("L:GND_ON_R", 0)
  ipc.sleep(1000)
  ipc.writeLvar("L:DC_LH",1)                              -- Reset left DC Generator
  ipc.sleep(500)
  ipc.writeLvar("L:DC_LH",0)
--Start Lock Off
  ipc.writeLvar("L:START_LOCK1",50)              -- Start Locks off
  ipc.writeLvar("L:START_LOCK2",50)
  return
end

Al

Edited by ark
  • Like 1

Share this post


Link to post
Share on other sites

here is my humble start to the MU-2B lua script - if anyone has a more complete one - pls let me know:


if ipcPARAM == 1 then  
  ipc.writeLvar("L:MU2B_SWITCH",1)              -- Land Light On
  return
elseif ipcPARAM == 2 then
  ipc.writeLvar("L:MU2B_SWITCH",-1)             -- Land Light Off
  return
end


I re-read earlier posts and found that in my small example above, now - sending parameter 1 triggers first command (lights on) and parameter 2 (lights off) - so on my way - mainly want to control lights at the point

(also found that ipcPARAM and lua is case sensitive)

hmmm - it moves the levers but the lights do not actually turn on and off - more work to do ...

 

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

    AVSIM's 2020 Fundraising Goal

    Donate to our annual general fundraising goal. This donation keeps our doors open and providing you service 24 x 7 x 365. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. We reset this goal every new year for the following year's goal.


    28%
    $7,075.00 of $25,000.00 Donate Now
×
×
  • Create New...