Announcement

Collapse
No announcement yet.

GS3 GSREGWR RunCommand

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


  • GS3 GSREGWR RunCommand

    Hello,
    I have A BRX PLC connected to a GS3 using the EDRV-100,
    I am trying to write .Run.command using GSREGWR tp P9.27 I get an error "Destination Register P9.27 exists as astruck member .RunCommand",
    What am I doing wrong ???


  • #2
    From help topic DMD0340: ". Parameter locations that are already being written from the GS Drive structure will still be displayed in the row editor with the name of the GS Drive structure, but they cannot be selected for use in this instruction"
    My guess it that since the Do-More has allocated a structure member for P9.27 one must use said structure member and one is not allowed to do and end run to try to write to the parameter directly.

    My guess is that you probably have to write to the structure member, e.g. [ MATH $GS1_110.RunCommand = 1] (or COPY or however you want to get a value into a memory location)
    I don't understand the structure naming, when I setup the device I gave it the concise and descriptive name SNAFU, but in the element picker it is $GS1_110, and I have to remember that SNAFU is 110 and FUBAR is 100, well, ok, I can apparently give the structure member a nickname in the documentation editor, an extra step, but SNAFU_GO is a bit shorter that $SNAFU.RunCommand so it may pay off in the long run.

    Comment



    • #3
      Certain common registers are already being written as part of the I/O scan. Writing directly to the register isn't helpful, since it just gets overwritten. Just set the .RunCommand member of the structure and the driver automatically writes to the drive, there's no need to use the instruction.

      Comment



      • #4
        The GSEDRV as an Ethernet I/O slave "just works". The Ethernet I/O driver in the Do-more knows the critical registers it needs to read/write during the I/O scan. The GSREGRD/GSREGWR is just for all the OTHER registers that you may also need to access other than those critical ones.

        The one in my project is called $GS1_100, and it has multiple structure members:
        Click image for larger version

Name:	GSEDRV1.PNG
Views:	56
Size:	41.9 KB
ID:	125288
        So I can use $GS_100.RunCommand in my program, along with $GS1_100.OutputFrequency and $GS1_100.Direction bit, etc. No need to read/write those since those structure members are automagically updated by the PLC firmware during the Ethernet I/O scan cycle.

        But say I needed to setup P1.03 Accel S-Curve, then I would need to use the GSREGWR and GSREGRD to set up/read the various P parameters that are not part of the structure.

        There are 10 kinds of people in this world, those who know binary, and those who do not.

        Comment



        • #5
          Ok, so I used MATH to set the $gs_100.RunCommand to 1, what other ways I can use the $GS_100.Runcommand?

          Comment



          • #6
            All that structure member is, is the P9.27 parameter. From the GS1 Drive User Manual, Chapter 4, P9.27 Serial Comm RUN Command:
            0: Stop 1: Run, default is 0

            I don't know if the GS2, GS3, or GS4 have other valid values, look at those manual's description of P9.27.
            Most of the Do-more structure members are from the P9.* bank of parameters, Communication Parameters.
            There are 10 kinds of people in this world, those who know binary, and those who do not.

            Comment



            • #7
              Originally posted by Sunflower View Post
              Ok, so I used MATH to set the $gs_100.RunCommand to 1, what other ways I can use the $GS_100.Runcommand?
              You can only write to that command with MATH, MOVE, COPY, etc. What you could do is have a rung somewhere that is always energized with MOVE C100 to GS_100.RunCommand, that way you can control C100 as a bit elsewhere in your program SET, RESET, OUT, etc to control it more "logically" if you prefer.

              Comment

              Working...
              X