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.3k 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.
  • Black SquareB Black Square

    I haven't found a good way to implement a true CWS mode with the native MSFS autopilot yet, but it will resync your pitch when you release the button. This means you can make small adjustments (while the autopilot is fighting you), or resync the pitch before engaging attitude hold mode.

    As is so often the case, your comment has given me inspiration for a possible solution, though! I will experiment later to see what I can do! What I have in mind should work, it's just a question of how well and smoothly.

    J Online
    J Online
    jmarkows
    wrote on last edited by
    #10

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

    I haven't found a good way to implement a true CWS mode with the native MSFS autopilot yet, but it will resync your pitch when you release the button. This means you can make small adjustments (while the autopilot is fighting you), or resync the pitch before engaging attitude hold mode.

    As is so often the case, your comment has given me inspiration for a possible solution, though! I will experiment later to see what I can do! What I have in mind should work, it's just a question of how well and smoothly.

    Is that something likely to make it into the Dukes in a near-term patch? I might wait, if so, rather than experimenting with FSUIPC.

    @Randolf Thanks for the pseudo (or correct, haven't tried it) FSUIPC code. If I give it a whirl, I'll let you know how it works. Events/RPN is something I haven't yet tried to do in FSUPIC, just some basic non-standard assignments through LVars and Lua scripting.

    M 1 Reply Last reply
    1
    • J jmarkows

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

      I haven't found a good way to implement a true CWS mode with the native MSFS autopilot yet, but it will resync your pitch when you release the button. This means you can make small adjustments (while the autopilot is fighting you), or resync the pitch before engaging attitude hold mode.

      As is so often the case, your comment has given me inspiration for a possible solution, though! I will experiment later to see what I can do! What I have in mind should work, it's just a question of how well and smoothly.

      Is that something likely to make it into the Dukes in a near-term patch? I might wait, if so, rather than experimenting with FSUIPC.

      @Randolf Thanks for the pseudo (or correct, haven't tried it) FSUIPC code. If I give it a whirl, I'll let you know how it works. Events/RPN is something I haven't yet tried to do in FSUPIC, just some basic non-standard assignments through LVars and Lua scripting.

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

      @jmarkows - I’ve now done a flight with it, and it seems to work fairly well. I had a couple of times where releasing the button caused the ATT mode to resume level flight rather than holding my chosen attitude, but a second try got it to capture in each case.

      RandolfR 1 Reply Last reply
      0
      • M mysticfm

        @jmarkows - I’ve now done a flight with it, and it seems to work fairly well. I had a couple of times where releasing the button caused the ATT mode to resume level flight rather than holding my chosen attitude, but a second try got it to capture in each case.

        RandolfR Online
        RandolfR Online
        Randolf
        wrote on last edited by
        #12

        @mysticfm
        Hm, that's interesting, I didn't yet run into the problem that it wouldn't hold the new pitch, but had suspicion that it may happen under some circumstances. I'll try to find a workaround.

        1 Reply Last reply
        1
        • RandolfR Online
          RandolfR Online
          Randolf
          wrote on last edited by
          #13

          Yea, just found out that it behaves wildly different with different GPS units present. My testing was only with KNS90B, there it seems to work fine. Now trying with PMS50 GTN it doesn't work at all :)

          1 Reply Last reply
          0
          • K Offline
            K Offline
            KRoy7
            wrote on last edited by KRoy7
            #14

            I have solved this issue (e.g. workaround) using SPAD.next as follows (I'm using GTN750/GTN650):

            spad.png

            1 Reply Last reply
            0
            • RandolfR Online
              RandolfR Online
              Randolf
              wrote on last edited by Randolf
              #15

              @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.

              M E 2 Replies Last reply
              1
              • K Offline
                K Offline
                KRoy7
                wrote on last edited by KRoy7
                #16

                Indeed I am using the PMS50 GTN750. But I have to send the leveler event twice, as the first press activates GP, second press activates ATT. But so far it's working as desired.

                1 Reply Last reply
                1
                • 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.

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

                  @Randolf - getting into some Booleans there, I see … which makes sense, as my added flights today indicate the misbehavior is indeed dependent upon the current state of the autopilot. I only wish I knew if FSUIPC also supported this kind of expression; the advanced manual for it is kind of a headache, huh?

                  1 Reply Last reply
                  0
                  • RandolfR Online
                    RandolfR Online
                    Randolf
                    wrote on last edited by
                    #18

                    @mysticfm these expressions will work in FSUIPC also. Just copy the button release long expression and put it on a single line (with space separating each line) behind DukeCwsRelease# you have in myevents file, replacing the previous version.
                    Though there may be a way to use multi line strings in that file, but you'd have to read the docs.

                    M 2 Replies Last reply
                    0
                    • RandolfR Randolf

                      @mysticfm these expressions will work in FSUIPC also. Just copy the button release long expression and put it on a single line (with space separating each line) behind DukeCwsRelease# you have in myevents file, replacing the previous version.
                      Though there may be a way to use multi line strings in that file, but you'd have to read the docs.

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

                      @Randolf - Thank you for the help. I definitely intend to dig into FSUIPC programming, but for right now I’m too busy trying to learn to fly the Duke along with trying to learn to talk to BeyondATC …

                      1 Reply Last reply
                      0
                      • RandolfR Randolf

                        @mysticfm these expressions will work in FSUIPC also. Just copy the button release long expression and put it on a single line (with space separating each line) behind DukeCwsRelease# you have in myevents file, replacing the previous version.
                        Though there may be a way to use multi line strings in that file, but you'd have to read the docs.

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

                        @Randolf - forgive me for having to report this, but the updated release macro doesn’t seem to work any better in FSUIPC at least. The button still activates properly, and engages ATT mode if that mode hadn’t been engaged before … but if I press the button when ATT mode was already engaged, the mode doesn’t get re-enabled upon button release. If this is only an issue for FSUIPC (which I understand you no longer use), don’t worry about it … I can work around it until I learn enough above the macro programming to fix it myself (it looks like the macros use RPN ordering, yes?). If/when I do fix it, I’ll post my FSUIPC version.

                        RandolfR 1 Reply Last reply
                        0
                        • M mysticfm

                          @Randolf - forgive me for having to report this, but the updated release macro doesn’t seem to work any better in FSUIPC at least. The button still activates properly, and engages ATT mode if that mode hadn’t been engaged before … but if I press the button when ATT mode was already engaged, the mode doesn’t get re-enabled upon button release. If this is only an issue for FSUIPC (which I understand you no longer use), don’t worry about it … I can work around it until I learn enough above the macro programming to fix it myself (it looks like the macros use RPN ordering, yes?). If/when I do fix it, I’ll post my FSUIPC version.

                          RandolfR Online
                          RandolfR Online
                          Randolf
                          wrote on last edited by
                          #21

                          @mysticfm If you copied the code correctly, it should not be an issue of FSUIPC, it should work the same as for example in AAO, at least I don't see any obvious incompatibilities in the code that would be AAO specific.

                          Which GPS panel configuration are you using?

                          If I understand your problem correctly, when you are in ATT mode and press and then release the CWS button, autopilot re-engages but in a different mode than ATT? Which one?

                          M 1 Reply Last reply
                          0
                          • RandolfR Randolf

                            @mysticfm If you copied the code correctly, it should not be an issue of FSUIPC, it should work the same as for example in AAO, at least I don't see any obvious incompatibilities in the code that would be AAO specific.

                            Which GPS panel configuration are you using?

                            If I understand your problem correctly, when you are in ATT mode and press and then release the CWS button, autopilot re-engages but in a different mode than ATT? Which one?

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

                            @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 1 Reply Last reply
                            0
                            • 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 Online
                              RandolfR Online
                              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 Online
                                  RandolfR Online
                                  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
                                          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