FSlikerX Posted August 19, 2015 Report Posted August 19, 2015 Hi everybody out there, I bought FSUIPC a long time ago... ...and I was/am still so happy that there is such a perfekt and functional software :) Now I bouhgt Aerosofts Airbus A318/319/320/321 because I am looking forward to build a small cockpit-simulator with that Software. So know my question: Is it possible to export variables like the AP ALT, AP HDG or the Battery-levl out of the Airbus via FSUIPC? (without LUA,...) And show this figures via such a device: (or simply to read them with another pogramm them?) http://simple-solutions.de/shop/product_info.php?language=en&products_id=62 with this software: wiki.simple-solutions.de/de/products/Arcaze/Arcaze-USB/Arcaze-FSUIPC-Connector I hope you can help - I would be very glade if you could send me a short answer. Thank you in advance, FSlikerX
Ian P Posted August 20, 2015 Report Posted August 20, 2015 Hi.Sorry for the delay in approving your post. Unfortunately Pete is away at present and I was travelling (or, well, stuck in a traffic jam!) for most of yesterday. Unfortunately, I'm not a cockpit builder (nor a LUA programmer) myself, just the forum admin, so I'll leave those with more knowledge and experience to answer your question. Ian P.
inancatil Posted August 21, 2015 Report Posted August 21, 2015 Hi, I am trying to use that software. The answer is you have to use lua. Because that program only uses fsuipc offsets and Aerosoft doesnt has any.
FSlikerX Posted August 22, 2015 Author Report Posted August 22, 2015 Hi, I am trying to use that software. The answer is you have to use lua. Because that program only uses fsuipc offsets and Aerosoft doesnt has any. So you can also read Values from the FSX via a LUA Script? And do know, how to wirte such a LUA? best wishes, FSlikerX
Ian P Posted August 22, 2015 Report Posted August 22, 2015 There are examples of how to read and write Local Variables (LVars) in the documentation, which can be found within the "Modules" directory of your FSX installation. Cheers, Ian P.
FSlikerX Posted August 22, 2015 Author Report Posted August 22, 2015 There are examples of how to read and write Local Variables (LVars) in the documentation, which can be found within the "Modules" directory of your FSX installation. Cheers, Ian P. Okay thank you... I will check that ofcauseDo you also knok, if it is possible to create/read such a locla variable in combination with the aerosoft airbus?
Ian P Posted August 22, 2015 Report Posted August 22, 2015 The "Local" in LVars refers to the fact that they are unique to that add-on, rather than "global", referring to the entire sim. As an aside, you might like to check out LINDA (http://www.fs-linda.com/) which may already include the LVars for the Airbus packages. Unfortunately I don't use it (LINDA, that is - I do use the 'Buses) so I cannot say for sure. Cheers, Ian P.
FSlikerX Posted August 22, 2015 Author Report Posted August 22, 2015 (edited) Hey that seems to be great... awesome thank you :) But unfotunatley it seems like that this pogramm only includes LUA Scripts for Inputs (buttons,...) not for Variable-output (like Batterylevel). Or do you/anybody out there know how to read Vars with LINDA? But anyway thank you for that tip :-) Wishes Edited August 22, 2015 by FSlikerX
gardan Posted August 23, 2015 Report Posted August 23, 2015 Hello FSliker, I confirm with the FSUIPC & LUA modules and it is possible to program all Aribus Aerosoft. Because the SDK (LVar) provided by Aerosoft is very complete. Good luck for construction. Michel
FSlikerX Posted August 23, 2015 Author Report Posted August 23, 2015 Hello FSliker, I confirm with the FSUIPC & LUA modules and it is possible to program all Aribus Aerosoft. Because the SDK (LVar) provided by Aerosoft is very complete. Good luck for construction. Michel Hi Michel, thank you :) So do you know how to read such LVras from the Airbus? That would be awesome...
gardan Posted August 23, 2015 Report Posted August 23, 2015 Hi, This is an example that can be answered your questions. Michel Exemple pour la programmation de 2 inter pour allumer les écrans de contrôle Var 3118 switch le PFD & le ND Var 3119 switch le ECAM1 & ECAM2 (je n'avais que 2 inter rotatif, mais avec 4, on peux controler les 4 écrans séparement comme dans la réalité) Extrait SIOC ................................................Var 1996 name Jostick67, Link FSUIPC_OUT Offset $334C Length 4................................................ // ********************* ECRAN CONTROLE On/off *********************** Var 3118, name PFD_ONOFF, Link IOCARD_SW, Input 34, Type I // On & Off PFD{&Jostick67 = TOGGLE 8} Var 3119, name ECAM_ONOFF, Link IOCARD_SW, Input 86, Type I // On & Off ECAM{&Jostick67 = TOGGLE 7} Extrait FSUIPC4.INI[buttons].......................................................................................99=P66,30,CL25:R,171 ; ECAM ALL102=P66,31,CL25:R,180 ; ECAM TO config103=P67,0,CL25:R,210 ; PROBE ANTI ICE104=P67,1,CL25:R,211 ; WING ANTI ICE105=P67,2,CL25:R,212 ; ENG1&2 ANTI ICE108=P67,3,CL25:R,55 ; VS push109=P67,4,CL25:R,56 ; VS pull110=P67,5,CL25:R,501 ;TEST ECAM111=P67,6,CL25:R,301 ;Baro unit112=P67,7,CL25:R,220 ;ECAM SWITCH113=P67,8,CL25:R,221 ;PFD SWITCH Extrait LUA .......................................................................................-- ECAM ON/OFF if ipcPARAM == 220 then if (ipc.readLvar("L:AB_MPL_ECAMU_Power") == 1) thenipc.writeLvar("L:AB_MPL_ECAMU_Power", 0)ipc.sleep(100)ipc.writeLvar("L:AB_MPL_ECAML_Power", 0)ipc.writeLvar("L:SmallOverheadPushButtons", 1)elseipc.writeLvar("L:AB_MPL_ECAMU_Power", 1)ipc.sleep(100)ipc.writeLvar("L:AB_MPL_ECAML_Power", 1)ipc.writeLvar("L:SmallOverheadPushButtons", 1)end end -- PFD ON/OFF if ipcPARAM == 221 then if (ipc.readLvar("L:AB_MPL_PFD_Power") == 1) thenipc.writeLvar("L:AB_MPL_PFD_Power", 0)ipc.sleep(500)ipc.writeLvar("L:AB_MPL_ND_Power", 0)ipc.writeLvar("L:SmallOverheadPushButtons", 1)elseipc.writeLvar("L:AB_MPL_PFD_Power", 1)ipc.sleep(500)ipc.writeLvar("L:AB_MPL_ND_Power", 1)ipc.writeLvar("L:SmallOverheadPushButtons", 1)end end ....................................................................................... REMLVars du SDKAB_MPL_PFD_PowerAB_MPL_ND_PowerAB_MPL_ECAMU_PowerAB_MPL_ECAML_Power
FSlikerX Posted August 24, 2015 Author Report Posted August 24, 2015 Hi, This is an example that can be answered your questions. Michel That seem so be realy great...Ohhhh thank you but I think my question is mistakeable... The correct question should be: Is it possible to export for example the SET/target Altitude or the set HDG that is also shown on the AP with FSUIPC (or with Linda,...)? That was my false Sorry Thanks a million, FSlikerX
FSlikerX Posted August 24, 2015 Author Report Posted August 24, 2015 That seem so be realy great... Ohhhh thank you but I think my question is mistakeable... The correct question should be: Is it possible to export for example the SET/target Altitude or the set HDG that is also shown on the AP with FSUIPC (or with Linda,...)? That was my false Sorry Thanks a million, FSlikerX
Pete Dowson Posted August 24, 2015 Report Posted August 24, 2015 The Lua ipc library supports a function to read the local panel variables (Lvars) too, not just write them. The function is value = ipc.readLvar("name of Lvar") You can even declare an event ("event.Lvar") to call a function when the value changes, with an interval specified to define the polling rate. The Lua library documentation is installed in your FSUIPC Documents folder, inside the FS Modules folder. Pete
michael1508 Posted August 25, 2015 Report Posted August 25, 2015 Hello, before opening up a new thread, I thought, it's may be better to jump in here, as I am just being at a very similar step in my effort to run my first lua script... I already have my script saved in the fsx/modules folder ("mg_airbus_pedestal.lua") an now want to run it by button assignment. But I can't find the script in the dropdown list within FSUIPC's button assignment section. I tried it with reloading FSX and I tried to check, where the other LUA scripts are located, that are in the dropdown list by default. Nothing helped... I guess, I am missing something somewhere. Would be great, if you could point me in the right direction! So hopefully, I haven't mixed up the content here... thanks! Michael
FSlikerX Posted August 25, 2015 Author Report Posted August 25, 2015 The Lua ipc library supports a function to read the local panel variables (Lvars) too, not just write them. The function is value = ipc.readLvar("name of Lvar") You can even declare an event ("event.Lvar") to call a function when the value changes, with an interval specified to define the polling rate. The Lua library documentation is installed in your FSUIPC Documents folder, inside the FS Modules folder. Pete First of all: Sorry for the double-postsThank you Pete :) Do you fortuitous know a list with the LVars of the aerosoft Airbus or the SDK of te Airbuses? (or is it included in the lua libery document?) And also another question: Do I simply have to drop the LUA file in the Modules-Folder to run it? Best wishes, FSlikerX
gardan Posted August 25, 2015 Report Posted August 25, 2015 Hi For the Lvars Aerosoft : http://www.avsim.com/topic/451948-aerosoft-airbus-module-43-v2/ Michel
Pete Dowson Posted August 25, 2015 Report Posted August 25, 2015 I already have my script saved in the fsx/modules folder ("mg_airbus_pedestal.lua") an now want to run it by button assignment. But I can't find the script in the dropdown list within FSUIPC's button assignment section. The name "mg_airbus_pedestal" is too long. Needs to be 15 characters or less. Pete
michael1508 Posted August 25, 2015 Report Posted August 25, 2015 Yeah! It's working! After 2 weeks of working from fsuipc via Linda to LUA and endless hours of software trial & error' ing I now have my very first button of my self made airbus cockpit working! Time for a beer now - cheers and thanks for making my day, Pete! Michael
FSlikerX Posted August 25, 2015 Author Report Posted August 25, 2015 Yeah! It's working! After 2 weeks of working from fsuipc via Linda to LUA and endless hours of software trial & error' ing I now have my very first button of my self made airbus cockpit working! Time for a beer now - cheers and thanks for making my day, Pete! Michael Hi Michael,:) well done :) So you build your own cockpit with the AEROSOFT airbus?
FSlikerX Posted August 25, 2015 Author Report Posted August 25, 2015 Hi For the Lvars Aerosoft : http://www.avsim.com/topic/451948-aerosoft-airbus-module-43-v2/ Michel Thank you but I am a little bit confused know...Is that only the LINDA Airbus Module or thee Airbus SDK or does it simply include the LVar I'm looking for? Wishes
FSlikerX Posted August 26, 2015 Author Report Posted August 26, 2015 I think it should be possible to read for example the battery-level out of the AS Airbus via SimConnet. [ELECTRICAL BATTERY LOAD Battery loadELECTRICAL BATTERY VOLTAGE Battery voltage] Due to that fact: Is it possible to read data from the Airbus with FSUIPC or do I still need a LUA pogramm?
Pete Dowson Posted August 26, 2015 Report Posted August 26, 2015 I think it should be possible to read for example the battery-level out of the AS Airbus via SimConnet. [ELECTRICAL BATTERY LOAD Battery load ELECTRICAL BATTERY VOLTAGE Battery voltage] These are the variables used by FS when it is controlling the sub-systems. Sophisticated aircraft like the PMDG 737NGX, the 777X and the Aerosoft Airbuses implement their own subsystems. There may be some overlap, you'd have to check. The variables you mention are available in FSUIPC offsets if you are not using SimConnect. The Lua program method is the only way to real local gauge variables (LVars) without writing a module or gauge to go inside FS. Pete
FSlikerX Posted August 26, 2015 Author Report Posted August 26, 2015 These are the variables used by FS when it is controlling the sub-systems. Sophisticated aircraft like the PMDG 737NGX, the 777X and the Aerosoft Airbuses implement their own subsystems. There may be some overlap, you'd have to check. The variables you mention are available in FSUIPC offsets if you are not using SimConnect. The Lua program method is the only way to real local gauge variables (LVars) without writing a module or gauge to go inside FS. Pete Hi Pete,https://drive.google.com/file/d/0B52r0OXN32CXWkk4Z01xZnJUdUE/view?usp=docslist_api This is the newest SDK for the Airbuses... Is it possible to read for example the selected ALT (AB_AP_ALT_Select) with the following command: ALT_value = ipc.readLvar(AB_AP_ALT_Select) ?
Pete Dowson Posted August 26, 2015 Report Posted August 26, 2015 https://drive.google.com/file/d/0B52r0OXN32CXWkk4Z01xZnJUdUE/view?usp=docslist_api This is the newest SDK for the Airbuses... Is it possible to read for example the selected ALT (AB_AP_ALT_Select) with the following command: ALT_value = ipc.readLvar(AB_AP_ALT_Select) ? Sorry, I've no idea whatsoever what the names in that SDK section refer to. If they are Lvars (local panel variables, often named with L: beforehand), then, yes, Lua can read the values But names are strings, so it should look like ALT_value = ipc.readLvar("AB_AP_ALT_Select") You'll need to read and understand the SDK to decide, I think. Pete 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now