
P-38L
Members-
Posts
24 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Everything posted by P-38L
-
Dear Mr. John I finally understood how it should be done. I didn't know about assigning one variable to 0x2750 and the next to 0x2758; I thought I could use normal consecutive numbers. Now knowing that I have finally this: 90=L:var_cabinPressureDifferential=0x2750 91=L:var_cabinPressurizationAltitude=0x2758 92=L:var_cabinClimbRate=0x2760 and then from there, I took them to SIOC at Opencockpits for the analog instruments and they are working perfectly. I really appreciate your great help and patience. Alejandro
-
If you list the lvars (Add-ons -> WASM -> List Lvars) do you see the lvars with the correct values? Yes sir. The same value as shown in the instrument. And I put it in two memory addresses like this: 92=CABIN_PRESS_ALT=0x2748 93=var_cabinPressurizationAltitude=0x2749 Row 93 contains the original airplane variable. Row 92 contains my own variable, which I wrote like this: ipc.execCalcCode("1 if{ (L:var_cabinPressurizationAltitude, FT) 1 * 0 < if{ 0 100 360 / * } els{ (L:var_cabinPressurizationAltitude, FT) 1 * 45000 > if{ 360 100 360 / * } els{ (L:var_cabinPressurizationAltitude, FT) 1 * 0 - 45000 0 - / 360 0 - * 0 + 100 360 / * } } } 10 * (>L:CABIN_PRESS_ALT)") In both examples the reading of the variable value does not match at all: Here is the copy of the .ini and .log files: FSUIPC7.log FSUIPC7.ini
-
Dear Mr. Dowson I tried with the examples you kindly gave me, but I still don't get the number that the simulator shows me. I even tried using SB, UB, SW, UW, SD, UD and F and none of those options give me the answer, it even gives me random numbers including negative numbers that "jump" from positive to negative quickly. After many attempts I came up with this idea: ipc.execCalcCode("(L:var_cabinPressureDifferential, PSI) 100 * (>L:CABIN_PRESS_DIFF)") and then I got the exact number; So far so good, 1 out of 2. But I haven't had any luck with the variable: ipc.execCalcCode("(L:var_cabinPressurizationAltitude) (>L:CABIN_PRESS_ALT)") I've even written it like this without getting any positive result: ipc.execCalcCode("(L:var_cabinPressurizationAltitude, FT) (>L:CABIN_PRESS_ALT)") I don't know if I should use a multiplier or divisor like I did with the "var_cabinPressureDifferential" variable, but I've used all my math resources without any optimal answer. It always jumps like crazy from negative to positive for no apparent reason. Alejandro
-
Hello I am using the KingAir analog from BlackSquare. I am trying to assign the value of two L type variables to a specific address or another variable. . It can be noted that both values coincide with what the instrument needles indicate. I then wrote the following codes: local circuitConnection = ipc.readLvar("L:var_cabinPressurizationAltitude") local valueToWrite = circuitConnection ipc.writeUB(0x274A, valueToWrite) local circuitConnection = ipc.readLvar("L:var_cabinPressureDifferential") local valueToWrite = circuitConnection ipc.writeUB(0x2749, valueToWrite) But the values read from these addresses are very different. I have also tried it this way: ipc.execCalcCode("(L:CABIN_PRESS_DIFF)") ipc.execCalcCode("(L:CABIN_PRESS_ALT)") ipc.reloadWASM(); ipc.execCalcCode("(L:var_cabinPressureDifferential, Number) (>L:CABIN_PRESS_DIFF)") ipc.execCalcCode("(L:var_cabinPressurizationAltitude, Number) (>L:CABIN_PRESS_ALT)") Considering that I have assigned an address to these variables within the FSUIPC7.ini [LvarOffsets] 91=CABIN_PRESS_DIFF=UB2747 92=CABIN_PRESS_ALT=UB2748 And the result has been equally wrong. If you could please give me some idea of how to get the indicated value to be the one I need to read and write to an address or another variable. Thank you very much. Alejandro Gómez.
-
Hello Mr. Dowson. With your wonderful explanation, I was able to improve my programming code. I have made great progress, and so far I have managed to control a large percentage of the cockpit elements. Thank you very much for your valuable help. Alejandro
-
Excellent explanation. I finally got it done thanks to your kind help. I will have to use some variables with the method I showed you and I am already using others with myOffsets. Example: ipc.execCalcCode("(A:PROP RPM:1, rpm) 1370 < (>L:L_PROP_PITCH)") ipc.writeUB(0x66C0, ipc.readLvar("L:L_PROP_PITCH")) In this case, I need the value to be given only when the number in variable A is less than 1370, otherwise it will always be a zero. I don't know if this can be done in the myOffsets.txt file as well. In the following example the variable depends on two variables A and L to deliver the value. In all these cases it is working fine. Also, I don't know if this method can be implemented in the myOffsets.txt file. ipc.execCalcCode("20 13 (>A:BUS LOOKUP INDEX,number) (A:CIRCUIT CONNECTION ON:20, number) ! (>L:CBL_BAT_RELAY)") ipc.writeUB(0x66C2, ipc.readLvar("L:CBL_BAT_RELAY"))
-
Hello I am programming the reading and assignment of variables, so far everything has been fine. I am using the following line of code and it works perfectly since I can assign the value of variable A to variable L. ipc.execCalcCode("(A:CIRCUIT ON:89, Bool) (>L:WING_DEICE)") ipc.writeUB(0x66C8, ipc.readLvar("L:WING_DEICE")) I am doing this so that I can get the values of the KingAir Analogic in MFS2020 indicator lights. My question is this: the LED turns on when the switch is activated or when the light test button is pressed using the mouse only. But in the latter case, the LED does not turn on, it only turns on when I use the switch. What I am looking for is for it to turn on when the switch is used or when the light test button is pressed. Something like the following, but that doesn't work for me. Only the LED lights up when I use the Light Test, but not when I use the switch. ipc.execCalcCode("(A:CIRCUIT ON:89, Bool) or (L:var_GlareshieldAnnunciatorTest, Number) (>L:WING_DEICE)") ipc.writeUB(0x66C8, ipc.readLvar("L:WING_DEICE")) I've tried OR and AND but I can't get it to work. Any help would be greatly appreciated.
-
Hello Mr. Dowson I finally did it... in a different way, but I managed to do it. I'm going to share with you the method I did. I used MobiFlight and assigned an action to an axis of my joystick (Saitek X52 Pro) that is always generating "electronic noise", in this case it is the Axis Slider 1 and I wrote the following code: 20 13 (>A:BUS LOOKUP INDEX,number) (A:CIRCUIT CONNECTION ON:137, Bool) 100 * - (>L:CIRCUIT_CONNECTION_ON_37) I am using (A:CIRCUIT CONNECTION ON:137) instead of 37, because the command line indicates this number. If I move the Relay with the mouse, the value automatically changes from 20 to -80, even if I do it with the button assignment on the joystick it also makes this change. So far so good... but unfortunately I don't know how to make MobiFlight always "watch" the value of a variable without having to assign it to any button or axis. Luckily, the Axis Slider 1 has a damaged potentiometer and generates that "electronic noise"; so, in this way, it is always "reading" and "writing" the values. I am very grateful for your valuable help, your dedication and time, and for your admirable patience. PD: If you know the trick I need in MobiFlight, I would really appreciate it. Regards Alejandro Gómez
-
A little progress. I wrote the following line of code based on what you shared with me. Due to the Relay's behavior, the values are 20 and -80 according to the table. And the value that it gives me at address 66C0 is indeed the number 20, but even if the Relay is pushed or pulled, the value will always be 20. Even if the Relay is Pulled and I restart the FSUIPC7, the value will always be 20. It does not show me the -80 If I write the following in the myOffests.txt file, the value will always be 0, that's why I had to remove this line of code.
-
Inside the FSUIPC7.ini program I have written: And in the same folder of the FSUIPC7 I have a file "Ejecutar.lua" But the value written in 66C0 doesn't change at all. I don't know if I'm misinterpreting the variables. To make sure it was working, I did a test with an L type variable, and in this case, it does work. Here the value written to 66C0 is always "looking" at the value of the variable. Honestly, I don't know what to do.
-
Thank you for your kind reply. The process you indicate I have written in LUA and it actually works, but the variable (>L:My_Relay_Result) only shows its value when I execute the joystick action assigned to that LUA command. For example, if the Relay "jumps" automatically for some reason due to a failure in the plane, the variable (>L:My_Relay_Result) does not show any change in value unless I press the Joystick button assigned to the joystick, and this is when the value is updated. Is there any way for the variable to show its value automatically when it senses a change in the plane, without me having to press any button for its value to change?
-
Dear Mr. Dowson, I am very grateful to you for taking the time to help me with this task. I will continue to investigate and do trial-and-error tests. If I manage to figure it out, I will share it. Thank you very much.
-
Thank you for your kind reply. My bad, I thought the variable was only (A:CIRCUIT CONNECTION ON:37), but looking closely I found that the variable has a very different presentation. Using the mouse when the Relay is pushed, these are the values it presents: And when the Relay is pulled, these are the values: I don't know how to change the values indicated here using LUA programming. I've been experimenting with other variables and they work fine. For example, using the programming you kindly shared with me, I was able to see the behavior of assigning new variables. In my FSUIPC7.ini file I have the following written: And without any problems I was able to read values that I myself wrote from the LUA programming. My experiment worked thanks to your help. My big problem is that I don't know how to solve the problem of the variable that appears as I indicated in the first two images. I appreciate your valuable help.
-
Hello I am programming in LUA and I want to read or write the value of the variable (A:CIRCUIT CONNECTION ON:37) which belong to the analog KingAir. Inside the directory F:\SteamLibrary\Community\fsuipc-lvar-module I only have the "modules" directory and three files namely: FSUIPC_WASM.ini layout.json manifest.json In the LUA programming it tells me that I cannot read variables of type "A". What should I do or what am I missing to be able to achieve this? To find out if the LUA program I'm writing is working, I wrote the following line: ipc.keypressplus(76) which uses the letter "L" to turn the lights on or off. This works fine from my joystick Here is my code: local circuitState = ipc.readAvar("A:CIRCUIT CONNECTION ON:37", "Bool") ipc.display("Circuit Breaker 37: " .. circuitState) local state = ipc.readLvar("L:Circuit37", 1) if state == 0 then ipc.writeLvar("L:Circuit37", 1) else ipc.writeLvar("L:Circuit37", 0) end But it doesn't work Any help will be greatly appreciated.
-
Dear Mr. Dowson. I am very grateful for your magnificent help. Thanks to your advice I was able to achieve it. I am going to perfect the method of using LVARS through MobiFlight.
-
I have tried and I have not succeeded. I used the step by step on the website that you suggested. I got to Step 5: Putting the event to use. I also tried to place the programming that you sent me using the Developer mode of Flight Simulator. So I don't know where to locate the programming that you have sent me. Also on the website https://hubhop.mobiflight.com/presets/ Indeed, Flysimware and the plane do appear. Mr. Jaime Leon offers the codes as well as the programming (the same one that you sent me), but I still don't know where or how to put that programming. I apologize for all this inconvenience, but I have not been able to achieve it.
-
Thanks for your kind reply. Indeed the plane is a Cessna 414 developed by the Flysimware company. I am designing an engine ignition panel. If you wish, I can send you the airplane installer.
-
Greetings to this great technical team FIRST ATTEMPT I'm trying to implement a switch to handle an LVAR variable. This switch is connected to a LEOBODNAR card. I obtained the variable from the FSUIPC7 list in this way: ELECTRICAL_Switch_Battery_Master = 0.000000 I can see this because using the mouse to set the BATTERY MASTER switch to ON and then reloading the LVARS list the value has changed to: ELECTRICAL_Switch_Battery_Master = 1.000000 Up to this point I have been able to know which variable I have to implement to place it in a macro. I have located the macro inside the FSUIPC7 folder and its name is: C414.mcro And its content is: [Macros] 1=L:ELECTRICAL_Switch_Battery_Master=Set When I move my LEOBODNAR card switch I can assign this macro to that plane panel switch. This tells me that so far I'm doing well. When I move my switch connected to LEOBONDAR card; the MASTER BATTERY on the plane's panel actually moves between the ON and OFF positions, BUT it does not do any function on the plane, that is, the plane's switch is in the ON position, but the panel does not represent that it is on. the switch moves between ON and OFF as if it had no power. If, on the other hand, I use the mouse by moving that switch on the airplane panel, in this case and only in this case, does it do what it is supposed to do, which is to make the battery power the panel. If I use my switch it does absolutely nothing; It's as if using my LEOBODNAR card switch, I made the plane's BATTERY MASTER switch move, but there was no battery. What am I doing wrong? Am I missing any steps in the programming or assignment? SECOND TRY I then decided to use an OPENCOCKPITS card that works switches. Inside the FSUIPC7.ini I wrote the following: [LvarOffsets] 1=ELECTRICAL_Switch_Battery_Master=UB66C0 Then I made a program in SIOC with the following content: Var 0001, Link FSUIPC_INOUT, Offset $66C0, Length 1 Var 0002, Link USB_ANALOGIC, Device 1, Input 1, PosL 0, PosC 127, PosR 255 { L0 = V0002 IF L0 <> 255 { L1 = 0 } IF L0 = 255 { L1 = 1 } V0001 = L1 } The result is the same, the reading of the 66C0 variable shows me a 1 for ON and a 0 for OFF, the MASTER BATTERY SWITCH moves, but does not act on the plane. If I use the mouse on the MASTER BATTERY SWITCH, it does power the airplane panel and shows me that the 66C0 variable changes from 1 to 0. Any help you can give me I would appreciate it.
-
Thanks for your kind reply. I'm still lost. How can I create a variable in FSUIPC7 so that it can be read through the Opencockpits SIOC through LeoBodnar switches. For example, the variable 66C0 that detects if a switch was used through LeoBodnar in which it writes a 1 or a 0 and this is read taking the address 66C0 to be used in the Opencockpits SIOC. Maybe you can show me an example. Thank you so much.
-
Best regard In the Button and Switch Assignments area, I have programmed some switches for: Adf 1 Dec Adf 1 Inc Adf1 Radio Swap. This has generated some texts within FSUIPC7.ini which appear like this: [Buttons] PollInterval=25 ButtonRepeat=20,10 2=PB,0,C65668,0 -{ADF_1_DEC}- 3=PB,1,C65650,0 -{ADF_1_INC}- 4=PB,18,C66741,0 -{ADF1_RADIO_SWAP}- Up to this point, everything works well and the buttons do their job and on the plane's ADF panel, they change without problem. What I want is to take this information to a variable that could start in 66C0 so that I can read it with the Opencockpits SIOC program to present it on an LCD display I have created a file called myOffests.txt inside the FSUIPC7 folder and written the following information inside that file: // offset, size, simvar, type, units [, w] 0x66C0, 1, ADF_1_DEC, Bool, Bool, w 0x66C1, 1, ADF_1_INC, Bool, Bool, w 0x66C2, 1, ADF1_RADIO_SWAP, Bool, Bool, w But it does not work. I don't know if I need to put some extra information in the FSUIPC7.ini, such as: [myOffsets] 1=myOffsets I have programmed many events in SIOC and they work fine, but I cannot get this information that I need. If you can please help me with this project, I would be very grateful.
-
Hello * I have the updated MSFS2020. * FSUIPC7 registered. * KingAir analog aircraft from JusftFlight. This is my current configuration in the FSUIPC7.ini [Buttons] PollInterval=25 ButtonRepeat=20,10 1=RA,8,CM1:442,1 -{Macro a32nxMCDU: L:var_avionicsMasterSwitch set}- 2=UA,8,CM1:442,0 -{Macro a32nxMCDU: L:var_avionicsMasterSwitch set} I am programming the switch of the Avionics Master Switch. My JoyStick flips the switch On and Off (the animation shows the switch up and down on the plane panel) but does nothing on the plane. But if I use the mouse on that switch, then if it executes the action. if i use the Tools-Behavior-LocalVariables it shows 1 and 0 when i use the JoyStick and when i use the mouse. But it only does the action if I use only the mouse. It doesn't do the action if I use the JoyStick, even though the switch shows its movement up and down. I would appreciate any help you can give me regarding this behavior. Thank you
-
Mr. John Dowson. I remain eternally grateful for your help. Your answer has opened many doors for me. Thank you.
-
*** Moved from FAQ to support forum - please post ALL support request in this forum *** Hello Mr. When I select a button on the airplane panel, how can I know the event ID code number that button is to be assigned to a switch on my joystick or a switch in my own simulator cabin? Many of the functions of the cabin such as levers, and axes I can assign them without any problem to the main screen of the FSUIPC. I can also assign buttons that I know what they are called on the airplane panel and assign them to the FSUIPC. But if there is a button or switch that does a certain function on the panel and I want to use my joystick to perform that same action. I am also using the FSInterrogate2std but I have had no luck finding the code I am looking for. I very much appreciate your response.