Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
Collapse
Just Flight Community Forum
  1. Home
  2. Just Flight
  3. MSFS Products
  4. Black Square Add-Ons
  5. Piston & Turbine Dukes
  6. Can't engage/use CWS

Can't engage/use CWS

Scheduled Pinned Locked Moved Piston & Turbine Dukes
52 Posts 12 Posters 9.4k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M mysticfm

    @Randolf - I’m confident I copied the code correctly. I’m using the PMS50 GTN 750 (licensed). What happens when I engage the button when ATT is already engaged is that the autopilot re-activates afterwards, but does not re-enable ATT mode (e.g., if it was in HDG + ATT prior to engaging, after releasing the button it will only be in HDG mode).

    Edit: here's the contents of my MYEVENTS.TXT file (the DukeCwsRelease is all one line without line breaks, and with spaces where the line breaks were in your AAO example):

    DukeCwsPress#1 (>L:var_PilotCws_IsDown, Number) 1 (>K:AUTOPILOT_OFF)
    DukeCwsRelease#0 (>L:var_PilotCws_IsDown, Number) 1 (>K:AUTOPILOT_ON) (L:PMS50_APGA_RUNNING, bool) (L:PMS50_APGA_ACTIVE_VERTICAL_MODE, number) 3 == and (L:PMS50_APGA_RUNNING, bool) ! (A:AUTOPILOT VERTICAL HOLD, bool) (A:AUTOPILOT ALTITUDE LOCK, bool) or and or if{ 1 (>K:AP_ALT_HOLD) } els{ 1 (>K:AP_PITCH_LEVELER) } (A:PLANE PITCH DEGREES, Degrees) 15 min -15 max (>L:var_AP_PitchKnob, number)

    RandolfR Offline
    RandolfR Offline
    Randolf
    wrote on last edited by Randolf
    #23

    @mysticfm it is weird.

    If you're up for some debugging, you could try this slight modification of the release script, which "clicks" the ATT button only if it was not on before:
    DukeCwsRelease#0 (>L:var_PilotCws_IsDown, Number) 1 (>K:AUTOPILOT_ON) (A:AUTOPILOT PITCH HOLD, Bool) ! if{ (L:PMS50_APGA_RUNNING, bool) (L:PMS50_APGA_ACTIVE_VERTICAL_MODE, number) 3 == and (L:PMS50_APGA_RUNNING, bool) ! (A:AUTOPILOT VERTICAL HOLD, bool) (A:AUTOPILOT ALTITUDE LOCK, bool) or and or if{ 1 (>K:AP_ALT_HOLD) } els{ 1 (>K:AP_PITCH_LEVELER) } } (A:PLANE PITCH DEGREES, Degrees) 15 min -15 max (>L:var_AP_PitchKnob, number)

    M 1 Reply Last reply
    0
    • RandolfR Randolf

      @mysticfm it is weird.

      If you're up for some debugging, you could try this slight modification of the release script, which "clicks" the ATT button only if it was not on before:
      DukeCwsRelease#0 (>L:var_PilotCws_IsDown, Number) 1 (>K:AUTOPILOT_ON) (A:AUTOPILOT PITCH HOLD, Bool) ! if{ (L:PMS50_APGA_RUNNING, bool) (L:PMS50_APGA_ACTIVE_VERTICAL_MODE, number) 3 == and (L:PMS50_APGA_RUNNING, bool) ! (A:AUTOPILOT VERTICAL HOLD, bool) (A:AUTOPILOT ALTITUDE LOCK, bool) or and or if{ 1 (>K:AP_ALT_HOLD) } els{ 1 (>K:AP_PITCH_LEVELER) } } (A:PLANE PITCH DEGREES, Degrees) 15 min -15 max (>L:var_AP_PitchKnob, number)

      M Offline
      M Offline
      mysticfm
      wrote on last edited by
      #24

      @Randolf - sorry to tell you that didn’t work at all … I couldn’t even make the autopilot stay engaged at any point, regardless of the CWS button, not even by hitting the button on the autopilot itself. When I’d release the button, it would engage the autopilot for a fraction of a second and then immediately turn it off again. I’ll go back to the previous script for now, which at least allowed the AP to be used. 😊

      RandolfR 1 Reply Last reply
      0
      • M mysticfm

        @Randolf - sorry to tell you that didn’t work at all … I couldn’t even make the autopilot stay engaged at any point, regardless of the CWS button, not even by hitting the button on the autopilot itself. When I’d release the button, it would engage the autopilot for a fraction of a second and then immediately turn it off again. I’ll go back to the previous script for now, which at least allowed the AP to be used. 😊

        RandolfR Offline
        RandolfR Offline
        Randolf
        wrote on last edited by
        #25

        @mysticfm oh no, I found a small typo in the expression. I edited my last post, you could try to copy it from there again.

        M 2 Replies Last reply
        0
        • RandolfR Randolf

          @mysticfm oh no, I found a small typo in the expression. I edited my last post, you could try to copy it from there again.

          M Offline
          M Offline
          mysticfm
          wrote on last edited by
          #26

          @Randolf - thanks much, I’ll try it again in the morning.

          1 Reply Last reply
          0
          • RandolfR Randolf

            @mysticfm oh no, I found a small typo in the expression. I edited my last post, you could try to copy it from there again.

            M Offline
            M Offline
            mysticfm
            wrote on last edited by
            #27

            @Randolf - your last update to the FSUIPC macros seems to be working flawlessly. Thank you!

            Boy, being able to use the CWS switch goes a long way toward making me like this Century autopilot.

            1 Reply Last reply
            1
            • RandolfR Randolf

              So if anyone is looking for a workaround until this can be fixed, I had some success emulating CWS button by temporarily disconnecting autopilot when button is pressed, then I adjust pitch manually and on button release switch to ATT mode and re-enable AP and it will hold the new pitch. I use a script like this in Axis And Ohs:
              button press:
              1 (>L:var_PilotCws_IsDown, Number) 1 (>K:AUTOPILOT_OFF)
              release:
              0 (>L:var_PilotCws_IsDown, Number) 1 (>K:AP_PITCH_LEVELER) 1 (>K:AUTOPILOT_ON)

              This is a simplified version that will enable autopilot upon button release even if it was not on before. I also have a more convoluted version that is specific to AAO and may not be portable to other software, if anyone is interested.

              E Offline
              E Offline
              ExcessionOCP
              wrote on last edited by
              #28
              This post is deleted!
              1 Reply Last reply
              0
              • RandolfR Randolf

                @KRoy7 you're probably not using the PMS50 GTN750 unit, it doesn't seem to like the AP_PITCH_LEVELER event, but instead AP_ALT_HOLD.

                However, I copied the ATT button code from the aircraft files and updated my solution. The scripts now look a bit complicated, but seem to work at least with the KLN90B, PMS50 GTN750 and no-GPS setup that I was able to test:

                button press:

                1 (>L:var_PilotCws_IsDown, Number) 1 (>K:AUTOPILOT_OFF)
                

                release:

                0 (>L:var_PilotCws_IsDown, Number) 1 (>K:AUTOPILOT_ON)
                (L:PMS50_APGA_RUNNING, bool) (L:PMS50_APGA_ACTIVE_VERTICAL_MODE, number) 3 == and
                (L:PMS50_APGA_RUNNING, bool) ! (A:AUTOPILOT VERTICAL HOLD, bool) (A:AUTOPILOT ALTITUDE LOCK, bool) or and
                or if{ 1 (>K:AP_ALT_HOLD) } els{ 1 (>K:AP_PITCH_LEVELER) }
                (A:PLANE PITCH DEGREES, Degrees) 15 min -15 max (>L:var_AP_PitchKnob, number)
                

                I shared some of my AxisAndOhs templates for the Duke here:
                https://gitlab.com/randolf.lemmont/fs-bksq-duke-mods

                The CWS button is part of the Duke AP template shared there.

                E Offline
                E Offline
                ExcessionOCP
                wrote on last edited by
                #29

                @Randolf Hi Randolf, thank you so much for this! I'm new to A&O but am going to give this a go! Can you tell me though, does this script work with the PMS50 GTN750? Thank you!

                RandolfR 1 Reply Last reply
                0
                • E ExcessionOCP

                  @Randolf Hi Randolf, thank you so much for this! I'm new to A&O but am going to give this a go! Can you tell me though, does this script work with the PMS50 GTN750? Thank you!

                  RandolfR Offline
                  RandolfR Offline
                  Randolf
                  wrote on last edited by
                  #30

                  @ExcessionOCP here you can find my AAO templates for the Duke. The CWS button is part of the AP template. You can selectively apply parts of the templates if you don't want the extra stuff and if you're not using HC Bravo throttles, you can rebind your own buttons there.
                  https://gitlab.com/randolf.lemmont/fs-bksq-duke-mods

                  E 1 Reply Last reply
                  0
                  • RandolfR Offline
                    RandolfR Offline
                    Randolf
                    wrote on last edited by
                    #31

                    And yes, it works also with the PMS GTN.

                    1 Reply Last reply
                    1
                    • RandolfR Randolf

                      @ExcessionOCP here you can find my AAO templates for the Duke. The CWS button is part of the AP template. You can selectively apply parts of the templates if you don't want the extra stuff and if you're not using HC Bravo throttles, you can rebind your own buttons there.
                      https://gitlab.com/randolf.lemmont/fs-bksq-duke-mods

                      E Offline
                      E Offline
                      ExcessionOCP
                      wrote on last edited by
                      #32

                      @Randolf Thanks! I do have the HC Alpha and Bravo so I think I'll be using most of this! One last question though, I guess the script defines the behaviour of the CWS when it's triggered, but I just wanted to check - do you still have to map a hardware control to the CWS part of the script in order to trigger it?

                      RandolfR 1 Reply Last reply
                      0
                      • E ExcessionOCP

                        @Randolf Thanks! I do have the HC Alpha and Bravo so I think I'll be using most of this! One last question though, I guess the script defines the behaviour of the CWS when it's triggered, but I just wanted to check - do you still have to map a hardware control to the CWS part of the script in order to trigger it?

                        RandolfR Offline
                        RandolfR Offline
                        Randolf
                        wrote on last edited by
                        #33

                        @ExcessionOCP not sure what you mean, but my CWS script implements custom (experimental) behavior that is different from the switch in the virtual cockpit. It has to be triggered for example by button binding. Check the binding for it included in the template. It calls the script with parameter 1 on press and 0 on release.

                        E 2 Replies Last reply
                        0
                        • RandolfR Randolf

                          @ExcessionOCP not sure what you mean, but my CWS script implements custom (experimental) behavior that is different from the switch in the virtual cockpit. It has to be triggered for example by button binding. Check the binding for it included in the template. It calls the script with parameter 1 on press and 0 on release.

                          E Offline
                          E Offline
                          ExcessionOCP
                          wrote on last edited by
                          #34

                          @Randolf Cool, thanks for that - I'm totally new to A&O so apologies for my probably stupid questions 🙂 I'll have a read through the scripts later (I'm an IT infrastructure engineer so am familiar with scripting) and will hopefully work out what's going on!

                          1 Reply Last reply
                          1
                          • RandolfR Randolf

                            @ExcessionOCP not sure what you mean, but my CWS script implements custom (experimental) behavior that is different from the switch in the virtual cockpit. It has to be triggered for example by button binding. Check the binding for it included in the template. It calls the script with parameter 1 on press and 0 on release.

                            E Offline
                            E Offline
                            ExcessionOCP
                            wrote on last edited by
                            #35

                            @Randolf Hi Randolf, thanks for your help with this! I have got (pretty much!) everything working, with the exception of if I select VS on the HC Bravo left hand dial, and then vary the pitch, the altitude on my Altitude Preselector also changes. This doesn't happen with any of the other modes of the left hand dial (HDG, CRS etc), only when it's in the VS position - what have I done wrong?

                            RandolfR 3 Replies Last reply
                            0
                            • E ExcessionOCP

                              @Randolf Hi Randolf, thanks for your help with this! I have got (pretty much!) everything working, with the exception of if I select VS on the HC Bravo left hand dial, and then vary the pitch, the altitude on my Altitude Preselector also changes. This doesn't happen with any of the other modes of the left hand dial (HDG, CRS etc), only when it's in the VS position - what have I done wrong?

                              RandolfR Offline
                              RandolfR Offline
                              Randolf
                              wrote on last edited by
                              #36

                              @ExcessionOCP that should not happen, please check if you have any other bindings for the right rotary dial, maybe native in-sim control bindings? It looks as something else than my script is sending the PLUS/MINUS events there.

                              1 Reply Last reply
                              0
                              • E ExcessionOCP

                                @Randolf Hi Randolf, thanks for your help with this! I have got (pretty much!) everything working, with the exception of if I select VS on the HC Bravo left hand dial, and then vary the pitch, the altitude on my Altitude Preselector also changes. This doesn't happen with any of the other modes of the left hand dial (HDG, CRS etc), only when it's in the VS position - what have I done wrong?

                                RandolfR Offline
                                RandolfR Offline
                                Randolf
                                wrote on last edited by
                                #37

                                @ExcessionOCP these are the two binding you need for the right dial, make sure, there are no other:

                                6f35c752-a19a-4fed-b202-5e5b5101ca9b-image.png
                                660d2972-9f6e-48e4-8329-5453edfa8602-image.png

                                1 Reply Last reply
                                0
                                • E ExcessionOCP

                                  @Randolf Hi Randolf, thanks for your help with this! I have got (pretty much!) everything working, with the exception of if I select VS on the HC Bravo left hand dial, and then vary the pitch, the altitude on my Altitude Preselector also changes. This doesn't happen with any of the other modes of the left hand dial (HDG, CRS etc), only when it's in the VS position - what have I done wrong?

                                  RandolfR Offline
                                  RandolfR Offline
                                  Randolf
                                  wrote on last edited by
                                  #38

                                  @ExcessionOCP sorry for the spam, this is the last one 🙂
                                  This should be bound for the VS position of the left dial:

                                  cd3e7aae-75b5-48ca-a91d-8f41961fe97f-image.png

                                  E 1 Reply Last reply
                                  0
                                  • RandolfR Randolf

                                    @ExcessionOCP sorry for the spam, this is the last one 🙂
                                    This should be bound for the VS position of the left dial:

                                    cd3e7aae-75b5-48ca-a91d-8f41961fe97f-image.png

                                    E Offline
                                    E Offline
                                    ExcessionOCP
                                    wrote on last edited by
                                    #39

                                    @Randolf Absolutely no apologies needed! Your guidance is truly appreciated - and it's definitely not spam 🙂

                                    The issue was, as you suggested, vestigial config left over in the sim controls - I thought I had unbound everything but it turns out I'd forgotten about the right hand dial! Thanks again 🙂

                                    1 Reply Last reply
                                    0
                                    • Black SquareB Offline
                                      Black SquareB Offline
                                      Black Square
                                      Black Square Developer
                                      wrote on last edited by
                                      #40

                                      Hi All,

                                      I just wanted to let you know what I've done about this for the next update.

                                      There will be a new option in the tablet called "Control AP Pitch with Hardware Events". When it is selected, you can use K:AP_PITCH_REF_SET, K:AP_PITCH_REF_INC_UP, and K:AP_PITCH_REF_INC_DN to control the autopilot pitch. The knob in the cockpit will synchronize with this value. The only caveat is that these events don't seem to obey the maximum autopilot pitch value that is set in the aircraft configuration files. This means that you might want to limit this input on your end, but it's also not a necessity.

                                      I also figured out how to add pitch CWS functionality, and propagated it back to all of my aircraft. You can now either use the virtual CWS buttons, L:var_PilotCws, L:var_CoPilotCws, or K:SYNC_FLIGHT_DIRECTOR_PITCH to momentarily disable the autopilot pitch servo and set the pitch that you want. The caveat with this one is just that you have to use the L:Vars when you're not using the "Control AP Pitch with Hardware Events" tablet option.

                                      I hope that makes my users happy! I have to admit that I'm quite enjoying the CWS functionality in this particular aircraft, and I hope you will too!

                                      M J 2 Replies Last reply
                                      2
                                      • J Online
                                        J Online
                                        JetNoise
                                        wrote on last edited by
                                        #41

                                        For sure.
                                        IMO its one of the underrated or not even simulated feature in many airplanes in MSFS ...

                                        1 Reply Last reply
                                        0
                                        • Black SquareB Black Square

                                          Hi All,

                                          I just wanted to let you know what I've done about this for the next update.

                                          There will be a new option in the tablet called "Control AP Pitch with Hardware Events". When it is selected, you can use K:AP_PITCH_REF_SET, K:AP_PITCH_REF_INC_UP, and K:AP_PITCH_REF_INC_DN to control the autopilot pitch. The knob in the cockpit will synchronize with this value. The only caveat is that these events don't seem to obey the maximum autopilot pitch value that is set in the aircraft configuration files. This means that you might want to limit this input on your end, but it's also not a necessity.

                                          I also figured out how to add pitch CWS functionality, and propagated it back to all of my aircraft. You can now either use the virtual CWS buttons, L:var_PilotCws, L:var_CoPilotCws, or K:SYNC_FLIGHT_DIRECTOR_PITCH to momentarily disable the autopilot pitch servo and set the pitch that you want. The caveat with this one is just that you have to use the L:Vars when you're not using the "Control AP Pitch with Hardware Events" tablet option.

                                          I hope that makes my users happy! I have to admit that I'm quite enjoying the CWS functionality in this particular aircraft, and I hope you will too!

                                          M Offline
                                          M Offline
                                          mysticfm
                                          wrote on last edited by
                                          #42

                                          @Black-Square said in Can't engage/use CWS:

                                          I hope that makes my users happy! I have to admit that I'm quite enjoying the CWS functionality in this particular aircraft, and I hope you will too!

                                          Indeed! After getting the FSUIPC7 version of the macro script from @Randolf, I’m using that button all the time now, to the point that I wonder how I’d ever lived without it in other aircraft. Once you release the update, I’m wondering if there will be a motivating reason or even a requirement for me to change that.

                                          RandolfR 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users