Announcement

Collapse
No announcement yet.

P2K modbus examples

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


  • P2K modbus examples

    Does any body has file for P2000 PLC code for more than one modbus device currently i have 10 devices and all kinds of modbus communication problems works only 90% of the time i know we don't have any noise so far i think its in the program ...
    Thanks


  • #2
    Are you doing Modbus TCP? RTU?
    Are you auto polling? Manually polling?
    If RTU what baud?
    If RTU are you using request/ response delay?
    If RTU how quickly can your device respond and what is your timeout set to?

    There is an example for the P3000 in our example projects. It can easily be converted to P2000 using the conversion tool in hardware configuration.

    http://support.automationdirect.com/examples.html

    EP-COM-020

    Comment



    • #3
      I am guessing you are using RS485, if this so,
      Q1 What cable are you using?
      Q2 Is the cable 2 twisted pairs?
      Q3 Do you have a terminating resistor at the last device?
      If you answer yes to the second question, are you using both of the second pair as the common?

      Comment



      • #4
        Hi
        Its Modbus RTU / Manually polling / 38.4k baud / no delays / timeout for 500ms set at this point / its RS485 1 twisted pair ..as logic ground already internally bonded on modbus device and yes i have 120ohm resistor at the last device and at P-2000 PLC
        thanks for help guys !

        Comment



        • #5
          You don't need the resistor on the P2K end. It's built-in.
          If you've done the very best you can, worrying won't make it any better - Walt Disney

          Comment



          • #6
            Something I have learned about the Productivity serial Modbus, you must have a turn around delay in both ends. You have to have the remote end wait long enough (about 100ms) for the system to get ready after sending the request for data. Experiment around with the turn around delay.

            If you are talking to that many devices you might want to use a counter and trigger on the count = X to control the scanning rather than rely on the automatic polling with offset delay. This way you can control the polling very accurately. I am reading multiple devices with this procedure over RS-485 2 wire and the failure rate is less than 1%.

            Mike

            Comment



            • #7
              Forgot also watch out for noise. You did not say what you were using it around but VFD units produce a lot of noise and you want to make sure that any RS-485 inside the cabinet stays as far way from the output as possible. Always cross any power circuit at right angle.

              Mike

              Comment



              • #8
                i didn't know that P2k has 120 ohm resistor ..... NO EMI or noise as its on the bench and far from any noise closest-highest voltage is 120v going to 24 power supply ! modbus read/write commands in executed in sequence upon success or timeout of each instruction before going to next modbus instruction then cycle repeats thus eliminating any collisions and so on ... correct me if i am wrong ...
                Thanks

                Comment



                • #9
                  I see you said one twisted pair, is it possible for you to have the logical ground tied between the two devices and one shield end tied to earth ground.
                  https://www.honeywellaccess.com/docu...r_NX_Loops.pdf

                  Comment



                  • #10
                    I have the MODBUS Reads on a polled circuit, 14 devises separated using the "offsets" example' Slave node 1 Auto poll 300/10, Slave node 2 Auto poll 300/20,Slave node 3 Auto poll 300/30.
                    The modbus writes are executed by a discrete bit, like"MOVE SLIDE 1". After"MOVE SLIDE 1" is executed, that copy data into the modbus write registers and a drop down "and" to set a "Modification" bit which needs to reset to Move Slide 1 bit. This is just the I do it and it works everytime. Pay attention to scan time also.
                    Currently have 14 devises on a modbus RTU network with auto poll at 300ms and divided between the devises. Time out set to 10X100 ms, Character time out at 5 and response at 5ms no comm heartbeat needed,.

                    Comment



                    • #11
                      Thanks Steve i will try this ..... another think i found hard way is that there no need for 120 Ohm resistor on the PLC side as opposed to what i been told by AD ....

                      Comment

                      Working...
                      X