adccommunitymod (AutomationDirect) asked a question.

Modbus read/write

Created Date: March 18,2015

Created By: Haus1

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

Hi everyone, I am new to this site and have minimal experience writing anything other than basic ladder (so go easy on me). Anyhow, I am working with a Click PLC, a GS2 VFD, and a C-more micro HMI. I am writing to Modbus addresses 42331-42333 as well as reading from Modbus addresses 48451-48460 in the GS2 drive, ...but are having some issues. I wrote my read/write instruction using bit SC5 (_100ms_Clock) to trigger the first write command, then used the "success " bit from that write instruction to trigger the next read/write instruction, in a cascading fashion, until all read/writes were complete. The read/write works, BUT it's over writing the STOP command from the drives physical "STOP|RESET " button. Something tells me that this is not the most efficient way to do this and are looking for some assistance/pointers. Do I need to interlock the send and receive commands? Do I read/write instructions constantly or only when necessary? I would appreciate any pointers the community may be able to give me.


  • adccommunitymod (AutomationDirect)

    Created Date: March 18,2015

    Created by: Do-more PE

    Do I need to interlock the send and receive commands?

    Yes

    Do I read/write instructions constantly or only when necessary?

    Up to you, but writes typically should only happen when something changes.

  • adccommunitymod (AutomationDirect)

    Created Date: March 18,2015

    Created by: scott.lawrence

    Do I read/write instructions constantly or only when necessary?

    read at timed intervals to keep the PLC updated with the drive status, write when you need to change the status

  • adccommunitymod (AutomationDirect)

    Created Date: March 18,2015

    Created by: Haus1

    read at timed intervals to keep the PLC updated with the drive status, write when you need to change the status

    OK. So I need to interlock the send/receive, send only when there is a change to be written to the drive, and read at timed intervals. But what about the method I was using to read/write? Is there a way to read a block of sequential addresses simultaneously, or is my "cascading " method ok? Is a read every 100ms adequate? Again, I am very new to this, so I want to understand best practices vs just making it work with my sloppy instructions.

    Thanks for all the help. :)

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: March 18,2015

    Created by: Haus1

    Hi everyone,

    I am new to this site and have minimal experience writing anything other than basic ladder (so go easy on me). Anyhow, I am working with a Click PLC, a GS2 VFD, and a C-more micro HMI. I am writing to Modbus addresses 42331-42333 as well as reading from Modbus addresses 48451-48460 in the GS2 drive, ...but are having some issues.

    I wrote my read/write instruction using bit SC5 (_100ms_Clock) to trigger the first write command, then used the "success " bit from that write instruction to trigger the next read/write instruction, in a cascading fashion, until all read/writes were complete.

    The read/write works, BUT it's over writing the STOP command from the drives physical "STOP|RESET " button. Something tells me that this is not the most efficient way to do this and are looking for some assistance/pointers.

    Do I need to interlock the send and receive commands?

    Do I read/write instructions constantly or only when necessary?

    I would appreciate any pointers the community may be able to give me.

    Expand Post