Jump to content
The simFlight Network Forums

Detlef_747

Members
  • Posts

    43
  • Joined

  • Last visited

Everything posted by Detlef_747

  1. John, OK, that explains it, thank you. I found a solution I can work with (basically interpreting any strings in a Lua FSUIPC script directly, and using only "number" Lvars in Airmanager outside FSUIPC). Detlef
  2. I do that, because I don't know PMDG variables I can directly use for some instruments of the B737. For almost all instruments I see the Lvar directly in the XML behaviour file provided with the aircraft. But for some not. And here I do use your offsets from the file Offset Mapping for PMDG 737-700.pdf. That has helped me a lot. The "SDK" which just seems to be a PMDG_NG3_SDK.h file is of no help for me right now. Detlef
  3. John, thank you for your explanations. They are helpful for me. I think I have to stay with my solution. I don't want to write data to offsets, just read them and write the contents into Lvars. I use Siminnovations Airmanager to create instruments on a touchscreen. That software cannot access offsets in FSUIPC. Rather it waits for changes on MSFS simulator variables such as Lvars and then uses the information from the Lvar to control the instruments on the touchscreen. For example: Offset 64C9 13 char[13] ELEC_MeterDisplayBottom[13] has the information for the bottom line of this instrument: I generate the output you see here from the Lvars I read from FSUIPC via the interface provided from Sim Innovations. However, it only seems to work with numerical type Lvars. I was not able to see contents from String Lvars generated in FSUIPC, even though I tried to read them as strings. I can live with that now because FSUIPC allows me to generate multiple Lvars (type float) so that I spread the information from the offset on three separate Lvars. I am not sure I made myself more understandable. I just wanted to understand if and how string Lvars work. If I read the Lvar L:ipcpmdg_DC_Voltmeter generated with stringTest.lua inside the Siminnovations Airmanager, I get the numerical representation for example 9.0251229459308e-308 if I read it as number, and I get "" (an empty string) if I read it as string. That seems to be not an FSUIPC problem but someting in the Siminnovations interface. I currently experiment some more, just had a complete CTD of MSFS and it won't restart now. I need to restart my computer now... Detlef
  4. Ok. Thank you for clarifying. Detlef
  5. Hi again, I know what alignment on words, dword and so on is. But I do not understand, how I should add data to offsets. The PMDG offsets do work as you provide them in the file Offset Mapping for PMDG 737-700.pdf. Thank you again, Detlef
  6. John, thank you for your fast reply. Ok, 8 characters max. That means the 13 character offsets for example 64BC 13 char[13] ELEC_MeterDisplayTop[13] from the PMDG offset won't work as one piece at leasts. As I said, I found a way arround it. Interpreting the string in the FSUIPC .lua script and write to separate Lvars. Thank you for providing the example script. I understand how the script should work but it does not assign a value other than 0 (approx 1.3e-307) to the Lvar. Or I am doing something wrong (which is often..). The counter value is not assigned to the Lvar. This is from the log file: 79860 LUA.3: Lvar updated: 1.1232813414918e-307, type=number 279875 LUA.3: Lvar value: myvar14 279938 LUA.3: Offset updated: myvar14 280907 LUA.3: Lvar updated: 1.1789081879545e-307, type=number
  7. Hello, we have been in contact on Lvars some time ago. I have worked with the PMDG offsets more recently. I find, that I can generate Lvars that represent a float number just fine. But string Lvars don't work. So I did a work arround in the lua script attached. For example event.offset(0x64bc, "STR", 13, "ChangeMeterTopLine") calls the function ChangeMeterTopLine just fine. But I cannot write the string into an Lvar at once, so I interpret the string in the FSUIPC lua script and write to a couple of numerical (float) Lvars instead. Did I miss something with string Lvars? I only found ipc.createLvar(). Are there other functions I could use? Thank you Detlef PmdgOk.lua
  8. John, I have had the registered version of FSUIPC(7 now) for so long, that I don't know what the non-pay version can do. I ask, because I want to provide a lua script to others. Do they have to buy FSUIPC7 in order to be able to start lua scripts automatically? Thank you Detlef
  9. Installing the latest version sometimes does miricles.. I updated the aircraft to the latest PMDG 737 version, and the offsets mentioned above do work now! The lvars creation also works. I will leave the ipc.sleep calls inserted until the next FSUIPC7 version. I will try with a list of offsets, which will sum up the wating time, but that really is not a problem right now. Thanks again for your help. I very much appreciate it. The issue is solved. Detlef
  10. John, thank you for the ongoing support. Sorry I deactivated the Lua logging at some point. I have it on again now. Both is on now. I also activated the option to see offset 65EA in the windows title. It always says 0. I have activated event logging also. Usually I would send event 32503 to operate the nose wheel steering switch. If I look at the log file, that event is present, but still offset 65EA is not changing in my environment here. Thank you for sending your log file. Yes, I see it is working in your setup. Something must be wrong or different in my setup. I have not yet tried with a modified lua script. But that seems not to be the main issue. Thank you Detlef FSUIPC7.log FSUIPC7.ini
  11. Unfortunately I am also reading 0 all the time from those two offsets you mentioned. And I operated "arm spoiler" and the nose wheel steering switch. ipc.readUB(0x65ea) ipc.readUB(0x65fd) I did that. The log file says: 267687 PMDG 737 Client Data Received: ID=1313289013, Size=1049, FirstDataDW=536870944 (FSUIPC7 logfile attached) It says that just once, not repetatively. I may still be missing something. Thank you Detlef FSUIPC7.log pmdg737.lua
  12. Hi John, I experimented some more this morning. With the Cirrus aircraft (FS2020 default) everything works as expected. I can read from offset 0x0bfc (flaps index) and write that value into an Lvar that I create myself (L:my_flaps_index). I can see and work with that Lvar in Air Manager (which is my goal). The Lvar also shows up in the Lvar list, if I generate one with the FSUIPC menu call. I have attached the resulting files here. However, if I try with PMDG offsets, I always see 0 as value. (Maybe some do work, that I did not try.) Can I somehow verify that the PMDG 737 is broadcasting its data? (I have the SDK section in the 737options.ini file but maybe something else is missing in my settings). Thank you Detlef pmdg737.lua FSUIPC7.ini FSUIPC7.log pmdg737.log
  13. I just did. The Lua program stops running then I think. I am not sure I should restart everything. I will try more tomorrow. And I will try again with offsets for a default aircraft. Thank you Detlef pmdg737.log pmdg737.lua
  14. John, thank you for your fast reply. I am sorry if I sound confusing. My intention is to read contents from offsets and write that contents into Lvars that I create myself using Lua script in FSUIPC. I did that here. See the attachment. I modified my lua script to be as simple as possible and inserted a 5 second pause before trying to write to the Lvar. My problem here: I always read 0 as value. I actually see the Lvars I created in my Airmanager instrument with their initial values 1234.0 and 4321.0 respectively. But after 5 s the display switches to 0. I have attached the files here. So I seem to never get any data from the offsets. I am sorry if I was confusing here. I did not try both at the same time. So when trying the .ini section I did not use a Lua script to generate Lvars. So in the files attached I had the PMDG 737-700 running, with engines off, APU on. I tried these specific offsets because I know how I can use PMDGs original Lvars for that. So I know they should work (0x64bb and 0x64E8). Thank you Detlef pmdg737.log FSUIPC7.ini FSUIPC7.log
  15. Hello, I updated to FSUIPC7 7.3.8 yesterday, because I saw the offset list for the PMDG 737. But somehow I couldn't get Lvars working correctly. I am familiar with Lua and am using it for Sim Innovations Air Manager instruments. I wanted to create my own Lvars with an FSUIPC Lua script. If I create the Lvar using ipc.createLvar(name, 1234) giving an initial value of 1234 that Lvar shows up as expected. But I cannot write to it using ipc.writeLvar(name, ipc.readUB(offset). I have added this section to 737options.ini in C:\Users\dreu\AppData\Local\Packages\Microsoft.FlightSimulator_8wekyb3d8bbwe\LocalState\packages\pmdg-aircraft-737\work [SDK] EnableDataBroadcast=1 EnableCDUBroadcast.0=1 EnableCDUBroadcast.1=1 (and restart of everything) with no better results. I then saw that I could write Lvars directly into the fsuip7.ini file. I tried this: [LvarOffsets] 1=L:IPCPMDG_MAIN_annunAP=UB0x65F1 2=L:IPCPMDG_MAIN_annunAP_Amber=UB0x65F3 3=L:IPCPMDG_MAIN_annunAT=UB0x65F5 4=L:IPCPMDG_MAIN_annunAT_Amber=UB0x65F7 5=L:IPCPMDG_MAIN_annunFMC=UB0x65F9 6=L:IPCPMDG_FUEL_PumpFwdSw=UB0x6479 resulting in entries in the log file, saying the variable cannot be assigned because it does not exist. That remains so after clicking WASM reload in the menu. So I tried in a Lua script to only generate an Lvar if it does not already exist, but ipc.getLvarId(name) always returns not nil (meaning the Lvar already exists?) I then tried with the default Cirrus aircraft and got no better results. I see that I can read from offsets but I cannot write them to Lvars. I have tried all I can think of, so I would appreciate your help. I attach my latest log file here. That one was with the cirrus. Thank you Detlef FSUIPC7.log
  16. Hi John, I see. Thank you for explaining, and also your further comments. "Activate" means trigger an event? Is it the same as an event? Only it is called Hvar in this case? Sorry, if a silly question. Thank you Detlef
  17. Hi, I have started to write a simple variable tracker for Lvars and Hvars. Starting from the Lua examples log lvars.lua and record to csv.lua I managed to generate a .csv file in the format I need. I noticed that there are these library functions: ipc.readLvar("name") and ipc.readLvarSTR("name) Trying with the FlyByWire A320 for FS2020 I found no STR variable at all Is that just the aircraft or am I doing something wrong? -- By using "assert" you get an error message if this fails f = assert(io.open("am_fs2020_vars.csv","w")) -- write the CSV column headings -- possible Types: L (for Lvars), H (for Hvars) -- poosible Subtypes: F (for float), S (for string), U (for unknown) default is F --f:write("\r\nType,Subtype,Name\n") f:write("Type,Subtype,Name,Value\n") ipc.log("Searching for Lvars") count = 0 for id=0, 65535 do name = ipc.getLvarName(id) if id == nil then break end subtype = "U" value = ipc.readLvar(name) if value ~= nil then subtype = "F" else value = ipc.readLvarSTR(name) if value ~= nil then subtype = "S" end end count = count+1 f:write(string.format("L,%s,%s,", subtype, name)) if subtype == "F" then f:write(string.format("%0.6f", value)) elseif subtype == "S" then f:write(string.format("(((%s)))", value)) else f:write("(((unknown)))") end f:write("\n") end ipc.log(count .. " Lvars found.") -- write a CSV line to the open file f:write(string.format("A test: %02.4f\n", 3)) -- tidy up at end ... f:write("\n") f:close() And some more questions: 1) There are no STR variables for Hvars, right? 2) Is there a way to find out the unit, that an Lvar is using? E.g. ft or degrees or bar... ? 3) Is there a way to see what are output, what are input variables? Thank you Detlef
  18. John, that did work of course! Thank you for your help. Detlef
  19. John, I guess you are right there. Sorry for me being a bit lazy... Thanks for your advice. Will try tomorrow. Detlef
  20. Hi, I am in the process of getting familiar again with FSUIPC after some long pause. I somehow cannot figure out, how to have FSUIPC permanently forget some key assignments. I programmed the key 1 to send Flaps Incr to FS2020. I want to clear that assignment. So I go to Key Assignments, I press Set, then the 1-key. I press Clear and Confirm, then Ok. If I then press Set and 1, the key assignment is removed as I want it. But after some time or restart or aircraft reload or some event (I have not figured out exactly which one) the key assignments are re-stored which I do not want. What am I doing wrong? Thank you Detlef
  21. Hi John, thank you again. I was aware of the above. I have it sorted out now. Basically my issues had two reasons, (1) I have a ten EUR or so mini wireless keyboard and touchpad connected via USB that I use sometimes during flying when my normal keyboard is stored away (I have self built switches and dials and so on). As soon as I removed that wireless keyboard I could assign buttons in the MS UI as intended. That error "you are trying to assign an action to a device that is not selected" also came from that. The UI saw a different USB device than the one I HAD selected. (2) flaps setting went back automatically to 10 degrees because some assistance function was active. I set everything to "hard" now and both, UI and FSUIPC assignment, do work now. So all my fault... Detlef
  22. Hi again John, thanks for your continued support. I seem to have some other basic problems now with FS2020. In the FS UI, if I try to assign a function to a joystick button I get: "you are trying to assign an action to a device that is not selected". I need to solve that one before looking deeper into my original topic here. Detlef
  23. John, I am totally unfamilar until now with MSFS2020. I just noticed: if I use the FSIM user interface, I hear a click when putting the flaps out a notch, and a delayed second click without me touching the control button again. Looking at the instrument in the cockpit I just saw that the flap lever goes back to the middle position (APH) with the delayed click. I I try to program the buttons via FSUIPC the lever tries to move but instantly moves back into the middle position resulting in no flap movement. So maybe another kind of control is sent within the UI for the flap lever movement. Detlef
×
×
  • 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.