Announcement

Collapse
No announcement yet.

Slow Modbus Port 2 RS485 comms...

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


  • Slow Modbus Port 2 RS485 comms...

    Hello all,

    I have a DL06 (Master) talking to a rabbit 3000 series board ( Slave ) via port 2. I am using ModbusTPU over RS485 @ 38.4 kbaud.

    Although my program is communicating OK, it is only transmitting every 500mS.

    I believe it is being limited by the Modbus base timeout ( 500mS ) X 1 setting, however, i thought that the response timeout was for only when there was an error. The timeout should reset upon a successful reply, no?


    I am doing a MWX on every scan, but only when SP116 is off.

    I have a counter tied to SP117, but am getting no increment, so no port 2 errors.

    Anybody have any ideas on what could be limiting the throughput or ideas on how to speed it up ( higher than 2 hertz)?


    Thanks Chuck.


  • #2
    Our use of port 2 for Modbus RTU over RS485 gives us many more transmissions per second. I believe between 20 - 30.

    Post your rungs for the transmission and the monitoring of SP117. Make sure the rung for monitoring SP117 is before the MWX in the scan. I believe you are getting errors. Monitor the V registers you have set for the error code.
    thePLCguy

    Bernie

    Comment



    • #3
      You were correct about the errors. I moved SP117 to before the MWX and could see the error count. Nothing in the exception response buffer, however. I slowed the interval to 1 second and still get the errors. I will now fiocus on the slave program in the rabbit board, unless you have any ideas?




      Thanks!

      Chuck


      Click image for larger version

Name:	PLC1.jpg
Views:	1
Size:	92.1 KB
ID:	96784










      Originally posted by bcarlton View Post
      Our use of port 2 for Modbus RTU over RS485 gives us many more transmissions per second. I believe between 20 - 30.

      Post your rungs for the transmission and the monitoring of SP117. Make sure the rung for monitoring SP117 is before the MWX in the scan. I believe you are getting errors. Monitor the V registers you have set for the error code.

      Comment



      • #4
        The exception response will have a value if the target unit received the message but there was a problem with it. The target unit then sends the response. In your case, for whatever reason, the message is not getting to the target unit at all. (wiring?, communication parameters?)

        If you are really sure the parameters are ok then try swapping the two communication wires (old RS485 proverb).

        Make sure the RTS and CTS lines are jumpered. If you are using the ZL-CMA15(L) this is done for you internally.

        If you are using either of the adapters be sure to follow the wiring diagram including jumpering TX/RX- and TX/RX+
        Last edited by bcarlton; 10-08-2012, 10:55 AM.
        thePLCguy

        Bernie

        Comment



        • #5
          Actually, the slave program is receiving the message OK ( the CRC is correct and compares to the calculated one) and the data is displaying it as such, so I don't believe the wiring is NG. I have the handshaking jumpered on the cable connector. The only issue is that the dl06 ( master ) is timing out. Maybe the reply is not being sent back properly.



          Originally posted by bcarlton View Post
          The exception response will have a value if the target unit received the message but there was a problem with it. The target unit then sends the response. In your case, for whatever reason, the message is not getting to the target unit at all. (wiring?, communication parameters?)

          If you are really sure the parameters are ok then try swapping the two communication wires (old RS485 proverb).

          Make sure the RTS and CTS lines are jumpered. If you are using the ZL-CMA15(L) this is done for you internally.

          If you are using either of the adapters be sure to follow the wiring diagram including jumpering TX/RX- and TX/RX+

          Comment



          • #6
            From what I read, you are getting good data, but also timeouts? I think your slave is too slow, this is my take on what might be happening.
            1) Request#1
            2) Reply#1
            3) Request#2
            4) Timeout
            5) Request#2
            6) Reply#2
            7) Request#3
            8) Timeout
            9) Request#3
            10) Reply#3

            If your "Rabbit3000" is not ready in time then the next request will timeout. When that request is retried (you've had 500ms of quiet time on the wire) the Rabbit is ready again. If you slow down the baud rate and look at the LEDs then you might be able to see this (or it might start working due to slower speeds).

            You need to create a delay between last response and next request by gating the MWX instruction enable. You say that you slowed the instruction down, but the code does not show that.

            Comment

            Working...
            X