pymodbus icon indicating copy to clipboard operation
pymodbus copied to clipboard

Slaves start not responding when multiple ones are running on the bus

Open ovunccetin opened this issue 3 years ago • 1 comments

Versions

  • Python: 3.7.3
  • OS: Raspbian GNU/Linux 10 (buster)
  • Pymodbus: 2.5.2
  • Modbus Hardware (if used): Raspberry Pi Zero W Rev 1.1

Pymodbus Specific

  • Server: rtu - sync/async
  • Client: rtu - sync

Description

I have two identical slaves (RPi Zero) and a master (RPi 4) on the Modbus. Each slave runs a sync RTU server listening port '/dev/serial0'. The slave code is the modified version of the Pymodbus' synchronous server example.

In the master, I have two separate client processes each of which periodically hits a separate slave. In other words, client process C1 reads from slave S1, whereas C2 reads from S2 every second (i.e. 1 RPS).

In this setup, the slaves cannot properly respond. Both slaves start to slow down and I'm seeing "No response" (Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response) errors on clients. When I stop one of the slaves, the other slave and its client returns to normal and the response errors disappear. When I start the stopped slave again, the problem reoccurs. Moreover, in the single slave scenario, the running slave can respond higher number of requests like 10 or 20 RPS.

I have also tried the async server (Twisted) on slave side. The problem still occurs.

Code and Logs

Client Code (sync):

from pymodbus.version import version
from pymodbus.server.sync import StartTcpServer
from pymodbus.server.sync import StartTlsServer
from pymodbus.server.sync import StartUdpServer
from pymodbus.server.sync import StartSerialServer
from pymodbus.device import ModbusDeviceIdentification
from pymodbus.datastore import ModbusSequentialDataBlock, ModbusSparseDataBlock
from pymodbus.datastore import ModbusSlaveContext, ModbusServerContext
from pymodbus.transaction import ModbusRtuFramer, ModbusBinaryFramer

import logging
FORMAT = ('%(asctime)-15s %(threadName)-15s %(levelname)-8s %(module)-15s:%(lineno)-8s %(message)s')
logging.basicConfig(format=FORMAT)
log = logging.getLogger()
log.setLevel(logging.DEBUG)

UNIT_ID = 50  # unit id of the other slave is 51
TIMEOUT = 0.005
BAUDRATE = 9600

def run_server():
    store = ModbusSlaveContext(
        di=ModbusSequentialDataBlock(0, [17]*100),
        co=ModbusSequentialDataBlock(0, [17]*100),
        hr=ModbusSequentialDataBlock(0, [17]*100),
        ir=ModbusSequentialDataBlock(0, [17]*100))

    context = ModbusServerContext(slaves={UNIT_ID: store}, single=False)

    identity = ModbusDeviceIdentification()
    identity.VendorName = 'Pymodbus'
    identity.ProductCode = 'PM'
    identity.VendorUrl = 'http://github.com/riptideio/pymodbus/'
    identity.ProductName = 'Pymodbus Server'
    identity.ModelName = 'Pymodbus Server'
    identity.MajorMinorRevision = version.short()

    # RTU:
    StartSerialServer(context, framer=ModbusRtuFramer, identity=identity,
                      port='/dev/serial0', timeout=TIMEOUT, baudrate=BAUDRATE,)

if __name__ == "__main__":
    run_server()

Client Log

[2021-06-20T22:26:34.446757] OK: [17, 17, 17, 17, 17, 17, 17, 17, 17, 17]
[2021-06-20T22:26:35.526558] OK: [17, 17, 17, 17, 17, 17, 17, 17, 17, 17]
[2021-06-20T22:26:39.531541] FAILED: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 8 bytes (0 received)
[2021-06-20T22:26:43.537375] FAILED: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response
[2021-06-20T22:26:47.543293] OK: [17, 17, 17, 17, 17, 17, 17, 17, 17, 17]
[2021-06-20T22:26:51.548288] FAILED: Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 8 bytes (0 received)

Slave Log

2021-06-20 22:26:32,584 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04'] not ready
2021-06-20 22:26:32,594 MainThread      DEBUG    rtu_framer     :234      Not a valid unit id - 50, ignoring!!
2021-06-20 22:26:32,597 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x0 0x0 0x0 0xa 0x75 0xce
2021-06-20 22:26:32,629 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x14\x00'] not ready
2021-06-20 22:26:32,638 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:32,644 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11
2021-06-20 22:26:32,653 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:32,657 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x23 0x61
2021-06-20 22:26:33,670 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x00\x00'] not ready
2021-06-20 22:26:33,680 MainThread      DEBUG    rtu_framer     :234      Not a valid unit id - 50, ignoring!!
2021-06-20 22:26:33,684 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x0 0x0 0x0 0xa 0x75 0xce
2021-06-20 22:26:33,714 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x14\x00'] not ready
2021-06-20 22:26:33,724 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:33,728 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11
2021-06-20 22:26:33,739 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:33,742 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x23 0x61
2021-06-20 22:26:34,372 MainThread      DEBUG    rtu_framer     :240      Frame - [b'3\x04\x00'] not ready
2021-06-20 22:26:34,381 MainThread      DEBUG    rtu_framer     :185      Getting Frame - 0x4 0x0 0x0 0x0 0xa
2021-06-20 22:26:34,385 MainThread      DEBUG    factory        :137      Factory Request[ReadInputRegistersRequest: 4]
2021-06-20 22:26:34,389 MainThread      DEBUG    rtu_framer     :107      Frame advanced, resetting header!!
2021-06-20 22:26:34,393 MainThread      DEBUG    context        :64       validate: fc-[4] address-1: count-10
2021-06-20 22:26:34,397 MainThread      DEBUG    context        :78       getValues fc-[4] address-1: count-10
2021-06-20 22:26:34,403 MainThread      DEBUG    sync           :144      send: [ReadInputRegistersResponse (10)]- b'3304140011001100110011001100110011001100110011eefd'
2021-06-20 22:26:34,754 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x00'] not ready
2021-06-20 22:26:34,763 MainThread      DEBUG    rtu_framer     :234      Not a valid unit id - 50, ignoring!!
2021-06-20 22:26:34,766 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x0 0x0 0x0 0xa 0x75 0xce
2021-06-20 22:26:34,798 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x14\x00\x11'] not ready
2021-06-20 22:26:34,807 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:34,811 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0
2021-06-20 22:26:34,822 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:34,826 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x23 0x61
2021-06-20 22:26:35,455 MainThread      DEBUG    rtu_framer     :240      Frame - [b'3\x04\x00\x00'] not ready
2021-06-20 22:26:35,466 MainThread      DEBUG    rtu_framer     :185      Getting Frame - 0x4 0x0 0x0 0x0 0xa
2021-06-20 22:26:35,469 MainThread      DEBUG    factory        :137      Factory Request[ReadInputRegistersRequest: 4]
2021-06-20 22:26:35,474 MainThread      DEBUG    rtu_framer     :107      Frame advanced, resetting header!!
2021-06-20 22:26:35,477 MainThread      DEBUG    context        :64       validate: fc-[4] address-1: count-10
2021-06-20 22:26:35,481 MainThread      DEBUG    context        :78       getValues fc-[4] address-1: count-10
2021-06-20 22:26:35,487 MainThread      DEBUG    sync           :144      send: [ReadInputRegistersResponse (10)]- b'3304140011001100110011001100110011001100110011eefd'
2021-06-20 22:26:35,837 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2'] not ready
2021-06-20 22:26:35,847 MainThread      DEBUG    rtu_framer     :234      Not a valid unit id - 50, ignoring!!
2021-06-20 22:26:35,850 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x0 0x0 0x0 0xa 0x75 0xce
2021-06-20 22:26:35,877 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2'] not ready
2021-06-20 22:26:35,886 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:35,890 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0
2021-06-20 22:26:35,900 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:35,904 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11
2021-06-20 22:26:35,913 MainThread      DEBUG    rtu_framer     :240      Frame - [b'#a'] not ready
2021-06-20 22:26:36,536 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:36,539 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x23 0x61 0x33 0x4 0x0 0x0
2021-06-20 22:26:36,548 MainThread      DEBUG    rtu_framer     :240      Frame - [b'\x00\nt\x1f'] not ready
2021-06-20 22:26:37,530 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:37,534 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x0 0xa 0x74 0x1f 0x32 0x4
2021-06-20 22:26:37,543 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:37,547 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x0 0x0 0x0 0xa 0x75 0xce
2021-06-20 22:26:37,572 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2'] not ready
2021-06-20 22:26:37,582 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:37,586 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0
2021-06-20 22:26:37,597 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:37,600 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x23
2021-06-20 22:26:37,610 MainThread      DEBUG    rtu_framer     :240      Frame - [b'a'] not ready
2021-06-20 22:26:38,614 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x00'] not ready
2021-06-20 22:26:38,624 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:38,627 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x61 0x32 0x4 0x0 0x0 0x0 0xa 0x75 0xce
2021-06-20 22:26:38,654 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x14\x00'] not ready
2021-06-20 22:26:38,663 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:38,667 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11
2021-06-20 22:26:38,677 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:38,681 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x23 0x61
2021-06-20 22:26:39,695 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x00\x00'] not ready
2021-06-20 22:26:39,704 MainThread      DEBUG    rtu_framer     :234      Not a valid unit id - 50, ignoring!!
2021-06-20 22:26:39,708 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x0 0x0 0x0 0xa 0x75 0xce
2021-06-20 22:26:39,735 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04'] not ready
2021-06-20 22:26:39,744 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:39,748 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0
2021-06-20 22:26:39,758 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:39,762 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11
2021-06-20 22:26:39,772 MainThread      DEBUG    rtu_framer     :240      Frame - [b'#a'] not ready
2021-06-20 22:26:40,538 MainThread      DEBUG    rtu_framer     :240      Frame - [b'3'] not ready
2021-06-20 22:26:40,547 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:40,552 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x23 0x61 0x33 0x4 0x0 0x0 0x0 0xa 0x74 0x1f
2021-06-20 22:26:41,535 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2'] not ready
2021-06-20 22:26:41,543 MainThread      DEBUG    rtu_framer     :234      Not a valid unit id - 50, ignoring!!
2021-06-20 22:26:41,548 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x0 0x0 0x0 0xa 0x75 0xce
2021-06-20 22:26:41,575 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x14'] not ready
2021-06-20 22:26:41,584 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:41,588 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11
2021-06-20 22:26:41,598 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:41,601 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x23
2021-06-20 22:26:41,611 MainThread      DEBUG    rtu_framer     :240      Frame - [b'a'] not ready
2021-06-20 22:26:42,619 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x00'] not ready
2021-06-20 22:26:42,628 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:42,632 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x61 0x32 0x4 0x0 0x0 0x0 0xa 0x75 0xce
2021-06-20 22:26:42,658 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2'] not ready
2021-06-20 22:26:42,667 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:42,671 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0
2021-06-20 22:26:42,682 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:42,685 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x23
2021-06-20 22:26:42,695 MainThread      DEBUG    rtu_framer     :240      Frame - [b'a'] not ready
2021-06-20 22:26:43,703 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2'] not ready
2021-06-20 22:26:43,712 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:43,716 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x61 0x32 0x4 0x0 0x0 0x0 0xa 0x75 0xce
2021-06-20 22:26:43,748 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x14\x00\x11'] not ready
2021-06-20 22:26:43,757 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:43,761 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0
2021-06-20 22:26:43,772 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:43,775 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x23 0x61
2021-06-20 22:26:44,549 MainThread      DEBUG    rtu_framer     :240      Frame - [b'3\x04\x00\x00\x00'] not ready
2021-06-20 22:26:44,558 MainThread      DEBUG    rtu_framer     :185      Getting Frame - 0x4 0x0 0x0 0x0 0xa
2021-06-20 22:26:44,562 MainThread      DEBUG    factory        :137      Factory Request[ReadInputRegistersRequest: 4]
2021-06-20 22:26:44,566 MainThread      DEBUG    rtu_framer     :107      Frame advanced, resetting header!!
2021-06-20 22:26:44,571 MainThread      DEBUG    context        :64       validate: fc-[4] address-1: count-10
2021-06-20 22:26:44,576 MainThread      DEBUG    context        :78       getValues fc-[4] address-1: count-10
2021-06-20 22:26:44,581 MainThread      DEBUG    sync           :144      send: [ReadInputRegistersResponse (10)]- b'3304140011001100110011001100110011001100110011eefd'
2021-06-20 22:26:44,790 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x00'] not ready
2021-06-20 22:26:44,800 MainThread      DEBUG    rtu_framer     :234      Not a valid unit id - 50, ignoring!!
2021-06-20 22:26:44,803 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x0 0x0 0x0 0xa 0x75 0xce
2021-06-20 22:26:44,830 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2'] not ready
2021-06-20 22:26:44,839 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:44,843 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0
2021-06-20 22:26:44,854 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:44,857 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11
2021-06-20 22:26:44,867 MainThread      DEBUG    rtu_framer     :240      Frame - [b'#a'] not ready
2021-06-20 22:26:45,874 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04'] not ready
2021-06-20 22:26:45,884 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:45,887 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x23 0x61 0x32 0x4 0x0 0x0 0x0 0xa 0x75 0xce
2021-06-20 22:26:45,919 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x14\x00'] not ready
2021-06-20 22:26:45,930 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:45,934 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0
2021-06-20 22:26:45,944 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:45,947 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x23 0x61
2021-06-20 22:26:46,961 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x00\x00\x00'] not ready
2021-06-20 22:26:46,970 MainThread      DEBUG    rtu_framer     :234      Not a valid unit id - 50, ignoring!!
2021-06-20 22:26:46,976 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x0 0x0 0x0 0xa 0x75 0xce
2021-06-20 22:26:47,001 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2'] not ready
2021-06-20 22:26:47,011 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:47,015 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0
2021-06-20 22:26:47,026 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:47,029 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x23
2021-06-20 22:26:47,040 MainThread      DEBUG    rtu_framer     :240      Frame - [b'a'] not ready
2021-06-20 22:26:48,043 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2'] not ready
2021-06-20 22:26:48,051 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:48,055 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x61 0x32 0x4 0x0 0x0 0x0 0xa 0x75 0xce
2021-06-20 22:26:48,082 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2'] not ready
2021-06-20 22:26:48,092 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:48,095 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0
2021-06-20 22:26:48,106 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:48,110 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x23
2021-06-20 22:26:48,120 MainThread      DEBUG    rtu_framer     :240      Frame - [b'a'] not ready
2021-06-20 22:26:48,553 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:48,556 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x61 0x33 0x4 0x0 0x0 0x0
2021-06-20 22:26:48,565 MainThread      DEBUG    rtu_framer     :240      Frame - [b'\nt\x1f'] not ready
2021-06-20 22:26:49,550 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:49,553 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0xa 0x74 0x1f 0x32 0x4 0x0 0x0 0x0 0xa
2021-06-20 22:26:49,562 MainThread      DEBUG    rtu_framer     :240      Frame - [b'u\xce'] not ready
2021-06-20 22:26:49,587 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04'] not ready
2021-06-20 22:26:49,596 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:49,600 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x75 0xce 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0
2021-06-20 22:26:49,610 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:49,613 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11
2021-06-20 22:26:49,624 MainThread      DEBUG    rtu_framer     :240      Frame - [b'#a'] not ready
2021-06-20 22:26:50,631 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:50,634 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x23 0x61 0x32 0x4 0x0 0x0
2021-06-20 22:26:50,643 MainThread      DEBUG    rtu_framer     :240      Frame - [b'\x00\nu\xce'] not ready
2021-06-20 22:26:50,674 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:50,678 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x0 0xa 0x75 0xce 0x32 0x4
2021-06-20 22:26:50,689 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:50,693 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0
2021-06-20 22:26:50,703 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:50,706 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x23 0x61
2021-06-20 22:26:51,715 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x00\x00'] not ready
2021-06-20 22:26:51,725 MainThread      DEBUG    rtu_framer     :234      Not a valid unit id - 50, ignoring!!
2021-06-20 22:26:51,728 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x0 0x0 0x0 0xa 0x75 0xce
2021-06-20 22:26:51,755 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x14'] not ready
2021-06-20 22:26:51,765 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:51,768 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0
2021-06-20 22:26:51,779 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:51,783 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x23 0x61
2021-06-20 22:26:52,797 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2'] not ready
2021-06-20 22:26:52,807 MainThread      DEBUG    rtu_framer     :234      Not a valid unit id - 50, ignoring!!
2021-06-20 22:26:52,810 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x0 0x0 0x0 0xa 0x75 0xce
2021-06-20 22:26:52,842 MainThread      DEBUG    rtu_framer     :240      Frame - [b'2\x04\x14\x00'] not ready
2021-06-20 22:26:52,851 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:52,854 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x32 0x4 0x14 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11
2021-06-20 22:26:52,864 MainThread      DEBUG    rtu_framer     :237      Frame check failed, ignoring!!
2021-06-20 22:26:52,867 MainThread      DEBUG    rtu_framer     :120      Resetting frame - Current Frame in buffer - 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x0 0x11 0x23 0x61

Thanks, Ovunc

ovunccetin avatar Jun 20 '21 21:06 ovunccetin

Are both slaves connected on the same port ?

dhoomakethu avatar Jun 28 '21 17:06 dhoomakethu

You can only have one client pr physical connection. When you switch client will sometimes loose part of the traffic.

When both clients keep the same port open, you have problems when sending requests.

janiversen avatar Aug 27 '22 09:08 janiversen