Jump to content
The simFlight Network Forums

Recommended Posts

Posted
  On 1/7/2025 at 8:03 PM, Metall4You said:

Exception 1 "ERROR", Ref 19781, Index param 2 on TransmitClientEvent, object=0, id=68038 (????), data=67108864

Expand  

This error usually indicates an issue with simconnect and is temporary, but in this case I am not sure as I would expect to see more than just one error. Do you see this all the time or occasionally? is this causing any issues?

Your log file does show some issues and is rather strange...could you please download 7.5.1 again and re-install to be sure that you are using the latest official 7.5.1 version please.
Also, there are some re-connection attempts so you should tune the startup parameters - set the following in your FSUIPC7.ini file:
    DetectToConnectDelayAuto=100
    InitialStallTime=0

Then can you switch off all logging (including lua plugin logging) and activate logging for Buttons & Keys and Events only, and show me / attach your FSUIPC7.log and FSUIPC7.ini files when you get the error.

 

Posted

Hi John

Many thanks for your Support. Would be happy to send you the INI and LOG files. My problem at the moment is that I can't get the LVAR 'FS2CEW_RAASPRO_MASTER_SWITCH' to work. would like to control the RAAS power button from FSCrew using Lua script. 

Error: **** Lvar 'FS2CEW_RAASPRO_MASTER_SWITCH' not found: cannot add to offset 0xA010

Thanks for your help

FSUIPC7.INIFetching info... FSUIPC7.logFetching info...

Posted
  On 1/8/2025 at 1:08 PM, Metall4You said:

My problem at the moment is that I can't get the LVAR 'FS2CEW_RAASPRO_MASTER_SWITCH' to work. would like to control the RAAS power button from FSCrew using Lua script. 

Error: **** Lvar 'FS2CEW_RAASPRO_MASTER_SWITCH' not found: cannot add to offset 0xA010

Expand  

Isn't it obvious what that error is? The lvar is not available. This is probably because since version 7.5.0, only an initial scan for lvars is performed, as continual scanning for lvars can cause the WASM to crash. If an lvar that you want to use is not picked-up in the first scan, there are a few things you can do:

1. Increase the WASM ini parameter LvarScanDelay. This ini parameter determines the delay from aircraft load to the first lvar scan, and the longer the delay, the more lvars will be detected. Try increasing this value. See the WASM section in the Advanced User guide for further details. 
2. You can have a lua script to test for the existence of an lvar and if not available, then you can request an WASM reload, e.g.

  Quote
-- Check Lvar exists
while (ipc.getLvarId("L:FS2CEW_RAASPRO_MASTER_SWITCH") == nil)
do
  ipc.reloadWASM()
  ipc.sleep(200) -- wait before checking again
end

-- Lvar now available - continue
Expand  

As for this error: 

  On 1/7/2025 at 8:03 PM, Metall4You said:

Exception 1 "ERROR", Ref 19781, Index param 2 on TransmitClientEvent, object=0, id=68038 (????), data=67108864

Expand  

That looks to be due to an offset request at 0x0284 to update the ADF1 Standby frequency, and FSUIPC was using the wrong control number, using 68038 which doesn't exist. I have corrected this in the attached version if you could try it.

John

FSUIPC7.exeFetching info...

Posted

Hi John

Many thanks for the new exe file, the error has disappeared. I have installed the code for the lvar and it is loaded. 
However, if I now use "ipc.writeLvar("L:FS2CEW_RAASPRO_MASTER_SWITCH ", 1) to write value 1 to ON I get the error:

*** LUA Error: C:\Homecockpit 737\FSUIPC7\raas_power_switch.lua:50: Event proc not found

if I use "Set lvar" from the form of fsuipc it works, but the entry looks like this : "FS2CEW_RAASPRO_MASTER_SWITCH 0046"

Thanks for your help

FSUIPC7.logFetching info...

Posted

Hi John

 

If I assign the offset for the lvar in the fsuipc.ini and I reload WASM with ipc.reloadWASM(), is the offset assigned when it is available or do I have to recreate it with LUA?

Ramon

Posted
  On 1/9/2025 at 2:02 AM, Metall4You said:

However, if I now use "ipc.writeLvar("L:FS2CEW_RAASPRO_MASTER_SWITCH ", 1) to write value 1 to ON I get the error:

*** LUA Error: C:\Homecockpit 737\FSUIPC7\raas_power_switch.lua:50: Event proc not found

Expand  

That is an error on line 50 of the lua script - please attach that script.

  On 1/9/2025 at 8:13 AM, Metall4You said:

If I assign the offset for the lvar in the fsuipc.ini and I reload WASM with ipc.reloadWASM(), is the offset assigned when it is available or do I have to recreate it with LUA?

Expand  

No - the offset will be populated when the lvar becomes available,

Posted

Hallo John

Was ich auch nach dem Lesen der Lua-Bibliothek nicht ganz verstehe, ist, ob ich den Wert des LVAR direkt mit  ipc.writeLvar("L:FS2CEW_RAASPRO_MASTER_SWITCH", 1) ändere oder den in der fsuipc.ini mit 1=L:FS2CEW_RAASPRO_MASTER_SWITCH=UB0xA000 definierten Offset mit ipc.writeUD("A000", 1) ansprechen muss. 

beides, weil der gewünschte Erfolg noch nicht eintritt.

fsuipc.ini-Eintrag:

[LvarOffsets]
1=L:FS2CEW_RAASPRO_MASTER_SWITCH=UB0xA000

wenn ich es mit set var aus dem fsuipc-Programm mit Parameter 1 ausführe , funktioniert es

Mit freundlichen Grüße

Ramon

raas_power_switch.lua

Posted
  On 1/11/2025 at 12:24 PM, Metall4You said:

Was ich auch nach dem Lesen der Lua-Bibliothek nicht ganz verstehe, ist, ob ich den Wert des LVAR direkt mit  ipc.writeLvar("L:FS2CEW_RAASPRO_MASTER_SWITCH", 1) ändere oder den in der fsuipc.ini mit 1=L:FS2CEW_RAASPRO_MASTER_SWITCH=UB0xA000 definierten Offset mit ipc.writeUD("A000", 1) ansprechen muss. 

beides, weil der gewünschte Erfolg noch nicht eintritt.

fsuipc.ini-Eintrag:

[LvarOffsets]
1=L:FS2CEW_RAASPRO_MASTER_SWITCH=UB0xA000

wenn ich es mit set var aus dem fsuipc-Programm mit Parameter 1 ausführe , funktioniert es

Mit freundlichen Grüße

Expand  

Both should work, but if you are adding to an offset as UB (Unsigned Byte), then you should use ipc.writeUB, and not ipc.writeUD

Your lua script doesn;t make much sense.  Why are you reding the value of offset A000, when that would be passed into the event function, e.g.
   function ToggleRAASPower(offset, value)
   ...
   end

And why are you writing to update the lvar, when that event function is being called on the lvar change? With that script running, the lvar will just always stay at the same value, either 0 or 1.

But I think your issue is that the lvar is still not being added to the offset. Are you still seeing a message like this:

     5437 **** Lvar 'FS2CEW_RAASPRO_MASTER_SWITCH' not found: cannot add to offset 0xA010
?

Can you please set WAPI Debug level logging, as well as logging for Lua Plugins, and show me your FSUIPC7.log file as well as the lua script again if modified..


 

Posted
  On 1/12/2025 at 5:26 AM, Metall4You said:

I changed the script again and set WASM debug. 

Expand  

I asked for WAPI debug logging (Log -> WAPI -> Debug) mot WASM debug logging, but it doesn't matter.

You should rename your script -  raas_power_switch contains 17 characters, and there is a limit of 16 chars for lua script names. This can cause issues.

But the problem is this:

  Quote

while (ipc.getLvarId("L:FS2CEW_RAASPRO_MASTER_SWITCH") == nil)

Expand  

It seems that nil is no longer being returned when the lvar doesn't exist. I have no idea why or when this stopped working - I will investigate this next week, For the time being, change that to:

  Quote

-- Check Lvar exists
id = ipc.getLvarId("L:FS2CEW_RAASPRO_MASTER_SWITCH")
while ( id == nil or id > 65535 or id < 0)
do
  ipc.reloadWASM()
  ipc.sleep(200) -- wait before checking again
  id = ipc.getLvarId("L:FS2CEW_RAASPRO_MASTER_SWITCH")
end
raasvar=1

Expand  

Are you sure that lvar name is correct, and its not FS2CREW_RAASPRO_MASTER_SWITCH?

John

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.