Jump to content
The simFlight Network Forums
Sign in to follow this  
marcusbx33

Offsets 089A, 0932 and 310A for disconnect throttle

Recommended Posts

Hello,

 

I have tested the offsets with SIOC:

 

089A engine #1 throttle for disconnect 310A bit 3

0932 engine #2 throttle for disconnect 310A bit 3

310A for disconnect: bit 3 throttle all

 

Script for Level-D: check with VNAV mode and speed mode of MCP

-----------------------------------------------------------

Var 9010 Name DiscVNAV
Var 9011 Name DiscSPD
Var 9012 Name DiscFlag

{
 &DiscVNAV = TESTBIT &MCP_Flags 7
 &DiscSPD = TESTBIT &MCP_Flags 16
 C0 = &DiscVNAV = 1
 C1 = &DiscSPD = 1
 C2 = C0 OR C1
 
 IF C2
   {
    &DiscFlag = 1 
   }
 ELSE
   {
    &DiscFlag = 0
   }  
 &FlightCtrl = CHANGEBIT 3 &DiscFlag
}

Var 9020 Name FlightCtrl Link FSUIPC_OUT offset $310A Length 1

-----------------------------------------------------

 

This does not work...

 

the offset 310A is noted for the writing: May work, untested, but FSUIPC internal in any case

is It the right method!

Thanks for the reply.

 

Regards,

Marc.

 

 

Share this post


Link to post
Share on other sites

Hello,

 

I have tested the offsets with SIOC:

 

089A engine #1 throttle for disconnect 310A bit 3

0932 engine #2 throttle for disconnect 310A bit 3

310A for disconnect: bit 3 throttle all

This does not work...

 

089A is throttle 1 control and the disconnect bit in 310A is bit 6. Similarly 0932 is throttle 2 and the 310A bit is bit 7. You are confusing the "all throttles" assignable control (AXIS_THROTTLES_SET or THROTTLES_SET) with direct individual control via offsets.

 

I don't understand your script at all.  Where does it show you controlling the throttles via offsets 089A and 0932?

 

the offset 310A is noted for the writing: May work, untested, but FSUIPC internal in any case

 

Well it does work because it is in use by many applications, including in my own cockpit. Sorry, but many of the provisions in those columns simply haven't bee updated.

 

Regards

Pete

Share this post


Link to post
Share on other sites

Hello Pete,

 

Thanks for the reply.

Ok for the bit 6 and 7 in 310A. I confused with 'All throttles'.

 

The offsets 089A and 0932 are in the documentation FSUIPC4 offsets Status 4.40 (This is not the latest documentation) associated with offsets 310A for disconnection

The script is only for a test. With Level-D, I manage the auto throttle modes via Lekseecon for the disconnection
 
Therefore, you confirm that one can use the offsets 088C and 0924 (ENG1 and ENG2 Throttle) with the offsets 310A for the disconnection.
 
Thanks for the reply.
 
Regards,
Marc.
 
 
 

 

Share this post


Link to post
Share on other sites
Therefore, you confirm that one can use the offsets 088C and 0924 (ENG1 and ENG2 Throttle) with the offsets 310A for the disconnection.

 

No, offsets 088C and 0924 ARE the actual throttle values in FS and writing to them cannot be disconnected. That is why i added offsets 089A and 0932, which FSUIPC itself copies to 088C and 0924, if allowed to by bits in 310A. That's the whole point! Why have you suddenly reverted to direct throttle control if you want to be able to disconnect?

 

Pete

Share this post


Link to post
Share on other sites

Hello Pete,

 

So I did a test with this little program below:

 

Var 9001 value 1
{
 &DiscTHR = CHANGEBIT 6 V9001
}

Var 9010 Name DiscTHR Link FSUIPC_OUT offset $310A Length 1

// ENGINE #1 Throttle

Var 9020 name ENG1_POT Link IOCARD_ANALOGIC Input #1 PosL 0 PosC 127 PosR 255
{
 L0 = &ENG1_POT * 64.25
  IF L0 > 16384
   {
    L0 = 16384
   }
  &ENG1_THR = L0
}

Var 9030 Name ENG1_THR Link FSUIPC_OUT offset $089A Length 2

 

I do not logout of the potentiometer. I may have a programming problem!
Thanks for the help.
 
Regards,
 
Marc.

 

Share this post


Link to post
Share on other sites

 

Hello Pete,

 

So I did a test with this little program below:

 

Var 9001 value 1

{

 &DiscTHR = CHANGEBIT 6 V9001

}

Var 9010 Name DiscTHR Link FSUIPC_OUT offset $310A Length 1

// ENGINE #1 Throttle

Var 9020 name ENG1_POT Link IOCARD_ANALOGIC Input #1 PosL 0 PosC 127 PosR 255

{

 L0 = &ENG1_POT * 64.25

  IF L0 > 16384

   {

    L0 = 16384

   }

  &ENG1_THR = L0

}

Var 9030 Name ENG1_THR Link FSUIPC_OUT offset $089A Length 2

 

I do not logout of the potentiometer. I may have a programming problem!
Thanks for the help.

 

Sorry, I don't understand any of that.  What is the problem? Can you describe it in a language I'm familiar with? Perhaps in English or Lua -- you could test your ideas out with a Lua plug-in. That's one of its main uses.

 

Pete

Share this post


Link to post
Share on other sites

Hello Pete,

 

I use code SIOC by OpenCockpits.

 

1) I change the value ( 0 to 1) bit 6 by Offset 310A (engine #1)

2) I use a axis with a potentiometer 10K connected offset 089A for Engine #1 throttle ( values 0 - 16386 for this offset)

 

In principle, the engine #1 throttle should no longer be active when the bit 7 offset 0310A is 1. This is not the case.

I should mention that this axis is not recognized by FSUIPC as Throttle 1 axis.

I hope that my explanation is sufficient.

 

Regards,

 

Marc.

 

 

 

 

 

Share this post


Link to post
Share on other sites

Hello Pete,

 

I use code SIOC by OpenCockpits.

 

1) I change the value ( 0 to 1) bit 6 by Offset 310A (engine #1)

2) I use a axis with a potentiometer 10K connected offset 089A for Engine #1 throttle ( values 0 - 16386 for this offset)

 

In principle, the engine #1 throttle should no longer be active when the bit 7 offset 0310A is 1. This is not the case.

I should mention that this axis is not recognized by FSUIPC as Throttle 1 axis.

I hope that my explanation is sufficient.

 

Are you using the current version of FSUIPC, 4.921 or later? If so, you most certainly have something wrong then. Here is a test plug-in, written in Lua -- as I suggested to you.

val310a = ipc.readUB(0x310a)
ipc.writeUB(0x310a, logic.And(val310a, 0xBF))

i = 0
while i < 16384 do
    ipc.writeSW(0x089a, i)
    ipc.sleep(250)
    i = i + 256
end

while i > 0 do
    --ipc.writeUB(0x310a, logic.Or(val310a, 0x40))
    ipc.writeSW(0x089a, i)
    ipc.sleep(250)
    i = i - 256
end

Save it to the Modules folder as, say "Test310a.lua". Assign a button or keyress to it (i.e. to "Lua Test310a"). Mae sure your throttle is disconnected and that you have no other throttle 1 assignments to conflict.

 

Now use that button or key to start that Lua program and watch the throttle 1 lever. See it rise from 0 to max then go back down. Right? That's with bit 6 or 310A clear.

 

Now edit that Lua by removing the -- at the start of this line

 

--ipc.writeUB(0x310a, logic.Or(val310a, 0x40))

 

This will set bit 6 after the throttle has gone to max so that the loop bringing it back down won't actually affect the throttle at all. Save the edited file and run it again.

 

This will prove that bit 6 stops 089A changing 088C -- just as it always has now for many years on many cockpit systems. I've tested here, of course, with 4.921f and 3.999z8, but this stuff hasn't changed in years.

 

So, sorry, but something is surely wrong somewhere in your setup. Try enabled ipc write logging in FSUIPC's logging to see what might be writing to 088C directly without your knowledge. Obviously that would bypass the 310A setting.

 

Incidentally, using this test I also proved that bit 3 does operate all throttle intervention as you originally thought it should but which I doubted. To demonstrate that change these lines:

 

ipc.writeUB(0x310a, logic.And(val310a, 0xF7))

 

and

 

ipc.writeUB(0x310a, logic.Or(val310a, 0x08))

 

[LATER]

One possibility occurs to me. Did you read the part in the offsets list entry for 310A which tells you that the flags are cleared after 10 seconds or so (the actual time will vary, so don't rely on that exactly -- best to refresh every, say 5 seconds -- in the second loop above you'll notice the flag is set every loop).

 

This is done so that the user doesn't permanently lose throttles because some program has crashed or quit after setting the bits.

 

Maybe you are only setting it once, perhaps when the A/P switches on, and not refreshing it?

 

Regards

Pete

Share this post


Link to post
Share on other sites

Hello Pete,

I tested your LUA program wit Cessna and Level-D. this work according to your instructions.

you mention the refreshment of bit 6 (or 7)"-- best to refresh every, say 5 seconds --"

In my test program, the bit 7 and 8 are update only when de flight mode change (N1, SPEED, FLCH and VNAV): It is certainly the problem.

Thanks for your help.

Regards,

Marc.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • 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.