Jump to content
The simFlight Network Forums

roarkr

Members
  • Content Count

    41
  • Joined

  • Last visited

Everything posted by roarkr

  1. Hi, Thanks for replying. I will try it.
  2. Hi, I am using P3Dv4 with FSUIPC 5 and have a PMDG B737NGX home cockpit based on Opencockpits hardware modules and my OC4BAv4 home cockpit program. This is my controller that should all be connected all the time. 1. Saitek x52 2. Saitek Rudder 3. Opencockpits B737 Yoke 4. CFY Throttle When I use my home cockpit and fly the B737NGX, I use the Opencockpits Yoke, Saitek Rudder and CFY Throttle. When I just fly in P3Dv4 using my 4K monitor (not my home cockpit setup) I only want to use my Saitek X52 for both PMDG B737NGX and other airplanes. Now my question: How do I set up the controllers to have a working controller scenario that let my use them as described above?
  3. Thanks, I have tried with this SimConnect variable, but can't get any values when moving the throttle lever. In FSUIPC the offset is S16 type, shouldn't it then in SImConnect be a INT32 datatype? It also says unit is Precent over 100. Are you doing any calculation of the SImConnect variable from precent to the -4096 tp 16384 value range before adding to the offset 088C?
  4. Looking in the "FSUIPC4 Status of IPC Offsets for FSX" list you state that the offset 088C for TQ Lever position is a "Ok-SimC works okay using SimVars". Does this means that it is a variable that is defined and can be used directly with SimConnect without FSUIPC? If so, can you tell med the name of the SimConnect variable you are using to get the value to the FSUIPC offset 088C? I can't find it in the SimConnect documentation, that's the reason for my question.
  5. Hi, I have developed an interface app for Opencockpits hardware to be used with Aerosoft's new Airbuses. I have partly used Lua scripting and FSUIPC offsets and need an offset range like 66C0 - 66FF for this app so it doesn't interfere with other usage. I am using the free offset 66C0 - 66FF now, but some users do have some problems as they also run other apps that uses some of these free offsets. I read in the doc that you could provide developers with that if they contacted you. Can you provide that? Roar
  6. hi, just wanted to inform you that a beta version of my OCP4NGX app for interfacing OpenCockpits MCP has been sent to OpenCocpits for test and verification. You can read and write everything that is in the SDK. ( today only MCP is implemented) This is in agreement and permission of PMDG. More modules will be incorprated later together with the future 777 and 747 if those SDK become available. It is freeware. Release will be soon.
  7. Hi Pete, I'm almost ready with my new OpenCockpits IOCP Client for NGX based on the new NGX SDK, but need to make it a little more efficient. You mentioned in this thread some time ago that using a loop for the CallBack MyDispatchProc was not recommended, but instead: " The method I recommend is to use Simconnect_Open with your message-only (HWND_MESSAGE class) Window handle as the 3rd parameter and a user message number defined by you as the 4th parameter. Then you call "CallDispatch" when you receive that message. This is bay far the most efficient method." Could you specify this in more detail as I can't figure out the coding for that. rgs Roar
  8. Hi, That fine, hope it doesn't drag out for months. For me the best solution will be using FSUIPC4 together with LUA scripts, so I wait for it. rgs
  9. Hi Pete, I have started to modify an IOCP Client C++ module I got from lekseecon.com in order to connect my OpenCockpits modules to the NGX plane. After some time struggling with this approach, I now see this will a huge development task and at the same time I'm more and more believing that a solution based on FSUIPC4 offsets and LUA scripting will be much easer to implement, but then I need the NGX SDK variables to be connected to FSUIPC4 offsets. In order to decide which way to go I wonder if you now have heard from PMDG regarding the EULA concern you had and if you still are planning to make the NGX variables available as FSUIPC4 offsets. rgs, Roar
  10. Hi I have downloaded your PMDGWrapper to see if I can use some of your coding in a IOCP Client C++ I am coding to interface my Opencockpits hardware modules. As I am not a professional C++ programmer I don't know what the wrapper really is and what it actually does. Could you explain a little for us "hobby" programmers? What I really need is a call from your wrapper dll ( if I understand it right) to a function in my C++ whenever there is a change between old and new values of the PMDG data. This call should have both the varname and the value. I have a hard time to find out what is the ins and what is the outs in this dll of if it can be used. Maybe I am totally misunderstanding it. Do you have any idea of how this could be done? rgs
  11. Hi Pete, I don't know what your plans are about doing something for the PMDG NGX in your FSUIPC4 now that the SDK is available. As Nico don't wanna do a "lekseecon" for the PMDG NGX I have started to make my own " NGXCon" IOCP client to be used for the OpencCockpits SIOC environement. But, as I am not a "prof" programmer this can take some time before I'm ready. So to my question: Are you going to do what you said: "" I'm starting to wonder if it wouldn't be much tidier to forget the Lua way of doing it altogether, and just have an EXE program which gets the NGX data and posts them to assigned FSUIPC offsets, which can then be read by any Lua plug-ins, and other programs, even on a WideFS client. I would actually consider building this into FSUIPC (it is easy as it already has a working SimConnect interface),"" if so what and what is your timeframe? Then I could do the LUA scripting to get what I want and that is maybe the way to go instead of an dedicated IOCP client based on C++ ( which I need to learn better). rgs
  12. Hi, The way I have implemented this, yes. The OP sioc software is a event driven program. It does only execute code when a variable change value. Either a variable connected to a specific IOCARD input or a variable linked to a offset. rgs
  13. Hi, Here is an example of how to use events to detect offsets changes, both on bit level and whole words. Keep in mind that I'm not a programmer, so it maybe can be done better. rgs Roar -- PMDG 737 NGX LUA code for Opencockpits MCP to be used in FSUIPC -- File: NGXMCP_202 -- December 2011 -- Roar Kristensen --*************************************************************************************** -- ** System initial values set ** --*************************************************************************************** -- ** MCP initial values ** hdg_mode = 1 atarm = -1 crsl = 500 crsr = 500 spd = -1 hdg = -1 alt = -1 vsw = -1 MCP_N1 = -1 MCP_Speed = -1 MCP_LvlChg = -1 MCP_VNav = -1 MCP_LNav = -1 MCP_HdgSel = -1 MCP_AltHold = -1 MCP_CMDA = -1 MCP_CMDB = -1 MCP_CWSA = -1 MCP_CWSB = -1 MCP_VORLock = -1 MCP_App = -1 MCP_VS = -1 ipc.writeUB("66E8", 0) ipc.writeUB("66E9", 0) ipc.writeUB("66EA", 0) ipc.writeUB("66EB", 0) ipc.writeUB("66EC", 0) ipc.writeUB("66ED", 0) if ipc.readUB("66E4") == 1 and ipc.readLvar('ngx_switch_378_a') == 100 then ipc.control(70010, 536870912) ipc.control(70010, 131072) else if ipc.readUB("66E4") == 0 and ipc.readLvar('ngx_switch_378_a') == 0 then ipc.control(70010, 536870912) ipc.control(70010, 131072) end end if ipc.readUB("66E5") == 1 and ipc.readLvar('ngx_switch_380_a') == 100 then ipc.control(70012, 536870912) ipc.control(70012, 131072) else if ipc.readUB("66E5") == 0 and ipc.readLvar('ngx_switch_380_a') == 0 then ipc.control(70012, 536870912) ipc.control(70012, 131072) end end if ipc.readUB("66E6") == 0 and ipc.readLvar('ngx_switch_406_a') == 100 then ipc.control(70038, 536870912) ipc.control(70038, 131072) else if ipc.readUB("66E6") == 1 and ipc.readLvar('ngx_switch_406_a') == 0 then ipc.control(70038, 536870912) ipc.control(70038, 131072) end end if ipc.readUB("66E7") == 1 and ipc.readLvar('ngx_switch_407_a') == 100 then ipc.control(70039, 536870912) ipc.control(70039, 131072) else if ipc.readUB("66E7") == 0 and ipc.readLvar('ngx_switch_407_a') == 0 then ipc.control(70039, 536870912) ipc.control(70039, 131072) end end if crsl ~= ipc.readLvar("L:ngx_CRSwindowL") then crsl = ipc.readLvar("L:ngx_CRSwindowL") ipc.writeUW("66C0", crsl) end if spd ~= ipc.readLvar("L:ngx_SPDwindow") then spd = ipc.readLvar("L:ngx_SPDwindow") ipc.writeUW("66C2", spd) end if hdg ~= ipc.readLvar("L:ngx_HDGwindow") then hdg = ipc.readLvar("L:ngx_HDGwindow") ipc.writeUW("66C4", hdg) end if alt ~= ipc.readLvar("L:ngx_ALTwindow") then alt = ipc.readLvar("L:ngx_ALTwindow") ipc.writeUW("66C6", ipc.readLvar("L:ngx_ALTwindow") / 100) end --if ipc.readLvar("L:ngx_MCP_VS") == 1 then if vsw ~= ipc.readLvar("L:ngx_VSwindow") then vsw = -20000 ipc.writeSW("66D0", -20000) end if crsr ~= ipc.readLvar("L:ngx_CRSwindowR") then crsr = ipc.readLvar("L:ngx_CRSwindowR") ipc.writeUW("66CA", crsr) end --*************************************************************************************** -- ** Procedures for reading MCP windows and sending to SIOC via FSUIPC offsets**** --*************************************************************************************** function CRSL_show () crsl = ipc.readLvar("L:ngx_CRSwindowL") ipc.writeUW("66C0", crsl) end function SPD_show () spd = ipc.readLvar("L:ngx_SPDwindow") if spd > 1 then ipc.writeUW("66C2", spd) else spd = spd *100 ipc.writeUW("66C2", spd) end end function HDG_show () hdg = ipc.readLvar("L:ngx_HDGwindow") ipc.writeUW("66C4", hdg) end function ALT_show () alt = ipc.readLvar("L:ngx_ALTwindow") ipc.writeUW("66C6", alt / 100) end function VS_show () vsw = ipc.readLvar("L:ngx_VSwindow") ipc.writeSW("66C8", vsw) end function CRSR_show () crsr = ipc.readLvar("L:ngx_CRSwindowR") ipc.writeUW("66CA", crsr) end --*************************************************************************************** -- ** Procedures for finding changes in MCP windows and MCP function LEDs**** --*************************************************************************************** function run_update (time) if crsl ~= ipc.readLvar("L:ngx_CRSwindowL") then CRSL_show () end if crsr ~= ipc.readLvar("L:ngx_CRSwindowR") then CRSR_show () end if spd ~= ipc.readLvar("L:ngx_SPDwindow") then SPD_show () end if hdg ~= ipc.readLvar("L:ngx_HDGwindow") then HDG_show () end if alt ~= ipc.readLvar("L:ngx_ALTwindow") then ALT_show () end if vsw ~= ipc.readLvar("L:ngx_VSwindow") then VS_show () end if ipc.readLvar("L:ngx_MCP_ATArm") ~= atarm then atarm = ipc.readLvar("L:ngx_MCP_ATArm") ipc.writeUB("66F0", atarm) end if ipc.readLvar("L:ngx_MCP_N1") ~= MCP_N1 then MCP_N1 = ipc.readLvar("L:ngx_MCP_N1") ipc.writeUB("66F1", MCP_N1) end if ipc.readLvar("L:ngx_MCP_SPEED") ~= MCP_Speed then MCP_Speed = ipc.readLvar("L:ngx_MCP_SPEED") ipc.writeUB("66F2", MCP_Speed) end if ipc.readLvar("L:ngx_MCP_VNav") ~= MCP_VNav then MCP_VNav = ipc.readLvar("L:ngx_MCP_VNav") ipc.writeUB("66F3", MCP_VNav) end if ipc.readLvar("L:ngx_MCP_LvlChg") ~= MCP_LvlChg then MCP_LvlChg = ipc.readLvar("L:ngx_MCP_LvlChg") ipc.writeUB("66F4", MCP_LvlChg) end if ipc.readLvar("L:ngx_MCP_HdgSel") ~= MCP_HdgSel then MCP_HdgSel = ipc.readLvar("L:ngx_MCP_HdgSel") ipc.writeUB("66F5", MCP_HdgSel) end if ipc.readLvar("L:ngx_MCP_LNav") ~= MCP_LNav then MCP_LNav = ipc.readLvar("L:ngx_MCP_LNav") ipc.writeUB("66F6", MCP_LNav) end if ipc.readLvar("L:ngx_MCP_VORLock") ~= MCP_VORLock then MCP_VORLock = ipc.readLvar("L:ngx_MCP_VORLock") ipc.writeUB("66F7", MCP_VORLock) end if ipc.readLvar("L:ngx_MCP_App") ~= MCP_App then MCP_App = ipc.readLvar("L:ngx_MCP_App") ipc.writeUB("66F8", MCP_App) end if ipc.readLvar("L:ngx_MCP_AltHold") ~= MCP_AltHold then MCP_AltHold = ipc.readLvar("L:ngx_MCP_AltHold") ipc.writeUB("66F9", MCP_AltHold) end if ipc.readLvar("L:ngx_MCP_VS") ~= MCP_VS then MCP_VS = ipc.readLvar("L:ngx_MCP_VS") ipc.writeUB("66FA", MCP_VS) end if MCP_CMDA ~= ipc.readLvar("L:ngx_MCP_CMDA") then MCP_CMDA = ipc.readLvar("L:ngx_MCP_CMDA") ipc.writeUB("66FB", MCP_CMDA) end if MCP_CWSA ~= ipc.readLvar("L:ngx_MCP_CWSA") then MCP_CWSA = ipc.readLvar("L:ngx_MCP_CWSA") ipc.writeUB("66FC", MCP_CWSA) end if MCP_CMDB ~= ipc.readLvar("L:ngx_MCP_CMDB") then MCP_CMDB = ipc.readLvar("L:ngx_MCP_CMDB") ipc.writeUB("66FD", MCP_CMDB) end if MCP_CWSB ~= ipc.readLvar("L:ngx_MCP_CWSB") then MCP_CWSB = ipc.readLvar("L:ngx_MCP_CWSB") ipc.writeUB("66FE", MCP_CWSB) end end --*************************************************************************************** -- ** MCP switches ******* --*************************************************************************************** function MCP_FD1(off,val) if ipc.readUB("66EF") == 7 then if val == 1 and ipc.readLvar('ngx_switch_378_a') == 100 then ipc.control(70010, 536870912) ipc.control(70010, 131072) else if val == 0 and ipc.readLvar('ngx_switch_378_a') == 0 then ipc.control(70010, 536870912) ipc.control(70010, 131072) end end end end function MCP_ATARM(off,val) if ipc.readUB("66EF") == 7 then if val == 1 and ipc.readLvar('ngx_switch_380_a') == 100 then ipc.control(70012, 536870912) ipc.control(70012, 131072) else if val == 0 and ipc.readLvar('ngx_switch_380_a') == 0 then ipc.control(70012, 536870912) ipc.control(70012, 131072) end end end end function MCP_DISENGAGE(off,val) if ipc.readUB("66EF") == 7 then if val == 0 and ipc.readLvar('ngx_switch_406_a') == 100 then ipc.control(70038, 536870912) ipc.control(70038, 131072) else if val == 1 and ipc.readLvar('ngx_switch_406_a') == 0 then ipc.control(70038, 536870912) ipc.control(70038, 131072) end end end end function MCP_FD2(off,val) if ipc.readUB("66EF") == 7 then if val == 1 and ipc.readLvar('ngx_switch_407_a') == 100 then ipc.control(70039, 536870912) ipc.control(70039, 131072) else if val == 0 and ipc.readLvar('ngx_switch_407_a') == 0 then ipc.control(70039, 536870912) ipc.control(70039, 131072) end end end end function MCP1(off, val) if logic.And(val, 0x0010) ~= 0 then N1 () elseif logic.And(val, 0x0020) ~= 0 then SPEED () elseif logic.And(val, 0x0040) ~= 0 then CO () elseif logic.And(val, 0x0080) ~= 0 then SPD_INTV () elseif logic.And(val, 0x0100) ~= 0 then VNAV () elseif logic.And(val, 0x0200) ~= 0 then LVLCHG () elseif logic.And(val, 0x0400) ~= 0 then HDGSEL () elseif logic.And(val, 0x0800) ~= 0 then HDG_BANK () elseif logic.And(val, 0x1000) ~= 0 then LNAV () elseif logic.And(val, 0x2000) ~= 0 then VORLOC () elseif logic.And(val, 0x4000) ~= 0 then APP () elseif logic.And(val, 0x8000) ~= 0 then ALT_INTV () end end function MCP2(off, val) if logic.And(val, 0x0001) ~= 0 then ALTHLD () elseif logic.And(val, 0x0002) ~= 0 then VS () elseif logic.And(val, 0x0004) ~= 0 then CMDA () elseif logic.And(val, 0x0008) ~= 0 then CWSA () elseif logic.And(val, 0x0010) ~= 0 then CMDB () elseif logic.And(val, 0x0020) ~= 0 then CWSB () end end --*************************************************************************************** -- ** MCP Dials ******** --*************************************************************************************** function CRSL_chg (off,val) if val == 255 then ipc.sleep(0) else if val > 0 then local i for i = 1, val do ipc.control(70008, 16384) ipc.sleep (5) end ipc.writeUB("66E8", 255) CRSL_show () else if val < 0 then val = val* -1 local i for i = 1, val do ipc.control(70008, 8192) ipc.sleep (5) end ipc.writeUB("66E8", 255) CRSL_show () else if val == 0 then ipc.writeUB("66E8", 0) end end end end end function SPD_chg (off,val) if val == 255 then ipc.sleep(0) else if val > 0 then local i for i = 1, val do ipc.control(70016, 16384) ipc.sleep (5) end ipc.writeUB("66E9", 255) SPD_show () else if val < 0 then val = val* -1 local i for i = 1, val do ipc.control(70016, 8192) ipc.sleep (5) end ipc.writeUB("66E9", 255) SPD_show () else if val == 0 then ipc.writeUB("66E9", 0) end end end end end function HDG_chg (off,val) if hdg_mode == 1 then if val == 255 then ipc.sleep(0) else if val > 0 then local i for i = 1, val do ipc.control(70022, 16384) ipc.sleep (5) end ipc.writeUB("66EA", 255) HDG_show () else if val < 0 then val = val* -1 local i for i = 1, val do ipc.control(70022, 8192) ipc.sleep (5) end ipc.writeUB("66EA", 255) HDG_show () else if val == 0 then ipc.writeUB("66EA", 0) end end end end else BANK_chg (off,val) end end function BANK_chg (off,val) if val == 255 then ipc.sleep(0) else if val > 0 then local i for i = 1, val do ipc.control(70021, -2147483648) ipc.control(70021, 524288) ipc.sleep (5) end ipc.writeUB("66EA", 255) else if val < 0 then val = val* -1 local i for i = 1, val do ipc.control(70021, 536870912) ipc.control(70021, 131072) ipc.sleep (5) end ipc.writeUB("66EA", 255) else if val == 0 then ipc.writeUB("66EA", 0) end end end end end function ALT_chg (off,val) if val == 255 then ipc.sleep(0) else if val > 0 then local i for i = 1, val do ipc.control(70032, 16384) ipc.sleep (5) end ipc.writeUB("66EB", 255) ALT_show () else if val < 0 then val = val* -1 local i for i = 1, val do ipc.control(70032, 8192) ipc.sleep (5) end ipc.writeUB("66EB", 255) ALT_show () else if val == 0 then ipc.writeUB("66EB", 0) end end end end end function VS_chg (off,val) if val == 255 then ipc.sleep(0) else if val > 0 then local i for i = 1, val do ipc.control(70033, 8192) ipc.sleep (5) end ipc.writeUB("66EC", 255) VS_show () else if val < 0 then val = val* -1 local i for i = 1, val do ipc.control(70033, 16384) ipc.sleep (5) end ipc.writeUB("66EC", 255) VS_show () else if val == 0 then ipc.writeUB("66EC", 0) end end end end end function CRSR_chg (off,val) if val == 255 then ipc.sleep(0) else if val > 0 then local i for i = 1, val do ipc.control(70041, 16384) ipc.sleep (5) end ipc.writeUB("66ED", 255) CRSR_show () else if val < 0 then val = val* -1 local i for i = 1, val do ipc.control(70041, 8192) ipc.sleep (5) end ipc.writeUB("66ED", 255) CRSR_show () else if val == 0 then ipc.writeUB("66ED", 0) end end end end end --*************************************************************************************** -- ** MCP buttons ************** --*************************************************************************************** function N1 () ipc.control(70013, 536870912) ipc.control(70013, 131072) end function SPEED () if ipc.readLvar("L:ngx_MCP_VNav") == 1 then -- go to SPD_INTV instead ipc.control(70019, 536870912) ipc.control(70019, 131072) else ipc.control(70014, 536870912) ipc.control(70014, 131072) end end function CO () ipc.control(70015, 536870912) ipc.control(70015, 131072) end function SPD_INTV () ipc.control(70019, 536870912) ipc.control(70019, 131072) end function ALT_INTV () ipc.control(70517, 536870912) ipc.control(70517, 131072) end function HDG_BANK () -- toggling HDG / BANK (1/2) -- HDG = 1, BANK = 2 hdg_mode = 3 - hdg_mode end function VNAV () ipc.control(70018, 536870912) ipc.control(70018, 131072) end function LVLCHG () ipc.control(70023, 536870912) ipc.control(70023, 131072) end function HDGSEL () ipc.control(70024, 536870912) ipc.control(70024, 131072) end function LNAV () ipc.control(70029, 536870912) ipc.control(70029, 131072) end function VORLOC () ipc.control(70028, 536870912) ipc.control(70028, 131072) end function APP () ipc.control(70025, 536870912) ipc.control(70025, 131072) end function ALTHLD () if ipc.readLvar("L:ngx_MCP_VNav") == 1 then -- go to ALT_INTV instead ipc.control(70517, 536870912) ipc.control(70517, 131072) else ipc.control(70026, 536870912) ipc.control(70026, 131072) end end function VS () ipc.control(70027, 536870912) ipc.control(70027, 131072) end function CMDA () ipc.control(70034, 536870912) ipc.control(70034, 131072) end function CMDB () ipc.control(70035, 536870912) ipc.control(70035, 131072) end function CWSA () ipc.control(70036, 536870912) ipc.control(70036, 131072) end function CWSB () ipc.control(70037, 536870912) ipc.control(70037, 131072) end --*************************************************************************************** -- ** Routines to detect MCP buttons and dials changes ** --*************************************************************************************** event.offset(0x66E4, "UB", "MCP_FD1") event.offset(0x66E5, "UB", "MCP_ATARM") event.offset(0x66E6, "UB", "MCP_DISENGAGE") event.offset(0x66E7, "UB", "MCP_FD2") event.offset(0x66E0, "UW", "MCP1") event.offset(0x66E2, "UW", "MCP2") event.intercept(0x66E8, "SB", "CRSL_chg") event.intercept(0x66E9, "SB", "SPD_chg") event.intercept(0x66EA, "SB", "HDG_chg") event.intercept(0x66EB, "SB", "ALT_chg") event.intercept(0x66EC, "SB", "VS_chg") event.intercept(0x66ED, "SB", "CRSR_chg") --*************************************************************************************** -- ** Timer for MCP diplays and LED update --*************************************************************************************** event.timer(100, "run_update")
  14. Hi, I have made some lua files that interfaces the PMDG NGX's MCP and EFIS. This was done before the SDK came out. The part interfacing the PMDG NGX via Lvars, ipc.control and ipc.read/write commands are controlled by sioc scripts ( I am using Opencockpits hardware). I am now thinking of writing a C++ program, but I need to study the interface simconnect and C++ a little bit more and also other parts. Why is there any need for FSUIPC4 now that the SDK is available? I had to use FSUIPC before the SDK was available. What I understand is that you need the C++ (dll) to interface PMDG through simconnect and in my case also interface/translate to sioc "language". But, in order to do this, I need to study a little bit more. I don't have any problem using FSUIPC, but to me using SIOC, C++(dll), SImconnect and FSUIPC incl LUA seems to complicated. There must be an easier way of doing this or? rgs
  15. To Pete or others, I need some help on how to write a small effective LUA code to send different ipc.control commands based on bit value changes in an user offset. I have the 2word offset $66E0 sent to FSUIPC whenever there is bit value change of any of the 32 bits ( when turning switches and pushing buttons on my MCP) by SIOC. with event.offset(0x66E0, "UD", "MCP") I call a MCP function. Thereafter I want i.e. to do a specific ipc.control when bit 3 in $66E0 changes from 0 to 1 and another ipc.control when same bit changes from 1 to 0. The same should be valid for all 32 bits in this offset. What I want is: if bit "0" changes from 0 to 1 then ipc.control X if bit "0" changes from 1 to 0 then ipc.control Y and so on for all 32 bits Any ideas on how to do this? I can't find any ipc.read command that just test a bit, i.e IF_BIT($66E0, 3)
  16. OK, I understand your code. Now I can rewrite my LUA. Thanks for your fast feedback. Roar K
  17. Hi, Is there anyone with some LUA programming experience who can propose a better and more effective way than my example below. I write the Lvars value to offsets in every loop , even when the LVars have not changed, but should instead only want to write to FSUIPC offsets when Lvars have been changed. regards, Roar Kristensen ------- while 1 do --store the value that is read from the NGX L:vars: mcpspdw = ipc.readLvar("ngx_SPDwindow") mcphdgw = ipc.readLvar("ngx_HDGwindow") mcpaltw = ipc.readLvar("ngx_ALTwindow") mcpvsw = ipc.readLvar("ngx_VSwindow") mcpcrs1w = ipc.readLvar("ngx_CRSwindowL") mcpcrs2w = ipc.readLvar("ngx_CRSwindowR") mcpatal = ipc.readLvar("ngx_MCP_ATArm") mcpfd1s = ipc.readLvar("ngx_MCP_FDLeft") mcpfd2s = ipc.readLvar("ngx_MCP_FDRight") mcpvnavl = ipc.readLvar("ngx_MCP_VNav") mcplnavl = ipc.readLvar("ngx_MCP_LNav") mcpvorl = ipc.readLvar("ngx_MCP_VORLock") mcpn1l = ipc.readLvar("ngx_MCP_N1") mcpspdl = ipc.readLvar("ngx_MCP_Speed") mcplvll = ipc.readLvar("ngx_MCP_LvlChg") mcphdgl = ipc.readLvar("ngx_MCP_HdgSel") mcpappl = ipc.readLvar("ngx_MCP_App") mcpalthl = ipc.readLvar("ngx_MCP_AltHold") mcpvsl = ipc.readLvar("ngx_MCP_VS") mcpcmdal = ipc.readLvar("ngx_MCP_CMDA") mcpcmdbl = ipc.readLvar("ngx_MCP_CMDB") mcpcswal = ipc.readLvar("ngx_MCP_CSWA") mcpcswbl = ipc.readLvar("ngx_MCP_CSWB") --write the stored value to 0x0000 format offsets that SIOC can read: ipc.writeUW("66C0", mcpcrs1w) ipc.writeUW("66C2", mcpspdw) ipc.writeUW("66C4", mcphdgw) ipc.writeUW("66C6", mcpaltw) ipc.writeUW("66C8", mcpvsw) ipc.writeUW("66CA", mcpcrs2w) ipc.writeUB("66CC", mcpfd1s) ipc.writeUB("66CD", mcpn1l) ipc.writeUB("66CE", mcpatal) ipc.writeUB("66CF", mcpspdl) ipc.writeUB("66D0", mcplvll) ipc.writeUB("66D1", mcpvnavl) ipc.writeUB("66D2", mcphdgl) ipc.writeUB("66D3", mcpappl) ipc.writeUB("66D4", mcpvorl) ipc.writeUB("66D5", mcplnavl) ipc.writeUB("66D6", mcpalthl) ipc.writeUB("66D7", mcpvsl) ipc.writeUB("66D8", mcpcswal) ipc.writeUB("66D9", mcpcmdal) ipc.writeUB("66DA", mcpcswbl) ipc.writeUB("66DB", mcpcmdbl) ipc.writeUB("66DC", mcpfd2s) ipc.sleep(50) end
  18. Hi, For Pete or others, I have now a fully working Opencockpit MCP integrated with PMDGNGX. All switches, dials and displays are working, but.. Turning the dial(knob) for i.e. the CRS1 ( the same is valid for SPD, HDG, ALT, VS and CRS2) results in delayed feedback ( displaying the numbers in the CRS1 window on the OC MCP compared to the CRS1 window in PMDGNGXs MCP) from FSUIPC via LUA script and my SIOC script ( the Opencockpits software). This is valid when I turn the dial in a fast way. It always ends up with the same number in both windows ( PMDG MCP and OC MCP), so everything is correct. When turning the dial slow everything is in sync, but also here the delay is about 1/2 second ( from a number turns up on PMDG MCP until the same number turns up on OC MCP. I guess it is more of a delay than sync problem. The SIOC script is not the delaying party in my view. Is there a way I can adjust either FSUIPC, LUA to make the sync problem less visible when turning the dials in a fast way? I am running the latest FSUIPC for FSX. I have a fast I7 2600K running 4,4Ghz. The program involed in my setup is FSX- FSUIPC ( and LUA) - SIOC. IN short I set switches and dial CRS etc. with keystrokes, then reads the Lvars from PMDGNGX, and display them on my OC MCP via SIOC. In this way my OC MCP is both a master and slave relative to the PMDGNGX. This because I have not found any way to write LVars into PMDGNGX. My implemetation could sure be better, but this is my first attempt to work with FSUIPC, LUA and SIOC and it works. Any suggestion to make it better are welcomed. My LUA file PMDGNGX: while 1 do --store the value that is read from the NGX L:vars: mcpspdw = ipc.readLvar("ngx_SPDwindow") mcphdgw = ipc.readLvar("ngx_HDGwindow") mcpaltw = ipc.readLvar("ngx_ALTwindow") mcpvsw = ipc.readLvar("ngx_VSwindow") mcpcrs1w = ipc.readLvar("ngx_CRSwindowL") mcpcrs2w = ipc.readLvar("ngx_CRSwindowR") mcpatal = ipc.readLvar("ngx_MCP_ATArm") mcpfd1s = ipc.readLvar("ngx_MCP_FDLeft") mcpfd2s = ipc.readLvar("ngx_MCP_FDRight") mcpvnavl = ipc.readLvar("ngx_MCP_VNav") mcplnavl = ipc.readLvar("ngx_MCP_LNav") mcpvorl = ipc.readLvar("ngx_MCP_VORLock") mcpn1l = ipc.readLvar("ngx_MCP_N1") mcpspdl = ipc.readLvar("ngx_MCP_Speed") mcplvll = ipc.readLvar("ngx_MCP_LvlChg") mcphdgl = ipc.readLvar("ngx_MCP_HdgSel") mcpappl = ipc.readLvar("ngx_MCP_App") mcpalthl = ipc.readLvar("ngx_MCP_AltHold") mcpvsl = ipc.readLvar("ngx_MCP_VS") mcpcmdal = ipc.readLvar("ngx_MCP_CMDA") mcpcmdbl = ipc.readLvar("ngx_MCP_CMDB") mcpcswal = ipc.readLvar("ngx_MCP_CSWA") mcpcswbl = ipc.readLvar("ngx_MCP_CSWB") --write the stored value to 0x0000 format offsets that SIOC can read: ipc.writeUW("66C0", mcpcrs1w) ipc.writeUW("66C2", mcpspdw) ipc.writeUW("66C4", mcphdgw) ipc.writeUW("66C6", mcpaltw) ipc.writeUW("66C8", mcpvsw) ipc.writeUW("66CA", mcpcrs2w) ipc.writeUB("66CC", mcpfd1s) ipc.writeUB("66CD", mcpn1l) ipc.writeUB("66CE", mcpatal) ipc.writeUB("66CF", mcpspdl) ipc.writeUB("66D0", mcplvll) ipc.writeUB("66D1", mcpvnavl) ipc.writeUB("66D2", mcphdgl) ipc.writeUB("66D3", mcpappl) ipc.writeUB("66D4", mcpvorl) ipc.writeUB("66D5", mcplnavl) ipc.writeUB("66D6", mcpalthl) ipc.writeUB("66D7", mcpvsl) ipc.writeUB("66D8", mcpcswal) ipc.writeUB("66D9", mcpcmdal) ipc.writeUB("66DA", mcpcswbl) ipc.writeUB("66DB", mcpcmdbl) ipc.writeUB("66DC", mcpfd2s) ipc.sleep(50) end I am using the virtual joystick for simulating keypresses defined in PMDG for all MCP functions.COnfigured in the FSUIPC config file below. My FSUIPC config file : [Auto] 1=Lua PMDGNGX [General] UpdatedByVersion=4727 History=VOSNKHSSB0OYVFLH3PJ4A MouseWheelTrim=No MouseWheelTrimSpeed=1 JoystickTimeout=20 PollGFTQ6=Yes BlankDisplays=No FixControlAccel=No FixMachSpeedBug=No VisibilityOptions=No OneCloudLayer=No CloudTurbulence=No CloudIcing=No GenerateCirrus=No SuppressCloudTurbulence=No MaxIce=-4 MinIce=-4 UpperWindGusts=No SuppressWindTurbulence=No SuppressWindVariance=No WindTurbulence=No TurbulenceRate=1.0,5.0 TurbulenceDivisor=20,20,40,40 SuppressAllGusts=No MaxSurfaceWind=0 WindLimitLevel=200 WindDiscardLevel=400 WindAjustAltitude=No WindAjustAltitudeBy=2000 SmoothBySimTime=No WindSmoothing=No WindSmoothness=2 WindSmoothAirborneOnly=Yes PressureSmoothness=0 TemperatureSmoothness=0 DisconnTrimForAP=No ZeroElevForAPAlt=No ThrottleSyncAll=No WhiteMessages=No ShowPMcontrols=No SpoilerIncrement=512 MagicBattery=No RudderSpikeRemoval=No ElevatorSpikeRemoval=No AileronSpikeRemoval=No ReversedElevatorTrim=No ClockSync=No ClockSyncMins=5 ClearWeatherDynamics=No OwnWeatherChanges=No TimeForSelect=4 LoadFlightMenu=No LoadPlanMenu=No PauseAfterCrash=No BrakeReleaseThreshold=75 SaveDataWithFlights=No ZapSound=firework ShortAircraftNameOk=Substring UseProfiles=Yes EnableMouseLook=No TCASid=Flight TCASrange=40 AxisCalibration=No DirectAxesToCalibs=No ShowMultilineWindow=Yes SuppressSingleline=No SuppressMultilineFS=No AxisIntercepts=No DontResetAxes=No GetNearestAirports=No WeatherReadFactor=2 WeatherRewriteSeconds=1 CustomWeatherModify=No SimConnectStallTime=1 LuaRerunDelay=66 Console=No ConsoleWindow=-32000,-32000,-31835,-31929 [JoyNames] AutoAssignLetters=No 1=Saitek Pro Flight Rudder Pedals 1.GUID={177CD7E0-D5A6-11E0-8001-444553540000} 0=Saitek Pro Flight Yoke 0.GUID={BE0CDA70-CF33-11E0-8001-444553540000} 2=Saitek Pro Flight Quadrant 2.GUID={177F21D0-D5A6-11E0-8002-444553540000} [buttons] ButtonRepeat=20,10 1=P64,0,K84,11 2=P64,1,K82,10 3=P64,2,K76,11 4=P64,3,K66,10 5=P64,4,K72,10 6=P64,5,K65,10 7=P64,6,K79,10 8=P64,7,K78,10 9=P64,8,K90,10 10=P64,9,K88,9 11=P64,10,K90,8 12=P64,11,K90,11 13=P64,12,K87,10 14=P64,13,K87,11 15=P64,14,K70,10 16=P64,15,K82,9 17=P64,16,K84,10 18=P64,17,K88,10 19=P64,18,K70,11 20=U64,14,K70,10 21=U64,15,K82,9 22=U64,18,K70,11 23=U64,17,K88,10 !1=//COURSE CAPT 24=CP(+64,19)64,20,K74,11 25=CU(+64,19)64,20,K74,10 26=CP(+64,20)64,19,K74,10 27=CU(+64,20)64,19,K74,11 28=CP(-64,19)64,20,K74,10 29=CU(-64,19)64,20,K74,11 30=CP(-64,20)64,19,K74,11 31=CU(-64,20)64,19,K74,10 !2=//IAS 32=CP(+64,21)64,22,K75,11 33=CU(+64,21)64,22,K75,10 34=CP(+64,22)64,21,K75,10 35=CU(+64,22)64,21,K75,11 36=CP(-64,21)64,22,K75,10 37=CU(-64,21)64,22,K75,11 38=CP(-64,22)64,21,K75,11 39=CU(-64,22)64,21,K75,10 !3=//HEADING 40=CP(+64,23)64,24,K77,11 41=CU(+64,23)64,24,K77,10 42=CP(+64,24)64,23,K77,10 43=CU(+64,24)64,23,K77,11 44=CP(-64,23)64,24,K77,10 45=CU(-64,23)64,24,K77,11 46=CP(-64,24)64,23,K77,11 47=CU(-64,24)64,23,K77,10 !4=//ALTITUDE 48=CP(+64,25)64,26,K73,11 49=CU(+64,25)64,26,K73,10 50=CP(+64,26)64,25,K73,10 51=CU(+64,26)64,25,K73,11 52=CP(-64,25)64,26,K73,10 53=CU(-64,25)64,26,K73,11 54=CP(-64,26)64,25,K73,11 55=CU(-64,26)64,25,K73,10 !5=//VERT SPEED 56=CP(+64,27)64,28,K74,9 57=CU(+64,27)64,28,K73,9 58=CP(+64,28)64,27,K73,9 59=CU(+64,28)64,27,K74,9 60=CP(-64,27)64,28,K73,9 61=CU(-64,27)64,28,K74,9 62=CP(-64,28)64,27,K74,9 63=CU(-64,28)64,27,K73,9 !6=//COURSE FO 64=CP(+64,29)64,30,K79,11 65=CU(+64,29)64,30,K79,9 66=CP(+64,30)64,29,K79,9 67=CU(+64,30)64,29,K79,11 68=CP(-64,29)64,30,K79,9 69=CU(-64,29)64,30,K79,11 70=CP(-64,30)64,29,K79,11 71=CU(-64,30)64,29,K79,9 72=P65,1,K72,9 73=P65,3,K72,11 74=P65,2,K85,11 !7=// BANK SEL 75=CP(F+65,2)(+64,23)64,24,K89,11 76=CU(F+65,2)(+64,23)64,24,K89,10 77=CP(F+65,2)(+64,24)64,23,K89,10 78=CU(F+65,2)(+64,24)64,23,K89,11 79=CP(F+65,2)(-64,23)64,24,K89,10 80=CU(F+65,2)(-64,23)64,24,K89,11 81=CP(F+65,2)(-64,24)64,23,K89,11 82=CU(F+65,2)(-64,24)64,23,K89,10 [AutoSave] Next=1 Interval=60 Files=10 SaveOnGround=No AutoSaveEnabled=No [GPSout] GPSoutEnabled=No [GPSout2] GPSoutEnabled=No [WideServer] WideFSenabled=Yes [sounds] Path=D:\FSX\Sound\ Device1=Primær lyddriver Device2=Høyttalere (Realtek High Definition Audio) Device3=Realtek HDMI Output (Realtek High Definition Audio) Device4=Realtek Digital Output (Realtek High Definition Audio) [LuaFiles] 1=display vals 2=Fuel737 3=gfdDisplay 4=GFpower 5=HidDemo 6=init pos 7=ipcDebug 8=landing 9=liar 10=log lvars 11=MasterClient 12=MyDisplay 13=Payload737 14=record to csv 15=SlaveServer 16=SyncAxis 17=testclnt 18=testsrvr 19=ThrustSym 20=ThrustSym4 21=TripleUse 22=VRI_SetBaro 23=VRI_SetMach 24=WP6test 25=lesdisplayb 26=NGX_AUTO 27=lesdisplay 28=PMDGNGX 29=log NGXLVARs 30=PMDGNGX01 31=PMDGNGX02 [Window.LUA display] Docked=12770, 4703, 3515, 3976 Undocked=88, 46, 301, 290 [Monitor] Monitor0=0,66C0,3,0 Display=2 Monitor1=0,66C2,3,0 My SIOC script for my own build OC MCP: // ***************************************************************************** // * Config_SIOC ver 1.97 - By Manolo Vélez - www.opencockpits.com // ***************************************************************************** // * FileName : MCP_PMDG B737NGX_FSUIPC_11.txt // * Date : 1/10/2011 // * Ver : 1.1 by Roar Kristensen // * config file for own build OC MCP in PMDG B737NGX using FSUIPC //******************************** // START //******************************** Var 1 Link IOCARD_SW Input 23 Type I { &FO_JoyStick64 = CHANGEBIT 0 v1 // toggle N1 in MCP via FSUIPC } Var 3 Link IOCARD_SW Input 26 Type I { &FO_JoyStick64 = CHANGEBIT 1 v3 // toggle SPEED in MCP via FSUIPC } Var 4 Link IOCARD_SW Input 25 Type I { &FO_JoyStick64 = CHANGEBIT 2 v4 // toggle LVL CHG in MCP via FSUIPC } Var 5 Link IOCARD_SW Input 38 Type I { &FO_JoyStick64 = CHANGEBIT 3 v5 // toggle V NAV in MCP via FSUIPC } Var 6 Link IOCARD_SW Input 24 Type I { &FO_JoyStick64 = CHANGEBIT 4 v6 // toggle HDG SEL in MCP via FSUIPC } Var 7 Link IOCARD_SW Input 02 Type I { &FO_JoyStick64 = CHANGEBIT 5 v7 // toggle APP in MCP via FSUIPC } Var 8 Link IOCARD_SW Input 00 Type I { &FO_JoyStick64 = CHANGEBIT 6 v8 // toggle VOR LOC in MCP via FSUIPC } Var 9 Link IOCARD_SW Input 01 Type I { &FO_JoyStick64 = CHANGEBIT 7 v9 // toggle L NAV in MCP via FSUIPC } Var 10 Link IOCARD_SW Input 31 Type I { &FO_JoyStick64 = CHANGEBIT 8 v10 // toggle ALT HLD in MCP via FSUIPC } Var 11 Link IOCARD_SW Input 27 Type I { &FO_JoyStick64 = CHANGEBIT 9 v11 // toggle V/S in MCP via FSUIPC } Var 12 Link IOCARD_SW Input 14 Type I { &FO_JoyStick64 = CHANGEBIT 10 v12 // toggle CMD A in MCP via FSUIPC } Var 13 Link IOCARD_SW Input 11 Type I { &FO_JoyStick64 = CHANGEBIT 11 v13 // toggle CMD B in MCP via FSUIPC } Var 14 Link IOCARD_SW Input 15 Type I { &FO_JoyStick64 = CHANGEBIT 12 v14 // toggle CWS A in MCP via FSUIPC } Var 15 Link IOCARD_SW Input 13 Type I { &FO_JoyStick64 = CHANGEBIT 13 v15 // toggle CWS B in MCP via FSUIPC } Var 16 Link IOCARD_SW Input 22 Type I { &FO_JoyStick64 = CHANGEBIT 14 v16 // toggle F/D CAPT in MCP via FSUIPC } Var 17 Link IOCARD_SW Input 21 Type I { &FO_JoyStick64 = CHANGEBIT 15 v17 // toggle A/T ARM in MCP via FSUIPC } Var 18 Link IOCARD_SW Input 20 Type I { &FO_JoyStick64 = CHANGEBIT 16 v18 // toggle C/O in MCP via FSUIPC } Var 19 Link IOCARD_SW Input 19 Type I { &FO_JoyStick64 = CHANGEBIT 17 v19 // toggle DISENGAGE in MCP via FSUIPC } Var 20 Link IOCARD_SW Input 18 Type I { &FO_JoyStick64 = CHANGEBIT 18 v20 // toggle F/D FO in MCP via FSUIPC } // Next is the codes for rotaries //----------------------------------------- Var 21 Link IOCARD_SW Input 32 Type I { &FO_JoyStick64 = CHANGEBIT 19 v21 // turn COURSE CAPT in MCP via FSUIPC } Var 22 Link IOCARD_SW Input 33 Type I { &FO_JoyStick64 = CHANGEBIT 20 v22 // turn COURSE CAPT in MCP via FSUIPC } Var 23 Link IOCARD_SW Input 28 Type I { &FO_JoyStick64 = CHANGEBIT 21 v23 // turn IAS/MACH in MCP via FSUIPC } Var 24 Link IOCARD_SW Input 29 Type I { &FO_JoyStick64 = CHANGEBIT 22 v24 // turn IAS/MACH in MCP via FSUIPC } Var 25 Link IOCARD_SW Input 7 Type I { &FO_JoyStick64 = CHANGEBIT 23 v25 // turn HEADING in MCP via FSUIPC } Var 26 Link IOCARD_SW Input 8 Type I { &FO_JoyStick64 = CHANGEBIT 24 v26 // turn HEADING in MCP via FSUIPC } Var 27 Link IOCARD_SW Input 4 Type I { &FO_JoyStick64 = CHANGEBIT 25 v27 // turn ALTITUDE in MCP via FSUIPC } Var 28 Link IOCARD_SW Input 5 Type I { &FO_JoyStick64 = CHANGEBIT 26 v28 // turn ALTITUDE in MCP via FSUIPC } Var 29 Link IOCARD_SW Input 16 Type I { &FO_JoyStick64 = CHANGEBIT 27 v29 // turn VERT SPEED in MCP via FSUIPC } Var 30 Link IOCARD_SW Input 17 Type I { &FO_JoyStick64 = CHANGEBIT 28 v30 // turn VERT SPEED in MCP via FSUIPC } Var 31 Link IOCARD_SW Input 9 Type I { &FO_JoyStick64 = CHANGEBIT 29 v31 // turn COURSE FO in MCP via FSUIPC } Var 32 Link IOCARD_SW Input 10 Type I { &FO_JoyStick64 = CHANGEBIT 30 v32 // turn COURSE FO in MCP via FSUIPC } Var 33 Link IOCARD_SW Input 35 Type I { &FO_JoyStick65 = CHANGEBIT 0 v33 // toogle noname in MCP via FSUIPC } Var 34 Link IOCARD_SW Input 34 Type I { &FO_JoyStick65 = CHANGEBIT 1 v34 // turn SPEED INTV in MCP via FSUIPC } Var 35 Link IOCARD_SW Input 6 Type I { &FO_JoyStick65 = CHANGEBIT 2 v35 // toogle BANK in MCP via FSUIPC } Var 36 Link IOCARD_SW Input 3 Type I { &FO_JoyStick65 = CHANGEBIT 3 v36 // turn ALT INTV FO in MCP via FSUIPC } Var 2 name FO_JoyStick64 Link FSUIPC_OUT Offset $3340 Length 4 Var 37 name FO_JoyStick65 Link FSUIPC_OUT Offset $3344 Length 4 // DIGITS Var 100 Link FSUIPC_IN Offset $66C0 Length 2 // Reading CRS1 from NGX via FSUIPC { v101 = v100 } Var 101, name D_CRS1, Link IOCARD_DISPLAY, Digit 13, Numbers 3 Var 102 Link FSUIPC_IN Offset $66C2 Length 2 // Reading SPD from NGX via FSUIPC { v103 = v102 } Var 103, name D_SPD, Link IOCARD_DISPLAY, Digit 10, Numbers 3 Var 104 Link FSUIPC_IN Offset $66C4 Length 2 // Reading HDG from NGX via FSUIPC { v105 = v104 } Var 105, name D_HDG, Link IOCARD_DISPLAY, Digit 7, Numbers 3 Var 106 Link FSUIPC_IN Offset $66C6 Length 2 // Reading ALT from NGX via FSUIPC { v107 = v106 } Var 107, name D_ALT, Link IOCARD_DISPLAY, Digit 2, Numbers 5 Var 108 Link FSUIPC_IN Offset $66C8 Length 2 // Reading VS from NGX via FSUIPC { IF V108 <= 6000 { v109 = v108 &Sign = -999999 // blank } ELSE { v109 = 65536 - v108 &Sign = -999998 // minus sign '-' } } Var 109, name D_VS, Link IOCARD_DISPLAY, Digit 16, Numbers 4 var 189 name Sign Link IOCARD_DISPLAY Digit 20 Numbers 1 Var 110 Link FSUIPC_IN Offset $66CA Length 2 // Reading CRS2 from NGX via FSUIPC { v111 = v110 } Var 111, name CRS2, Link IOCARD_DISPLAY, Digit 23, Numbers 3 // OUTPUTS // Var 200, name DECIMAL, Link IOCARD_OUT, Output 20 // hva er dette, må sjekkes Var 122 Link FSUIPC_IN Offset $66CD Length 1 // Reading N1 from NGX via FSUIPC { v202 = v122 } Var 202, name O_N1, Link IOCARD_OUT, Output 47 Var 123 Link FSUIPC_IN Offset $66CE Length 1 // Reading AT ARM from NGX via FSUIPC { v203 = v123 } Var 203, name O_AT, Link IOCARD_OUT, Output 40 Var 124 Link FSUIPC_IN Offset $66CF Length 1 // Reading SPD from NGX via FSUIPC { v204 = v124 } Var 204, name O_SPEED, Link IOCARD_OUT, Output 46 Var 125 Link FSUIPC_IN Offset $66D0 Length 1 // Reading LCHG from NGX via FSUIPC { v205 = v125 } Var 205, name O_LVLCHG, Link IOCARD_OUT, Output 45 Var 126 Link FSUIPC_IN Offset $66D1 Length 1 // Reading VNAV from NGX via FSUIPC { v206 = v126 } Var 206, name O_VNAV, Link IOCARD_OUT, Output 39 Var 127 Link FSUIPC_IN Offset $66D2 Length 1 // Reading HDGSEL from NGX via FSUIPC { v207 = v127 } Var 207, name O_HDGSEL, Link IOCARD_OUT, Output 44 Var 128 Link FSUIPC_IN Offset $66D3 Length 1 // Reading APP from NGX via FSUIPC { v208 = v128 } Var 208, name O_APP, Link IOCARD_OUT, Output 43 Var 129 Link FSUIPC_IN Offset $66D4 Length 1 // Reading VORLOC from NGX via FSUIPC { v209 = v129 } Var 209, name O_VORLOC, Link IOCARD_OUT, Output 42 Var 130 Link FSUIPC_IN Offset $66D5 Length 1 // Reading LNAV from NGX via FSUIPC { v210 = v130 } Var 210, name O_LNAV, Link IOCARD_OUT, Output 41 Var 131 Link FSUIPC_IN Offset $66D6 Length 1 // Reading ALTHD from NGX via FSUIPC { v211 = v131 } Var 211, name O_ALTHLD, Link IOCARD_OUT, Output 11 Var 132 Link FSUIPC_IN Offset $66D7 Length 1 // Reading VS from NGX via FSUIPC { v212 = v132 IF v132 = 0 { v109 = -999999 // blank the display &Sign = -999999 // blank } } Var 212, name O_VS, Link IOCARD_OUT, Output 12 Var 133 Link FSUIPC_IN Offset $66D8 Length 1 // Reading CSWA from NGX via FSUIPC { v213 = v133 } Var 213, name O_CWSA, Link IOCARD_OUT, Output 13 Var 134 Link FSUIPC_IN Offset $66D9 Length 1 // Reading CMDA from NGX via FSUIPC { v214 = v134 } Var 214, name O_CMDA, Link IOCARD_OUT, Output 16 Var 135 Link FSUIPC_IN Offset $66DA Length 1 // Reading CSWB from NGX via FSUIPC { v215 = v135 } Var 215, name O_CWSB, Link IOCARD_OUT, Output 14 Var 136 Link FSUIPC_IN Offset $66DB Length 1 // Reading CMDB from NGX via FSUIPC { v216 = v136 } Var 216, name O_CMDB, Link IOCARD_OUT, Output 15
  19. Hi Peter, I'm using AI a lot in FS9 and find Trafficlook in the FSUIPC package very useful when doing AI-spooting from an airfield. One thing that has bother me ( an others) for a long time is all the go-arounds due too slow runway taxiing speed of landing airplanes and/or too little separation between AI in the landing phase. Is there any possiblity to add an enhacement to FSUIPC so it can increase the separation for AI planes that are closer than 4-5 nm behing another AI plane on final? As data are available through FSUIPC in Trafficlook I thought maybe the datafields could be written to also. This could be done for AI planes which are closer than 4 nm to the AI plane ahead when they enter the state = landing by decreasing the GS (speed) of the chasing planes approaching the same runway. If possible it could be implemented as an option in FSUIPC when a user only wants to do AI-spooting from an airfield. and most (if not all) go-arounds would be history. The idea could be totally wrong and maybe there are better ideas around. Or maybe ( my guessing) these datafields can not be accessed and written to. Anyway, thanks for FSUIPC and Trafficlook. Looking forward to the next version of Trafficlook with extra parameters. rgs, Roar
  20. Hi, My problem is now solved. It seems that I have to save the *.myl file after any changes and then complile. If the saving is not done after changes and prior to compilation, no compilation will take place. I didn't save my new *.myl file until after I tried to compile!! So, now everuthing works great. The editor manual could improve, but anyway the program is great! Another question : Why can't I view the bmp files the aircraft/texture folders with my paint/viewing software. I get drawing failure all the time. rgs, Roar
  21. Hi, I'm in need for some help. I can't get the editor ( 1.2) to compile a new MyTraffic.bgl file after adding new aircraft and running auto schedule. When I look into the time table after the changes I can see the changes there, but hiting "create all files and traffic" does not generate any new MyTraffic.bgl file I'am probably doing something wrong, but reading the maunual og tutorial does not give me any help. I have looked in the ...\scenedb\MytrafficATC\Scenery, but there is no new file there, only the the old MyTraffic.bgl that came with MyTraffic 1.2. Please advise Roar
×
×
  • 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.