Results 1 to 9 of 9
  1. #1
    10+ Posting Member
    Join Date
    Mar 2010
    Location
    Reinbek
    Posts
    11
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    OC USB output card

    hi all,

    would it be possiible to do the inputs via joystick and mangage the outputs via above card and FSUIPC. I build an FMC for PMDG 747 and do the inputs via Leo Bodnard BUO...

    Example: button 1 = AP
    press AP on my FMC - AP is on shows active green on the Monitor, but not on the FMC as there are no pssibilities to add an LED. Could it work with the OC outputcard??

    thanks in advance
    best regards
    CJK

  2. #2
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Dec 2008
    Location
    Denmark
    Posts
    5
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC USB output card

    I have the same problem, and I have donw some research. Here is what i have found:

    PMDG does not use the default FS options for MCP functionality, so to map the correct function, eg. the state of HDG SEL you need a special variable from the PMDG_747400_Main.DLL, read through a FSUIPC .lua file. I did a test with PMDG J-41, selecting AP HDG ON, and then killing all electrical power. This switched the HDG LED off, and returned a .lua L.var called coamingAPHDG=0. So these "L.vars" seem to fully obey the PMDG cockpit logic.



    If there is some way to send these variable from FSUIPC to SIOC, it can be done.
    I have tried to search for documentation on the issue, but found none. As far as I know SIOC only reads standard FSUIPC variables in the $XXXX,length format.

    Perhaps there is another way to send FSUIPC vars to the board, bypassing SIOC?

  3. #3
    500+ This must be a daytime job 737NUT's Avatar
    Join Date
    Feb 2006
    Location
    Indianapolis, IN
    Posts
    761
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC USB output card

    Use the Joy or Key press sioc function then set-up FSUIPC to activate your Lua variable thru fsuipc. Thats how i do it.

  4. #4
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Dec 2008
    Location
    Denmark
    Posts
    5
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC USB output card

    thanks for the quick reply! I will try that out.

  5. #5
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Dec 2008
    Location
    Denmark
    Posts
    5
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC USB output card

    If anybody should be interested, there an example on how to send the state of L:vars via FSUIPC to SIOC. It can be used to trigger LEDs.

    1. The L:vars are gathered with Peter Dowsons log lvars.lua script.
    2. The relevant L:vars are then stored in a 0x0000 format offset in a .lua script, that runs in the background and continuously updates the offsets. For the J41 coaming panel it could look something like this:

    while 1 do

    --store the value that is read from the L:vars:
    attgetred = ipc.readLvar("L:CoamingAttGetRed")
    attgetyellow = ipc.readLvar("L:CoamingAttGetYellow")
    aphdg = ipc.readLvar("L:CoamingAPHDG")
    apnav = ipc.readLvar("L:CoamingAPNAV")
    apapr = ipc.readLvar("L:CoamingAPAPR")
    apalt = ipc.readLvar("L:CoamingAPALT")
    apaltsel = ipc.readLvar("L:CoamingAPALTSEL")
    apvs = ipc.readLvar("L:CoamingAPVS")
    apias = ipc.readLvar("L:CoamingAPIAS")
    apsby = ipc.readLvar("L:CoamingAPSBY")

    --write the stored value to 0x0000 format offsets that SIOC can read:
    ipc.writeUB("6300", attgetred)
    ipc.writeUB("6301", attgetyellow)
    ipc.writeUB("6302", aphdg)
    ipc.writeUB("6303", apnav)
    ipc.writeUB("6304", apapr)
    ipc.writeUB("6305", apalt)
    ipc.writeUB("6306", apaltsel)
    ipc.writeUB("6307", apvs)
    ipc.writeUB("6308", apias)
    ipc.writeUB("6309", apsby)

    -- the ipc.display section can be used for testing purposes or deleted:
    ipc.display

    ("attgetred="..attgetred.."\nattgetyellow="..attgetyellow.."\naphdg="..aphdg.."\napapr="..apapr.."\napalt="..apalt.."\napaltsel="..apaltsel.."\napvs="..apvs.."\napias="..apias.."\napsby="..apsby)

    ipc.sleep(50)

    end

    3. the ipc.display feature is used th check that the L:vars are correct. In the picture the "attgetred"
    and "attgetyellow" are alternating 0 and 1, following the warnings in the PMDG J41 cockpit.
    4. A feature in FSUPIC that reads offset states are used to check that the L:var is actually put into the offset. In the picture offset 6300 and 6301 are also alternating 0 and 1, because L:vars of the red and yellow warning lights are are stored.
    5. in SIOC, LEDs on the USB outputs card can be assigned to the offsets.


  6. #6
    25+ Posting Member
    Join Date
    Feb 2008
    Location
    Italy
    Posts
    70
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC USB output card

    Hi,

    I'm interested to appication of LUA to my home cockpit b737 PMDG. It's possible by LUA read the status of annunciators of the B737 PMDG Overhead Panel ?

    Also what's exactly LUA and what's his use?

    Many thanks
    Arnaldo

  7. #7
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Dec 2008
    Location
    Denmark
    Posts
    5
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC USB output card

    Hi Arnaldo

    LUA is a programming language. It can be used to make small scripts to load in FSUIPC. It allows us to read and write variables that are normally out of reach, for instance the status of annunicators.
    First you will need to buy FSUIPC to be able to use it.
    Then you can load a LUA script (like the one I posted below) to get the B737 annunicator status (called L:vars)
    The same LUA script can send this info to SIOC, a piece of software that runs outside FS and controls USB outputs.
    Hope this helps!

  8. #8
    25+ Posting Member
    Join Date
    Feb 2008
    Location
    Italy
    Posts
    70
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC USB output card

    Hi

    I know FSUIPC because most of my commands on my cockpit are made by Fsuipc macro, keyboard multiple ecc. ecc. So I know it quite well.
    I know also SIOC. I made some commands by a SIOC script.
    Now I would integrate it with Lua scripts for lighting up my annunciators on Overhead.
    The question is how assign a macro mouse command (I yet have on my FSUIPC) to a Lua Variable and than to SIOC script?
    I started to study many Lua script and example on Fsuipc forum, but it's no yet very clear how to interface Lua and Fsuipc.

    thanks
    Arnaldo

  9. #9
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Dec 2008
    Location
    Denmark
    Posts
    5
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: OC USB output card

    Hi Arnaldo

    I am not sure you should use a mouse macro. As I understand it, mouse macros are used when you need to interact with FS. Annunicators sometime come on by themselves, which is why I have made the LUA script posted in this thread. It picks up the annunicator state when the script is running (it reads a L:var inside FS) and send it directly to an offset that SIOC reads. You can assign a key in FSUIPC to run the LUA script.

    So the key is to find L:vars for the PMDG B737 annunicators. I don´t have it installed at the moment so I can´t test if there are L:vars for the annunicators, but FSUIPC has a function to scan for L:vars.Then you can edit the script I posted above to use with your L:vars.

    kind regards,
    Ole

Similar Threads

  1. opencockpits usb output card prob?
    By jonnydaz53 in forum OpenCockpits General Discussion
    Replies: 22
    Last Post: 03-15-2013, 04:32 AM
  2. Which output card for homebuilt steam instruments?
    By AK Mongo in forum I/O Interfacing Hardware and Software
    Replies: 6
    Last Post: 02-13-2011, 03:39 PM
  3. opencockpits master card j2 output qestion
    By spiro in forum OpenCockpits General Discussion
    Replies: 1
    Last Post: 11-05-2009, 03:33 PM
  4. Open Cockpits Output Card
    By Michael Carter in forum I/O Interfacing Hardware and Software
    Replies: 7
    Last Post: 01-12-2009, 10:26 AM
  5. Which Input/Output Card
    By Holclo in forum I/O Interfacing Hardware and Software
    Replies: 9
    Last Post: 02-27-2008, 07:30 AM