Announcement

Collapse
No announcement yet.

Problems with PC to PLC communication, using Modbus

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


  • Problems with PC to PLC communication, using Modbus

    Hello, it's my first post and my english is poor. This way of communicating with the PLCs is already usual, even before I had already achieved it with AUTAMATION DIRECT, but this time they changed the software, which I think for the best, however I cannot send the information from the PC to the PLC, as you will see in the images. What am I missing?

    Thank you.


    Click image for larger version

Name:	Boolean Array PLC to PC.png
Views:	76
Size:	78.4 KB
ID:	126464

    Click image for larger version

Name:	Boolean Array PC to PLC.png
Views:	75
Size:	84.2 KB
ID:	126465

    Click image for larger version

Name:	Float Array PLC to PC.png
Views:	76
Size:	69.4 KB
ID:	126466

    Click image for larger version

Name:	Float Array PC to PLC.png
Views:	76
Size:	75.5 KB
ID:	126467


    Attached Files


  • #2
    Modbus exception code 2 is illegal data address. Verify the register/coil addresses are correct.
    Sometimes, you may have to subtract '1' from these addresses [in the LSIS (?) software ]- depending on the manufacturer's/developer's whims.
    Which port are you using on the P2K. You may have to swap the (rx/tx ; D+/D-; A/B) wires.

    Comment



    • #3
      By default the P-series allows reading any address, but if the address isn't assigned in the TagDB it will just return zero as the data. Writes must be to assigned addresses. Try writing a size of 1 and then increment the address until you get the data alignment that you expect.

      Comment



      • #4
        Thanks kewakl for answering me. Certainly, MODBUS does not know what the absolute address of the register/coil is, the Starting Address that MODBUS uses is relative, it is within the PLC where that Starting Address, that receives from the MODBUS, which address register / coils to affect is internally linked.

        For the examples, I set both for register and for coils, the addresses are correct because the salve MODBUS of the PLC works well when required to read the registers/coils. I have the impression that within the PLC, I need to put some parameter, which I don't know, in order to alter the registers/coils information of an Array, through the slave MODBUS. Which?

        Comment



        • #5
          Thanks OpZed for answering me. I ask you why it is the first time I work with this PLC, What I show in the images on the PLC side, is not exactly what you suggest to me?

          Originally posted by OpZed View Post
          By default the P-series allows reading any address, but if the address isn't assigned in the TagDB it will just return zero as the data. Writes must be to assigned addresses. Try writing a size of 1 and then increment the address until you get the data alignment that you expect.
          In other words, I think I have assigned an address in the TagDB, or is it something else?

          Comment



          • #6
            Yes, I think the array is badly declared.

            Comment



            • #7
              Originally posted by JorgeL&C View Post
              Thanks OpZed for answering me. I ask you why it is the first time I work with this PLC, What I show in the images on the PLC side, is not exactly what you suggest to me?



              In other words, I think I have assigned an address in the TagDB, or is it something else?
              You do need to assign the P2k Tag's Modbus addresses in the P2K tag database.

              Comment



              • #8
                Originally posted by kewakl View Post

                You do need to assign the P2k Tag's Modbus addresses in the P2K tag database.

                It just worked for me, I think that of that last thing you are talking about I had already done it. What was wrong was the arrangements were poorly declared, had not assigned value to Columns and another detail is that within the PLC 1 is added to the Starting Address. Then I will post the corrections so others can use it.

                Thank you, kewkl.

                Comment

                Working...
                X