Announcement

Collapse
No announcement yet.

BRX HSIO - current position retentive?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts


  • BRX HSIO - current position retentive?

    When using step-and-drection to control a servo, is Axis.CurrentPosition retentive through a power cycle? My recent experience seems to indicate that it is not. Is there a way to make it retentive? The operators would like to be able to cycle power at a known location, and not have to re-home if possible.

    For reference, I do have a backup battery installed in the BRX CPU, and it's good (no low battery warning).


    Thanks,

    Ryan Poethke


  • #2
    I may have answered my own question:

    Barring a more elegant solution, I'm going to copy the Axis.CurrentPosition value to a double (D5) and load that value using an AXSETPROP instruction on the PLC's first scan. That should retain the current position through a power cycle, yes?


    Thanks,

    Ryan Poethke

    Comment



    • #3
      AXCONFIG allows you to specify the initial position. I think the axis structure is retentive by default, so it may be as simple as specifying the .CurrentPosition as the input to the position field of AXCONFIG.

      Comment



      • #4
        Originally posted by BobO View Post
        AXCONFIG allows you to specify the initial position. I think the axis structure is retentive by default, so it may be as simple as specifying the .CurrentPosition as the input to the position field of AXCONFIG.
        I'll give this a try. It seems much more elegant. It worked when I made the modification in the program; I'll test tomorrow to see if it works properly with hardware.

        Thanks!


        Ryan Poethke

        Comment



        • #5
          I have had to use this method on at least 2 other brands before... I see both sides of it, but wish the standard was to have the option of retaining the last known position.

          Comment



          • #6
            Originally posted by genebond View Post
            I have had to use this method on at least 2 other brands before... I see both sides of it, but wish the standard was to have the option of retaining the last known position.
            An axis has to be configured before it is used. It can have multiple configurations, all different. It isnít as clear cut as you would think. The workaround I suggested is dang near as simple as checking a box.

            Comment



            • #7
              Agreed. I've yet to use positioning on this platform, but good to know it's this configurable!

              Thanks

              Comment



              • #8
                Originally posted by BobO View Post

                An axis has to be configured before it is used. It can have multiple configurations, all different. It isnít as clear cut as you would think. The workaround I suggested is dang near as simple as checking a box.
                BobO,
                I tried your suggestion of placing Axis.CurrentPosition in the "Initial Output Position" box in AXCONFIG, but it didn't work. It appears that Axis.CurrentPosition isn't in fact retentive through a power cycle. Does this have anything to do with AXCONFIG being run in the MAIN program, and not a separate code block marked as retentive?

                My solution:
                In a separate code block, marked as retentive, I have a COPY instruction that continuously copies Axis.CurrentPosition to a D-word (D5). AXCONFIG uses the value stored in D5 as its Initial Output Position when I run AXCONFIG in the MAIN program on the first scan. Works a treat!


                Ryan Poethke

                Comment



                • #9
                  Originally posted by Ryan_Poethke View Post

                  BobO,
                  I tried your suggestion of placing Axis.CurrentPosition in the "Initial Output Position" box in AXCONFIG, but it didn't work. It appears that Axis.CurrentPosition isn't in fact retentive through a power cycle. Does this have anything to do with AXCONFIG being run in the MAIN program, and not a separate code block marked as retentive?

                  My solution:
                  In a separate code block, marked as retentive, I have a COPY instruction that continuously copies Axis.CurrentPosition to a D-word (D5). AXCONFIG uses the value stored in D5 as its Initial Output Position when I run AXCONFIG in the MAIN program on the first scan. Works a treat!


                  Ryan Poethke

                  Code block has no effect, and the axis structures are definitely marked retentive, but there's probably some initialization code wiping it. Still pretty easy though...one copy and a reference to the copy instead of the struct field. Glad it's working.

                  Comment

                  Working...
                  X