No announcement yet.

P2000, writing to holding register over modbus TCP

  • Filter
  • Time
  • Show
Clear All
new posts

  • P2000, writing to holding register over modbus TCP

    Hi, I'm new to using PLC's, and I'm having trouble using modbus to write values to registers.

    I've got a P2000 PLC which is connected to my local network over ethernet, and on my PC I'm attempting to send and receive modbus instructions using Matlab's Modbus explorer app. So far I've been able to successfully connect to my PLC over modbus, and read correct values stored in some test S32 tags. However, writing to these addresses results in the PLC's modbus server responding that the addresses are "out of range". I've assigned the tags modbus address ranges, enabled them to be forceable and allowed them to be remotely accessed. Any reason why writing to modbus address might not work?

  • #2
    Can you post pics detailing Matlab setup for the modbus addresses and the PAC's tag database with the Modbus Address (Mod Start and Mod End columns) showing for these tags.
    With the P2K you only have to assign a modbus address in the PAC TagDatabase - No need for forceable or remote access.


    • #3
      I solved the problem, I was trying to do a single write to a holding register over modbus. This sends 16 bits of data, and the modbus address I was trying to write to was assigned to the bottom half of an s32 tag. I assumed that if it were working correctly it would just overwrite that bottom half of the tag, but the P2K rejected the write for the size mismatch. I made the tag 16 bits long and the write worked fine.