Jump to content
The simFlight Network Forums

FSUIPC 4.0 : write to offsets 3101 and 3103


Recommended Posts

Dear Pete,

while doing an update to FSX and FSUIPC 4.01 I notice some problems writing to the offsets 3101 and 3103 (using a small hardware cockpit).

While doing a cyclic write with the value '1' to 3101 (alternator switch) and 3103 (avionic switch) the switches seems to toggle (with each write of '1').

Regards

Uli

P.S. Thank you very much for this great tool.

Link to comment
Share on other sites

while doing an update to FSX and FSUIPC 4.01 I notice some problems writing to the offsets 3101 and 3103 (using a small hardware cockpit).

While doing a cyclic write with the value '1' to 3101 (alternator switch) and 3103 (avionic switch) the switches seems to toggle (with each write of '1').

Are you sure nothing else is controlling those too? I do use those here. What was the period of your "cycle"? I'll try to test the same here.

Regards

Pete

Link to comment
Share on other sites

In FsX 3102 and 3103 don't work usefull, insead of them use:

281C, 4 Byte, MasterBattery

2E80, 4 Byte, MasterAvionics

1=ON and 0=OFF

They work very well in FsX.

Hi Thomas,

In actual fact 3102 and 281C do exactly the same thing -- they both simply write to the SimVar "ELECTRICAL MASTER BATTERY". They are effectively one and the same.

The 3103 and 2E80 case is similar, except that whilst they should write to the SimVar AVIONICS MASTER SWITCH, that doesn't work for writing, so I have to see if the value being written is the same (logically) as the current value, and if not send the Sim Event "TOGGLE_AVIONICS_MASTER" instead.

Both seem to work fine here. I'll need more data from one of you to understand why you are seeing different things for coding which appears the same.

Please log Events and IPC Writes in FSUIPC4, and add

LogSimC=281C,2E80,3102,3103

to the [General] section of FSUIPC4.INI. Reproduce the problem and send me the Log.

Thanks,

Pete

Link to comment
Share on other sites

Hello Pete,

I am using the german version of FSX and FSUIPC 4.01.

Please take care: I have problem writing 3101 (not 3102).

While build the log file I got logging parts like the following.

It looks like the toggle 'command' is given on each write of '1' ?

99594 WRITE0 3103, 1 bytes: 01 .

99594 *** EVENT: Cntrl= 66293 (0x000102f5), Param= 0 (0x00000000) TOGGLE_AVIONICS_MASTER

99641 SimRead: 2E80="AVIONICS MASTER SWITCH", INT32=0, FLT32=0, FLT64=1.5215e-311, Other=[00, 00 00 00]

99641 SimRead: 3103="AVIONICS MASTER SWITCH", INT32=0, FLT32=0, FLT64=0, Other=[00, 00 00 00]

101516 WRITE0 3103, 1 bytes: 01 .

101531 *** EVENT: Cntrl= 66293 (0x000102f5), Param= 0 (0x00000000) TOGGLE_AVIONICS_MASTER

101578 SimRead: 2E80="AVIONICS MASTER SWITCH", INT32=1, FLT32=1.4013e-045, FLT64=1.5215e-311, Other=[01, 00 00 00]

101578 SimRead: 3103="AVIONICS MASTER SWITCH", INT32=1, FLT32=1.4013e-045, FLT64=4.9407e-324, Other=[01, 00 00 00]

103234 WRITE0 3103, 1 bytes: 01 .

103234 *** EVENT: Cntrl= 66293 (0x000102f5), Param= 0 (0x00000000) TOGGLE_AVIONICS_MASTER

103297 SimRead: 2E80="AVIONICS MASTER SWITCH", INT32=0, FLT32=0, FLT64=1.5215e-311, Other=[00, 00 00 00]

103297 SimRead: 3103="AVIONICS MASTER SWITCH", INT32=0, FLT32=0, FLT64=0, Other=[00, 00 00 00]

104859 WRITE0 3103, 1 bytes: 01 .

104875 *** EVENT: Cntrl= 66293 (0x000102f5), Param= 0 (0x00000000) TOGGLE_AVIONICS_MASTER

104922 SimRead: 2E80="AVIONICS MASTER SWITCH", INT32=1, FLT32=1.4013e-045, FLT64=1.5215e-311, Other=[01, 00 00 00]

104922 SimRead: 3103="AVIONICS MASTER SWITCH", INT32=1, FLT32=1.4013e-045, FLT64=4.9407e-324, Other=[01, 00 00 00]

108359 WRITE0 3101, 1 bytes: 01 .

108359 *** EVENT: Cntrl= 66363 (0x0001033b), Param= 0 (0x00000000) TOGGLE_ALTERNATOR1

108422 SimRead: 3101="GENERAL ENG MASTER ALTERNATOR:1", INT32=0, FLT32=0, FLT64=2.0392e-311, Other=[00, 00 00 00]

110031 WRITE0 3101, 1 bytes: 01 .

110047 *** EVENT: Cntrl= 66363 (0x0001033b), Param= 0 (0x00000000) TOGGLE_ALTERNATOR1

110094 SimRead: 3101="GENERAL ENG MASTER ALTERNATOR:1", INT32=1, FLT32=1.4013e-045, FLT64=2.0392e-311, Other=[01, 00 00 00]

111656 WRITE0 3101, 1 bytes: 01 .

111656 *** EVENT: Cntrl= 66363 (0x0001033b), Param= 0 (0x00000000) TOGGLE_ALTERNATOR1

111719 SimRead: 3101="GENERAL ENG MASTER ALTERNATOR:1", INT32=0, FLT32=0, FLT64=2.0392e-311, Other=[00, 00 00 00]

113375 WRITE0 3101, 1 bytes: 01 .

113391 *** EVENT: Cntrl= 66363 (0x0001033b), Param= 0 (0x00000000) TOGGLE_ALTERNATOR1

113438 SimRead: 3101="GENERAL ENG MASTER ALTERNATOR:1", INT32=1, FLT32=1.4013e-045, FLT64=2.0392e-311, Other=[01, 00 00 00]

I send the values (for this logfile above) using FS Interrogate; my hardware cyclic set the value (depending on status of hardware switches) a few times per second. In both cases I see the switches toggle in FSX.

Does it help you?

Regards

Uli

Link to comment
Share on other sites

Please take care: I have problem writing 3101 (not 3102).

Ah .. right. I was looking at Thomas's reply not your original. Sorry.

Thanks for the Log, it was very useful. I think I've found the problem, but before I release it I am sending you just the DLL zipped up to try. Let me know please. It will be 4.012.

Thanks,

Pete

Link to comment
Share on other sites

Dear Pete,

with your DLL 4.012 the offsets 3101 and 3103 works well (using the cockpit hardware, too). Thank you. :D

While 'playing' with the switches I observe a kind of initialisation problem with the offset 3104 (fuel pump switch), which is difficult for me to explain.

1)

I (cold-)start FSX reloading a flight which was saved with 'fuel pump = off'.

While FSX is still loading I activate my hardware cockpit which starts cyclic writing '1' to 3104 (on connection). While the FSX finish loading the fuel pump switch (shown on FSX screen) is still in 'off' position (even I cyclic write '1').

If I write '0' once I observe that the switch make a fast step to 'on' position and immediately return to 'off' position.

Further on it work well.

2)

So I try to repeat that using FS-Interrogate, but the behaviour is different. The first time I write '1' to 3104 the fuel pump is still 'off'. The second time I write '1' the fuel pump goes 'on'.

119875 WRITE0 3104, 1 bytes: 01 .

119875 SimWrite[718]: 3104="GENERAL ENG FUEL PUMP SWITCH:1", DDef=00000005, Ref=3379, Size=4 [flt=0.000000, int=1, 0x00000001]

122844 READ0 337E, 2 bytes: DE 21 .!

123687 READ0 3104, 1 bytes: 00 .

127844 READ0 337E, 2 bytes: 9B 25 .%

127891 WRITE0 3104, 1 bytes: 01 .

127891 *** EVENT: Cntrl= 66340 (0x00010324), Param= 0 (0x00000000) TOGGLE_ELECT_FUEL_PUMP1

127953 SimRead: 3104="GENERAL ENG FUEL PUMP SWITCH:1", INT32=1, FLT32=1.4013e-045, FLT64=2.0477e-311, Other=[01, 00 00 00]

130031 READ0 3104, 1 bytes: 01 .

3)

I repeat test 1), but start my cockpit hardware (cyclic write '1') while FSX have finished its loading. Now the behaviour is like 2). On second write of '1' the fuel pump switch changes.

Do you think there is something you can do?

Regards

Uli

Link to comment
Share on other sites

While 'playing' with the switches I observe a kind of initialisation problem with the offset 3104 (fuel pump switch), which is difficult for me to explain.

I think I can explain it ...

In some Beta version of FSX the SimVar for the fuel pump switch seemed to work okay for writing as well as reading. So in my tables I marked all of them (the 3104 one for Engine 1 and 3125, 3958, 3A18, 3AD8, 3B98) as 'OK' for writing.

Then I found that writing wasn't working (in a later Beta of FSX I think), and unmarked this -- on all of those offsets, excepting 3104 which I missed! Duh!

What happens is that, on a write to a SimVar which doesn't support writes an exception is generated by SimConnect, which eventually gets back to me (all these things are aynchronous). When I see the exception on this write, I add another flag "Write Error" which makes future attempts bypass the SimVar writing section and operate using events (controls) instead.

I think this explains all your results -- the business of many settings before FS is full ready is probably explained by the delay in SimConnect getting the row of Exceptions back to me.

It is easily fixed and will be so in the next update, this weekend. If you cannot wait I can send you an interim version, but I'd rather not if you don't need it.

Thanks!

Pete

Link to comment
Share on other sites

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.