adccommunitymod (AutomationDirect) asked a question.

GS3 GSREGWR RunCommand

Created Date: September 21,2019

Created By: Sunflower

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

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 ???


  • adccommunitymod (AutomationDirect)

    Created Date: September 21,2019

    Created by: Sunflower

    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 ???

  • adccommunitymod (AutomationDirect)

    Created Date: September 22,2019

    Created by: BobO

    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.

  • adccommunitymod (AutomationDirect)

    Created Date: September 22,2019

    Created by: franji1

    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:

    { "data-align ": "none ", "data-size ": "full ", "title ": "GSEDRV1.PNG ", "data-attachmentid ":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.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: September 23,2019

    Created by: Sunflower

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

  • adccommunitymod (AutomationDirect)

    Created Date: September 23,2019

    Created by: franji1

    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.

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: September 23,2019

    Created by: Bolt

    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.

    Expand Post