Jump to content
The simFlight Network Forums

jr2mey

Members
  • Posts

    15
  • Joined

  • Last visited

Posts posted by jr2mey

  1. Sorry John, I guess that I am not phrasing my question correctly. Or maybe I am and I am missing something in reading the documentation. 

    examples:

    event.offset(0x2744,"UB","FIRE_APU")  -- I know this monitors offset 2744 at the byte level for any changes and only performs the assigned function when a change has occurred.

    For LUA globals, I am not seeing event monitor for changes in globals to perform an assigned function.

    I know that i can use ipc.get(global) and do successfully change its value across a network.

    But what I would like to do is execute either a macro or lua script function, based on a change in global value, without having to use a polling timer. Or am I being completely dense here.

    I hope that makes better sense of what I am wanting to achieve. I do read your manuals at nauseum.... Pete beat that into my head... 🤣 ..

     

  2. Hello,

    I am curious to know if it's possible to use the IPC.SET() to create a global on a client computer and have it read on the server computer to initiate a macro or lua script without having to use a polling timer.

    Looking over the event lua library, I am not seeing one that I can use to monitor globals or any changes to them.

     

    Thanks much,

    James Twomey

     

     

  3. Hello all,

    I have a question as to whether or not I am able to use FSUICP7 to create a LUA script that calls upon a dll file.  What I am wanting to do is use my simulators current Flight Deck Solution boards which use TekWorx interfaceITAPI x64 dll file and integrate them with PMDG 737 in MSFS2020 via a LUA script in FSUICP.

    Currently I have not been able to find anything out there to make my boards usable with MSFS2020 and I really am trying to prevent having to spend a bunch more money and time to uninstall old boards and reinstall new boards.

    Thanks,

    James

  4. 45 minutes ago, John Dowson said:

    Ok, glad you got it working. Strange that you need a parameter of 2 to the 66300 control though, which is Toggle Starter1 - doesn't this work without that parameter?

    So, what I found when I use just the (66301) to attempt starting engine (2) all I get is a spin up and no N2 nor fuel flow.  I get the audible sound of an engine spinning up but no actual engine start is occurring.  I found the event (66300,2) from the FSUICP event logging console when having the auto start start the engines.  Now, when I put in the ipc.control (66300,2) before the ipc.control (66301), she fires off like a wild banshee. I am sure it is my plane having issues with the start procedure.  LOL

     

    50 minutes ago, John Dowson said:

    However, I am currently working on functionality to let the user add any of these additional simvars to a free (for user use) offset.
    This should be available in the next FSUIPC7 release, hopefully sometime next week.

    That is outstanding sir!  Look forward to it.

    Thank you again,

    James

  5. 1 hour ago, John Dowson said:

    I don't know.... Where do you see these controls? Do you know the associated control/event numbers? I could look into adding them if needed...Probably best to talk to Project Magenta / Enrico and get them to contact me for adding any new controls.

    Sorry John, I forgot to tell you that where I got those bleed control was in your FSUICP7 Offset status, page 118.

     

    James

  6. 48 minutes ago, John Dowson said:

    I can't really comment on your lua script as I don't know much about the PM offset areas (0x5400 -5FFF) - I have no information on what these hold. However, it does seem a little strange that you are only using event.offsetmask and event.offset functions, all calling the same function. So the function is only called when something triggers one of those offset to change - what is doing this?

    John

    Good Morning John...

    What I am attempting to do with my LUA script is to take the triggering of the overhead switches from PM and translate them over to MSFS2020 starting sequence. Apparently the PM aircraft operates under legacy. So I have learned that I was having an issue at how the 0B50 offset differs if your calling an airbus apu start or another jet aircraft apu start.  I guess airbus is special.. LOL

    Great news though, I got her to start correctly via the APU bleed. After I sorted out the 0B50 offset issue, I just needed to, for what ever reason, use IPC.Control (66300,2) then follow up with IPC.control (66301) to command the engine (2) to start.  I don't know why Microsoft has me do this, but it works!

    For the last ten years, I have always been use to working with FSUICP and offsets without an issue.  Now I am looking at having to learn HTLM, Lua and what the darnation LVARS and HVARS are... LOL

    Thank you for continuing to develop FSUICP... great great product!

     

    James

  7. Hello all,

     

    Is there anyone who is using Project Magenta 738 with MSFS2020?  I am trying to find out how I can write a script to bleed start my engines.  This is the only hickup so far in trying to get my simulator up and running in MSFS2020.  I have included a lua script that is my attempt at trying to get my Project Magenta 738 started by way of APU...  Why have a simulator if all you can do is press Ctrl-E..  LOL

    I have used all of the offset settings for offset 0B50 and none of them get my engines turning.

     

    I see that there is some working but not yet added event controls associated with engine bleed and APU bleed.

    BLEED AIR APU

    BLEED AIR ENGINE 

    APU BLEED PRESSURE RECEIVED BY ENGINE

      DO I need to have these events working for my 737 to start up?

     

    Also, when looking at my script, please know that I am learning how to write LUA.

     

    Kind Regards,

    James 

    A_engStarts.lua

  8. Hi Paul,

     

    Thank you for the reply. I have completed your video guide for beginners and even have put together some neat learning scripts that manipulate switches and read korry lights. 

     

    I will have a good look at the BC005:Goup Offset.  I have been using the BC004: Writing to Offset to try and push the value 51 to offset 5070,1 but when using the program FSintrerrogatstd2, it only shows a "1" and nothing happening within my flight deck.  

    I will go over the BC005 thoroughly. Thank you for the guidance and I will report back if I have success.

     

    James

     

  9. Hello,

    I am looking for an example to follow for writing a value to a bit in C# for project magenta.

    To cause a engine fire failure in engine #1, Project Magenta stipulates that  "Failures Variable 0x5750 1 FailureCode, one byte offset, value 51, must be used".

    In the users guide I am not seeing the example that I could try and use. Do I need to see an optometrist again so soon? LOL

    My eventual goal is to develop a random failures generator for my flight deck that matches everything in my QRH manual. This would be so useful since I fly alone most of the time and an Project Magenta instructor station is just much more than I can use.

    Also, Very much learning to write code.

    James

  10. 3 hours ago, jr2mey said:

    Both Comp1 and Comp2 are individual computers both running wide client ver 6.999v4.  P3DV4 on a completely different computer from where these scripts are being used, is running FSUICP Ver 5.14.

    This error is now corrected. Now all wide client computers running Ver 7.156 and FSUICP is Ver 5.15.  I really thought i had updated all computers. The previous sentence is why I never like to ask questions on the forums; it shows my stupid for all to see... LOL

    Still having the same issue however.  I know its something I am doing wrong.

  11. 31 minutes ago, Pete Dowson said:

    Yes,  But check that you have WideLuaGlobals=Yes in the [General] section of the FSYUPIC INI file.

    Hello Sir, Yes I have checked the WideLuaGlobals=Yes in the General section and it is marked with yes.

     

    33 minutes ago, Pete Dowson said:

    How are you loading the COMP1 lua (I assume that's the flight sim one?). The one loaded by WideClient will run directly WideClient connects.

    I should better clarify.  Both Comp1 and Comp2 are individual computers both running wide client ver 6.999v4.  P3DV4 on a completely different computer from where these scripts are being used, is running FSUICP Ver 5.14.  Am I required to initiate the global from FSUICP or can I "ipc.set" a global in one wide client computer and "ipc.get" a global on another wide client computer?

    Does that help clarify or confuse more?

     

    42 minutes ago, Pete Dowson said:

    This line in COMP2 is redundant:

    Depart=ipc.get("Depart")

    Thank you sir.  I cleaned that portion out.  It was getting too late at night when I was putting together this question in the forum.

    By the way.  Been using your applications since fs9 came out.  Just want to take a second and thank you for the years of use I have gotten from your work and where it has brought my simulator in the level of realism. Thank you. 

  12. Hello,

    Learning LUA.

    Did I read it correctly that with ipc.set and ipc.get I can set a set and read a lua global and have it read across client computers?

    If so, I haven't been able to accomplish this with rudimentary script below.  I can achieve it if done on the same client computer, but not across PC's.

    The computers I use have been a working stable platform in my 737 sim for many years using FSUICP and wideclient.  So my thoughts are that I am not writing the script correctly or that the global isn't able to be sent from one computer to another.

     

    Example:

    COMP1

    ipc.set("Depart",0)

    function Gate ()

        pwr=ipc.readUB(0x562A)
        extpwravail=logic.And(pwr,1)                            -- (1) External power available
        
        SeatBeltOn=ipc.readUB(0x5640)>=1

        if (extpwravail==1) and (SeatBeltOn) then
            ipc.control(66695)
            ipc.sleep(500)    
            ipc.display("Boarding in progress", 3, 15)            
            ipc.set("Depart",1)
        end
    end

    event.offsetmask(0x562A,1,"UB","Gate")         -- Extpwravail
    event.offset(0x5640,"UB","Gate")            -- SeatBelts

     

     

    COMP2

    Depart=ipc.get("Depart")
    function xcomm ()

        com=ipc.get("Depart")

        call=ipc.readUB(0x5646)                    
        callgnd=logic.And(call,1)~=0                -- (1) ground call button. bit 1

        if  (com==1) and (callgnd) then
            sound.play("comck")
        end
    end     

    event.offsetmask(0x5646,1,"UB","xcomm")               -- (1) ground call 1

     

     

     

     

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.