Jump to content
The simFlight Network Forums

Recommended Posts

Posted

Hi

I would like to set up a single button on my CH Yoke to operate the Autopilot for the PMDG B777 (which works differently to the standard autopilot), which requires the following action definitions via FSUIPC INI if the defined button is pressed

(i)  Send the equivalent of a Z key if the autopilot is already off to switch it on,

(ii) Send the equivalent of Shift + Ctrl + Z if the autopilot is already on to switch it off .... in this case the autopilot switches off, but a warning horn sounds

(iii) Send the equivalent of Shift + Ctrl + Z again on a second button press, if the horn is sounding, to silence it.

I can set up a flag on an unused joystick button as described in the Advanced user guide and then use conditional button programming to define two different button definitions, the first to carry out (i) above, and the second (a repeat) to do (ii) and (iii) together.

 

The weakness in this method is that the button for the actions (ii) and (iii) has to be held down to switch off the autopilot and then a second or so later the horn, rather than be two separate button presses. If you forget to hold the button down, only the autopilot switches off, not the horn.  Pressing the button again then switches the autopilot back on - not what was wanted.  Also, if any of these operations are partly carried out on the keyboard, the flag does not get toggled, so everything is out of step with what you expect to happen when the button is next pressed.

 

Instead, I thought I would try to use offsets to test which of the conditions (i) to (iii) are in effect at any particular time, so that I can then define the three required actions separately independently of how the conditions came about, i.e whether by yoke button or keyboard key presses.   Unfortunately, I do not adequately understand offsets and what values these should have for each of these conditions.  I noted offset 07BC seems to be linked to the autopilot master switch, but cannot seem to get anywhere with (ii) and (iii).  I wonder if the complexity of this aircraft means that standard offsets do not apply anyway.   Also, there are three conditions to test, not just whether the autopilot is on or off.

 

The line 0=D0&BC=0 P3, 0, K90, 8, put into the B777 button definitions section seems to work to carry out (i) by setting my joystick 3 (CH Yoke), button 0 to emulate the Z key press, but I have got nowhere with suitable lines for (ii) and (iii).  Any help you can give would be appreciated, perhaps even a totally different approach?

 

Thanks

 

Keith

 

Posted

Hi

I would like to set up a single button on my CH Yoke to operate the Autopilot for the PMDG B777 (which works differently to the standard autopilot), which requires the following action definitions via FSUIPC INI if the defined button is pressed

(i)  Send the equivalent of a Z key if the autopilot is already off to switch it on,

(ii) Send the equivalent of Shift + Ctrl + Z if the autopilot is already on to switch it off .... in this case the autopilot switches off, but a warning horn sounds

(iii) Send the equivalent of Shift + Ctrl + Z again on a second button press, if the horn is sounding, to silence it.

 

Some questions first. If 'z' assigned in the add-on aircraft, or is it still assigned to the normal default FS aurtopilot master toggle? In otherwords, can you assign to the FS control instead of to the keystroke 'z'? And how is the "Shift+Control+Z" assigned? i.e. what control or function?

 

I can set up a flag on an unused joystick button as described in the Advanced user guide and then use conditional button programming to define two different button definitions, the first to carry out (i) above, and the second (a repeat) to do (ii) and (iii) together.

 

The weakness in this method is that the button for the actions (ii) and (iii) has to be held down to switch off the autopilot and then a second or so later the horn, rather than be two separate button presses. If you forget to hold the button down, only the autopilot switches off, not the horn.  Pressing the button again then switches the autopilot back on - not what was wanted.  Also, if any of these operations are partly carried out on the keyboard, the flag does not get toggled, so everything is out of step with what you expect to happen when the button is next pressed.

 

 
I don't understand this bit. What button has to be held down?  Flags on "unused" buttons are normally flags on "non-existent" buttons -- i.e. one of a joystick you don't have, so you can't press it down, you just set its flag or clear it by using the flag setting and clearing assignments.

 

The line 0=D0&BC=0 P3, 0, K90, 8, put into the B777 button definitions section seems to work 

 

 

Can you explain what "D0&BC=0" means? Is the '&' a typo there? Are you trying to test an offset?

 

Pete

Posted (edited)

Hi Pete, thanks for the prompt reply.

Both Z and Shift + Ctrl + Z are assigned via PMDG B777's own internal key commands menu which is part of the PMDG setup section built into the FMC display.  I am guessing that since a lot of the B777 programming is separate from FSX then they decided to split the autopilot commands into two parts.  Z and Shift + Ctrl + Z are their default keyboard commands to accomplish autopilot on and autopilot off respectively, though you can obviously assign different keys through their own menu.

 

Regarding the flag setting technique, I'll show you the lines I put in based on you examples in the advanced user guide.  They are

0=P3, 0, C1005, 3842

1=CP(F+15,2) 3,0,K90,8

2=CR(F-15,2) 3,0,K90,11

My limited understanding from your guide means that the above do the following.

 

Line 0 toggles the flag based on unused joystick 15 button 2 when  joystick 3 (CH Yoke), button 0 is pressed.  It then defines the two definitions Z and Shift + Ctrl + Z for button 0 depending on whether the flag is set or not.   Thus pressing button 0 (assuming the flag is toggled correctly) switches autopilot on; the next press switches it off.  However, due to the programming in the PMDG aircraft, a warning horn then sounds.   You will note that line 2 repeats the command, and provided you continue to hold down button 0, after a short pause, (presumably built into the PMDG programming) the horn then also silences. 

 

As I said in my first post, the weakness is that the flag would not get toggled if you switched the autopilot on/off using the keyboard directly, and so the next press of the button 0 on the yoke would not do what was expected.  Also you have to remember to hold the button down when switching off the autopilot off, otherwise your next press of button 0 does not silence the horn which is still going but puts the autopilot back on.

 

Sorry about the typo, it should have been   "D07BC=0".  Yes I am trying to test an offset, and using it to define my three definitions for button 0, rather than relying on the flag method.  Unfortunately, that is where my knowledge and understanding fall down amongst the theory of bits and bytes and so on.   What I would like is to test a suitable offset to find out which of the three conditions is appropriate  (I) autopilot off,  horn not sounding - define button 0 to switch autopilot on next press of button 0    (ii) autopilot on - define button 0 to switch AP off at next press (iii) autopilot off but horn sounding - switch horn off at next press.  As I said earlier, the PMDG as set up by their own keyboard commands menu, requires a Z key equivalent for (i) and Shift + Ctrl + Z for both (ii) and (iii).    I hope I have been able to answer your questions adequately. 

 

Thanks

 

Keith

Edited by kbowman17
Posted

Both Z and Shift + Ctrl + Z are assigned via PMDG B777's own internal key commands menu which is part of the PMDG setup section built into the FMC display.  I am guessing that since a lot of the B777 programming is separate from FSX then they decided to split the autopilot commands into two parts.  Z and Shift + Ctrl + Z are their default keyboard commands to accomplish autopilot on and autopilot off respectively, though you can obviously assign different keys through their menu.

 

Okay, so it isn't the default A/P and that weird offset test attempt is a red herring?

 

 

Regarding the flag setting technique, I'll show you the lines I put in based on you examples in the advanced user guide.  They are

0=P3, 0, C1005, 3842

1=CP(F+15,2) 3,0,K90,8

2=CR(F-15,2) 3,0,K90,11

This toggles the flag based on unused joystick 15 button 2 when  joystick 3 (CH Yoke), button 0 is pressed.  It then defines the two definitions Z and Shift + Ctrl + Z for button 0 depending on whether the flag is set or not.   Thus pressing button 0 (assuming the flag is toggled correctly switches autopilot on; the next press switches it off.  However, due to the programming in the PMDG aircraft, a warning horn then sounds.   You will note that line 2 repeats the command, and provided you continue to hold down button 0, after a short pause, (presumably built into the PMDG programming) the horn then silences. 

 

So you are using a non-existent button flag. Good. You could simply use two of those if you wanted to have to press the button twice, thus:

 

0=P3, 0, C1005, 3842

1=CP(F+15,2) (F-15,3)3,0,K90,8

2=CP(F-15,2) (F-15,3)3,0,K90,11

3=CP(F+15,2) (F+15,3)3,0,K90,11

4=CP(F+15,2) (F+15,3)3,0,C1005,3842

5=CP(F+15,2) (F+15,3)3,0,C1005,3843

6=CP(F-15,2) 3,0,C1005,3843
 
!st press, 15,2 = TRUE, 15,3 = FALSE, sends Z

2nd press, 15,2 = FALSE, 15,3 = FALSE, sends Ctrl+Shft+Z and sets 15,3 TRUE

3rd press, 15,2 = TRUE, 15,3 = TRUE, sends Ctrl+Shft+Z and sets  both 15,2 and 15,3 FALSE

 

As I said in my first post, the weakness is that the flag would not get toggled if you switched the autopilot on/off using the keyboard directly, and so the next press of the button 0 on the yoke would not do what was expected.  Also you have

 

If these commands are "toggles", then if you cannot determine the state of the autopilot then you cannot do any different. Everything must be synchronised properly all the time. If you can determine the autopilot state, then you can sort it.

 

If they are not toggles, if 'Z' always turns the A/P 'on', then you are okay. If it is already on and you want it off, just press twice, plus a third time to silence the horn.

 

Pete

Posted

Sorry about the posting problem Pete.  I caught a wrong key and posted too early.  The offset test was  not a red herring.  Ideally, I want to use offsets to test the state of the autopilot. If you read the last paragraphs. most of which were missing, you will see more details of this.

 

Thanks

Keith

Posted

Sorry about the posting problem Pete.  I caught a wrong key and posted too early.  The offset test was  not a red herring.  Ideally, I want to use offsets to test the state of the autopilot. If you read the last paragraphs. most of which were missing, you will see more details of this.

 

So isn't my solution valid? If not why not?

 

Sorry about the typo, it should have been   "D07BC=0".  Yes I am trying to test an offset, and using it to define my three definitions for button 0, rather than relying on the flag method.

 

What is wrong with the flag method, exactly?

 

Offset 07BC is the default FS master autopilot switch, for which 'Z' normally relates and toggles. 07BC is always toggled by the FS control AP MASTER. If this is being used by your aircraft, where does Ctrl+Shift+Z come in? Is that also toggling the FS master?

 

Evidently clarification is needed on this. Why did you think 07BC might be useful?

 

Unfortunately, that is where my knowledge and understanding fall down amongst the theory of bits and bytes and so on.

 

There's no need to be concerned there about bits and bytes. The offset is simply zero or non-zero. But it may not relate to your aircraft at all. That's the bigger question surely?

 

What I would like is to test a suitable offset to find out which of the three conditions is appropriate

 

I am pretty sure there aren't three conditions in FSX itself. FSUIPC is an interface into FSX, not into third party aircraft -- though some do have offset space reserved. The PMDG 777 isn't one of them. I don't know if PMDG provide status information for all of their subsystems.

 

Pete

Posted

Hi Pete

Thank you for the suggestions as to improving the flag technique.    I think your improvements will help to improve my operational experience.  I accept there is probably no offset that could be tested to see whether the horn is sounding, or the autopilot off as PMDG do a lot of their programming outside of the standard FS program, and as you say these three conditions do not all exist in FSX itself.  Unfortunately, I cannot say exactly what Shift + Ctrl + Z does internally to FS, though it obviously does the equivalent of switching off the autopilot, but also switching on the warning horn as the autopilot goes off. Then it also then silences the horn on a second press.    Whether this toggles the offset at 07BC I do not know.  Anyway thanks once again for your help.  I'll now go and put your suggestions into FSUIPC INI and give it a try.

 

Regards

 

Keith

Posted

Unfortunately, I cannot say exactly what Shift + Ctrl + Z does internally to FS, though it obviously does the equivalent of switching off the autopilot, but also switching on the warning horn as the autopilot goes off. Then it also then silences the horn on a second press.    Whether this toggles the offset at 07BC I do not know.  Anyway thanks once again for your help.  I'll now go and put your suggestions into FSUIPC INI and give it a try.

 

You can use FSUIPC's logging to find out. Log Events to see if FS controls are being sent, and use the Monitor (right-hand side of the Logging tab) to log 07BC as type U32 to the normal log.

 

Pete

Posted

Hi Pete

Just to finally close the issue, I checked on the logging and particularly the monitoring of offset 07BC, by showing it in the FS window.   On pressing the 0 button to send a key Z command and engage the autopilot, no change was seen in the value of this offset, which remained at zero, and certainly there was no change either when pressing the 0 button further times.  I think this must clearly show that PMDG are not using a standard approach or toggling this offset in their use of the autopilot in the B777.   By the way, your flag programming instructions worked brilliantly and now the whole operation seems to better mimic what I believe happens in the real aircraft.

 

Best wishes

 

Keith

Posted

I think this must clearly show that PMDG are not using a standard approach or toggling this offset in their use of the autopilot in the B777.   By the way, your flag programming instructions worked brilliantly and now the whole operation seems to better mimic what I believe happens in the real aircraft.

 

I think PMDG use their own systems for pretty much everything. As, in fact, do I in my B738 cockpit -- Project Magenta does the MCP and Autopilot, and a mix of third party software, including my own, takes care of all the other subsystems.

 

The autopilot switching is done in several places and ways:

 

1 The engage buttons on the MCP for left and right A/P (there are three of course on a 747. Not sure about the T7). 

2.The A/P disconnect bar, below the buttons on the MCP

3. the A/P disconnect button (red one) on the yokes of both Captain and First Officer. 

 

The A/P disconnect button does not also operate to connect the A/P, at least not in the 737, but, yes, when used to disconnect the horn will sound and you press it again to silence it. The horn also sounds if the A/P disconnects for any other reason, like an inability to cope with severe turbulence, or extraordinary trimming requirements.

 

Regards

Pete

  • Upvote 1
  • 8 months later...
Posted

Hi,

Building a cockpit needs to program buttons but also to get information about the state of such or such system i.e. input data. (For instance lights, AP, flaps , etc..)

 

For the PMDG 737NGX I found the document ("Offset mapping for PMDG 737NGX" : Offset_Mapping_PMDG737NGX.pdf) in fsuipc.simflight ....

Is there any equivalent document for the last PMDG B777X (B777-200)?

As I'm programming my cockpit in VB and Lua's, I absolutely need the hexadecimal values of the offsets of the input data and not only the data structure as described in the PMDG B777 SDK.

 

Best regards

Jean-Pïerre Mota

  • 2 weeks later...
Posted

For the PMDG 737NGX I found the document ("Offset mapping for PMDG 737NGX" : Offset_Mapping_PMDG737NGX.pdf) in fsuipc.simflight ....

Is there any equivalent document for the last PMDG B777X (B777-200)?

As I'm programming my cockpit in VB and Lua's, I absolutely need the hexadecimal values of the offsets of the input data and not only the data structure as described in the PMDG B777 SDK.

 

I didn't know PMDG had implemented a similar data export facility for the 777. I don't have the aircraft and therefore not the SDK either, so at present I am unable to implement anything similar I'm afraid. No one has mentioned this before either.

 

Pete

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.