Trying to read Eastron SDM630 - keep getting CRC invalid

820 views
Skip to first unread message

Marleen Vareman

unread,
Apr 30, 2019, 5:15:49 PM4/30/19
to pymodbus
Hi,

I'm trying to use a Raspberry PI as a datalogger for Eastron SDM630 values. I would like to calculate energy production from my solar system, and steer energy consumption accordingly.

Hardware: Raspberry PI 3A+, Modbus RS485 USB 2.0 Adapter with CH340 chip, on USB HUB with keyboard and mouse.

The CRC fails continuously (has not succeeded once).
Even BinaryPayloadBuilder gives a CRC error.

The python program I use:

#!/usr/bin/env python

from pymodbus.constants import Endian
from pymodbus.payload import BinaryPayloadDecoder
from pymodbus.payload import BinaryPayloadBuilder
from pymodbus.client.sync import ModbusSerialClient as ModbusClient

Import logging
logging.basicConfig(filename='mat3.log',level=logging.DEBUG)

#---------------------------------------------------------------------------#
# Connect info KW/H meter
#---------------------------------------------------------------------------#
client = ModbusClient(method='rtu', port='/dev/ttyUSB0', baudrate=9600, timeout=0.5)
client.connect()

builder = BinaryPayloadBuilder(byteorder=Endian.Big, wordorder=Endian.Little)
builder.add_string('abcdefgh')
builder.add_32bit_float(22.34)
builder.add_16bit_uint(0x1234)
builder.add_8bit_int(0x12)
builder.add_bits([0,1,0,1,1,0,1,0])
payload = builder.build()
address = 0x01
result  = client.write_registers(address, payload, skip_encode=True)

# Read data and convert to float 

print "L1\n",
result  = client.read_input_registers(0x00, 2)
decoder = BinaryPayloadDecoder.fromRegisters(result.registers, endian=Endian.Big)
print decoder.decode_32bit_float(), "V \n",

result  = client.read_input_registers(0x06, 2)
decoder = BinaryPayloadDecoder.fromRegisters(result.registers, endian=Endian.Big)
print decoder.decode_32bit_float(), "A \n",

result  = client.read_input_registers(0x0C, 2)
decoder = BinaryPayloadDecoder.fromRegisters(result.registers, endian=Endian.Big)
print decoder.decode_32bit_float(), "W \n",

# More of the same read_input_registers stuff, ….

client.close()


Output from logging is:

DEBUG:pymodbus.transaction:Current transaction state - IDLE
DEBUG:pymodbus.transaction:Running transaction 1
DEBUG:pymodbus.transaction:SEND: 0x0 0x10 0x0 0x1 0x0 0x8 0x10 0x61 0x62 0x63 0x64 0x65 0x66 0x67 0x68 0xb8 0x52 0x41 0xb2 0x12 0x34 0x12 0x5a 0x99 0xc4
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0xdf 0xff 0xfd 0xff 0xef
DEBUG:pymodbus.framer.rtu_framer:CRC invalid, discarding header!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer - 0xdf 0xff 0xfd 0xff 0xef
DEBUG:pymodbus.framer.rtu_framer:Frame check failed, ignoring!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer -
DEBUG:pymodbus.transaction:Getting transaction 0
DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
DEBUG:pymodbus.transaction:Current transaction state - TRANSACTION_COMPLETE
DEBUG:pymodbus.transaction:Running transaction 2
DEBUG:pymodbus.transaction:SEND: 0x0 0x4 0x0 0x0 0x0 0x2 0x70 0x1a
DEBUG:pymodbus.framer.rtu_framer:Changing state to IDLE - Last Frame End - 1556653093.52, Current Time stamp - 1556653093.52
DEBUG:pymodbus.framer.rtu_framer:Waiting for 3.5 char before next send - 4.01 ms
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
WARNING:pymodbus.client.sync:Cleanup recv buffer before send: 0xdf 0x3d 0x3b 0x39 0x37 0x35 0x33 0x31 0x2f 0x8f 0xab 0x6d 0xb6 0x97 0xdb 0x4b 0xcd 0x7
DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0xf7 0xff 0xff 0xff 0xfb
DEBUG:pymodbus.framer.rtu_framer:CRC invalid, discarding header!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer - 0xf7 0xff 0xff 0xff 0xfb
DEBUG:pymodbus.framer.rtu_framer:Frame check failed, ignoring!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer -
DEBUG:pymodbus.transaction:Getting transaction 0
DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'

I read some of the messages on SDM630 in this group and see that people are able to read the SDM630 with a similar configuration, so all hope is not yet lost.

Some of the things I tried, without success:

1) Added extra information for stopbits, bytesize and parity to the client
client = ModbusClient(method='rtu', port='/dev/ttyUSB0', stopbits=1, bytesize=8, timeout=0.5, baudrate=9600, parity='N')

2) Tried other options like 2 stopbits, even parity, odd parity and changed the settings on the SDM630

3) Changed the timeout from 0.25 to 0.5

4) Reversed A and B. I saw a message on this Google group that somebody else solved his CRC error this way. For me it didn't work: debug log is still exactly the same. Modbus is completely new for me, and so is Python, debug output and the hex values that it contains. 
I read the EastronSDM630 Smart Meter Modbus Protocol Implementation manual, but I don't understand much of it.

5) Removed the USB hub and connected the RS485 USB directly on the Raspberry USB port.

Hope somebody can help me?

sanju dhoomakethu

unread,
May 1, 2019, 7:09:41 AM5/1/19
to pymo...@googlegroups.com
Please check for the correct serial configuration on the device and use the same in your code. Also your read requests do not have the unit id supplied and by default it is being sent to address 0x00. Use explicit address with kwarg `unit`. 

result  = client.read_input_registers(0x00, 2, unit=<unit-address>)
 

--
You received this message because you are subscribed to the Google Groups "pymodbus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pymodbus+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marleen Vareman

unread,
May 1, 2019, 2:46:32 PM5/1/19
to pymodbus


On Wednesday, May 1, 2019 at 1:09:41 PM UTC+2, sanju dhoomakethu wrote:
Please check for the correct serial configuration on the device and use the same in your code. Also your read requests do not have the unit id supplied and by default it is being sent to address 0x00. Use explicit address with kwarg `unit`. 

result  = client.read_input_registers(0x00, 2, unit=<unit-address>)


Dear Sanju,

Thank you for the suggestions.
I checked the serial configuration on the SDM630, it is parity N, 1 stopbit, address 001. Documentation says it uses bytesize 8

I am now using those settings in python to connect. I also added the kwarg 'unit' to all read requests.

I still get the CRC error.

Added two termination resistors of 120ohm. See photo's. Is this the correct way to connect the resistors?

20190501_202007.jpg

20190501_201914.jpg


I added some error checking to see which code is giving errors. All read and write request fail with a CRC error.

The program now is:

#!/usr/bin/env python
from pymodbus.constants import Endian
from pymodbus.payload import BinaryPayloadDecoder
from pymodbus.payload import BinaryPayloadBuilder
from pymodbus.client.sync import ModbusSerialClient as ModbusClient
import logging
logging.basicConfig(filename='mat3.log',level=logging.DEBUG)
log = logging.getLogger()
#---------------------------------------------------------------------------#
# Connect info KW/H meter
#---------------------------------------------------------------------------#
SERIAL = '/dev/ttyUSB0'
BAUD = 9600
client = ModbusClient(method='rtu', port=SERIAL, stopbits=1, bytesize=8, timeout=0.5, baudrate=BAUD, parity='N')
client.connect()
builder = BinaryPayloadBuilder(byteorder=Endian.Big, wordorder=Endian.Little)
builder.add_string('abcdefgh')
builder.add_32bit_float(22.34)
builder.add_16bit_uint(0x1234)
builder.add_8bit_int(0x12)
builder.add_bits([0,1,0,1,1,0,1,0])
payload = builder.build()
address = 0x01
result  = client.write_registers(address, payload, skip_encode=True)
if result:
    if result.isError():
        log.warning('This was the result of client.write_registers. Global error is: %s', result)
log.debug ("\n\nL1\n")
result  = client.read_input_registers(0x00, 2, unit=0x01)
if result:
    if result.isError():
        log.warning('This was the result of client.read_input_registers 0x00. Global error is: %s', result)
    else:

        decoder = BinaryPayloadDecoder.fromRegisters(result.registers, endian=Endian.Big)
        print decoder.decode_32bit_float(), "V \n",

result  = client.read_input_registers(0x06, 2, unit=0x01)
if result:
    if result.isError():
        log.warning('This was the result of client.read_input_registers 0x06. Global error is: %s', result)
    else:

        decoder = BinaryPayloadDecoder.fromRegisters(result.registers, endian=Endian.Big)
        print decoder.decode_32bit_float(), "A \n",
result  = client.read_input_registers(0x0C, 2, unit=0x01)
if result:
    if result.isError():
        log.warning('This was the result of client.read_input_registers 0x0C. Global error is: %s', result)
    else:

        decoder = BinaryPayloadDecoder.fromRegisters(result.registers, endian=Endian.Big)
        print decoder.decode_32bit_float(), "W \n",
log.debug ("\n\nL2\n")
result  = client.read_input_registers(0x02, 2, unit=0x01)
if result:
    if result.isError():
        log.warning('This was the result of client.read_input_registers 0x02. Global error is: %s', result)
    else:

        decoder = BinaryPayloadDecoder.fromRegisters(result.registers, endian=Endian.Big)
        print decoder.decode_32bit_float(), "V \n",
result  = client.read_input_registers(0x08, 2, unit=0x01)
if result:
    if result.isError():
        log.warning('This was the result of client.read_input_registers 0x08. Global error is: %s', result)
    else:

        decoder = BinaryPayloadDecoder.fromRegisters(result.registers, endian=Endian.Big)
        print decoder.decode_32bit_float(), "A \n",

result  = client.read_input_registers(0x0E, 2, unit=0x01)
if result:
    if result.isError():
        log.warning('This was the result of client.read_input_registers 0x0E. Global error is: %s', result)
    else:

        decoder = BinaryPayloadDecoder.fromRegisters(result.registers, endian=Endian.Big)
        print decoder.decode_32bit_float(), "W \n",
log.debug ("\n\nL3\n")

result  = client.read_input_registers(0x04, 2, unit=0x01)
if result:
    if result.isError():
        log.warning('This was the result of client.read_input_registers 0x04. Global error is: %s', result)
    else:

        decoder = BinaryPayloadDecoder.fromRegisters(result.registers, endian=Endian.Big)
        print decoder.decode_32bit_float(), "V \n",
result  = client.read_input_registers(0x0A, 2, unit=0x01)
if result:
    if result.isError():
        log.warning('This was the result of client.read_input_registers 0x0A. Global error is: %s', result)
    else:

        decoder = BinaryPayloadDecoder.fromRegisters(result.registers, endian=Endian.Big)
        print decoder.decode_32bit_float(), "A \n",
result  = client.read_input_registers(0x10, 2, unit=0x01)
if result:
    if result.isError():
        log.warning('This was the result of client.read_input_registers 0x0E. Global error is: %s', result)
    else:

        decoder = BinaryPayloadDecoder.fromRegisters(result.registers, endian=Endian.Big)
        print decoder.decode_32bit_float(), "W \n",
#---------------------------------------------------------------------------#
# close the client
#---------------------------------------------------------------------------#
client.close()
 
And the error log:

DEBUG:pymodbus.transaction:Current transaction state - IDLE
DEBUG:pymodbus.transaction:Running transaction 1
DEBUG:pymodbus.transaction:SEND: 0x0 0x10 0x0 0x1 0x0 0x8 0x10 0x61 0x62 0x63 0x64 0x65 0x66 0x67 0x68 0xb8 0x52 0x41 0xb2 0x12 0x34 0x12 0x5a 0x99 0xc4
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0xdf 0xff 0xfd 0xff 0xef
DEBUG:pymodbus.framer.rtu_framer:CRC invalid, discarding header!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer - 0xdf 0xff 0xfd 0xff 0xef
DEBUG:pymodbus.framer.rtu_framer:Frame check failed, ignoring!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer -
DEBUG:pymodbus.transaction:Getting transaction 0
DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
WARNING:root:This was the result of client.write_registers. Global error is: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response
DEBUG:root:
L1
DEBUG:pymodbus.transaction:Current transaction state - TRANSACTION_COMPLETE
DEBUG:pymodbus.transaction:Running transaction 2
DEBUG:pymodbus.transaction:SEND: 0x1 0x4 0x0 0x0 0x0 0x2 0x71 0xcb
DEBUG:pymodbus.framer.rtu_framer:Changing state to IDLE - Last Frame End - 1556734618.25, Current Time stamp - 1556734618.26

DEBUG:pymodbus.framer.rtu_framer:Waiting for 3.5 char before next send - 4.01 ms
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
WARNING:pymodbus.client.sync:Cleanup recv buffer before send: 0xdf 0x3d 0x3b 0x39 0x37 0x35 0x33 0x31 0x2f 0x8f 0xab 0x6d 0xb6 0x97 0xdb 0x4b 0xcd 0x7
DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0x7f 0xdf 0xff 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:CRC invalid, discarding header!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer - 0x7f 0xdf 0xff 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:Frame check failed, ignoring!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer -
DEBUG:pymodbus.transaction:Getting transaction 1

DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
WARNING:root:This was the result of client.read_input_registers 0x00. Global error is: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response

DEBUG:pymodbus.transaction:Current transaction state - TRANSACTION_COMPLETE
DEBUG:pymodbus.transaction:Running transaction 3
DEBUG:pymodbus.transaction:SEND: 0x1 0x4 0x0 0x6 0x0 0x2 0x91 0xca
DEBUG:pymodbus.framer.rtu_framer:Changing state to IDLE - Last Frame End - 1556734618.27, Current Time stamp - 1556734618.28

DEBUG:pymodbus.framer.rtu_framer:Waiting for 3.5 char before next send - 4.01 ms
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
WARNING:pymodbus.client.sync:Cleanup recv buffer before send: 0x1d 0x69

DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0x7f 0xdf 0xf3 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:CRC invalid, discarding header!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer - 0x7f 0xdf 0xf3 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:Frame check failed, ignoring!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer -
DEBUG:pymodbus.transaction:Getting transaction 1

DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
WARNING:root:This was the result of client.read_input_registers 0x06. Global error is: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response

DEBUG:pymodbus.transaction:Current transaction state - TRANSACTION_COMPLETE
DEBUG:pymodbus.transaction:Running transaction 4
DEBUG:pymodbus.transaction:SEND: 0x1 0x4 0x0 0xc 0x0 0x2 0xb1 0xc8
DEBUG:pymodbus.framer.rtu_framer:Changing state to IDLE - Last Frame End - 1556734618.29, Current Time stamp - 1556734618.3

DEBUG:pymodbus.framer.rtu_framer:Waiting for 3.5 char before next send - 4.01 ms
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
WARNING:pymodbus.client.sync:Cleanup recv buffer before send: 0xdd 0xd

DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0x7f 0xdf 0xe7 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:CRC invalid, discarding header!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer - 0x7f 0xdf 0xe7 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:Frame check failed, ignoring!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer -
DEBUG:pymodbus.transaction:Getting transaction 1

DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
WARNING:root:This was the result of client.read_input_registers 0x0C. Global error is: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response
DEBUG:root:
L2
DEBUG:pymodbus.transaction:Current transaction state - TRANSACTION_COMPLETE
DEBUG:pymodbus.transaction:Running transaction 5
DEBUG:pymodbus.transaction:SEND: 0x1 0x4 0x0 0x2 0x0 0x2 0xd0 0xb
DEBUG:pymodbus.framer.rtu_framer:Changing state to IDLE - Last Frame End - 1556734618.31, Current Time stamp - 1556734618.31

DEBUG:pymodbus.framer.rtu_framer:Waiting for 3.5 char before next send - 4.01 ms
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
WARNING:pymodbus.client.sync:Cleanup recv buffer before send: 0x9d 0x3

DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0x7f 0xdf 0xfb 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:CRC invalid, discarding header!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer - 0x7f 0xdf 0xfb 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:Frame check failed, ignoring!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer -
DEBUG:pymodbus.transaction:Getting transaction 1

DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
WARNING:root:This was the result of client.read_input_registers 0x02. Global error is: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response

DEBUG:pymodbus.transaction:Current transaction state - TRANSACTION_COMPLETE
DEBUG:pymodbus.transaction:Running transaction 6
DEBUG:pymodbus.transaction:SEND: 0x1 0x4 0x0 0x8 0x0 0x2 0xf0 0x9
DEBUG:pymodbus.framer.rtu_framer:Changing state to IDLE - Last Frame End - 1556734618.33, Current Time stamp - 1556734618.33

DEBUG:pymodbus.framer.rtu_framer:Waiting for 3.5 char before next send - 4.01 ms
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
WARNING:pymodbus.client.sync:Cleanup recv buffer before send: 0x5f 0x7a

DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0x7f 0xdf 0xef 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:CRC invalid, discarding header!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer - 0x7f 0xdf 0xef 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:Frame check failed, ignoring!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer -
DEBUG:pymodbus.transaction:Getting transaction 1

DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
WARNING:root:This was the result of client.read_input_registers 0x08. Global error is: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response

DEBUG:pymodbus.transaction:Current transaction state - TRANSACTION_COMPLETE
DEBUG:pymodbus.transaction:Running transaction 7
DEBUG:pymodbus.transaction:SEND: 0x1 0x4 0x0 0xe 0x0 0x2 0x10 0x8
DEBUG:pymodbus.framer.rtu_framer:Changing state to IDLE - Last Frame End - 1556734618.35, Current Time stamp - 1556734618.35

DEBUG:pymodbus.framer.rtu_framer:Waiting for 3.5 char before next send - 4.01 ms
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
WARNING:pymodbus.client.sync:Cleanup recv buffer before send: 0x1f 0x7b

DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0x7f 0xdf 0xe3 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:CRC invalid, discarding header!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer - 0x7f 0xdf 0xe3 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:Frame check failed, ignoring!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer -
DEBUG:pymodbus.transaction:Getting transaction 1

DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
WARNING:root:This was the result of client.read_input_registers 0x0E. Global error is: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response
DEBUG:root:
L3
DEBUG:pymodbus.transaction:Current transaction state - TRANSACTION_COMPLETE
DEBUG:pymodbus.transaction:Running transaction 8
DEBUG:pymodbus.transaction:SEND: 0x1 0x4 0x0 0x4 0x0 0x2 0x30 0xa
DEBUG:pymodbus.framer.rtu_framer:Changing state to IDLE - Last Frame End - 1556734618.37, Current Time stamp - 1556734618.37

DEBUG:pymodbus.framer.rtu_framer:Waiting for 3.5 char before next send - 4.01 ms
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
WARNING:pymodbus.client.sync:Cleanup recv buffer before send: 0xdf 0xef 0x0

DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0x7f 0xdf 0xf7 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:CRC invalid, discarding header!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer - 0x7f 0xdf 0xf7 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:Frame check failed, ignoring!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer -
DEBUG:pymodbus.transaction:Getting transaction 1

DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
WARNING:root:This was the result of client.read_input_registers 0x04. Global error is: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response

DEBUG:pymodbus.transaction:Current transaction state - TRANSACTION_COMPLETE
DEBUG:pymodbus.transaction:Running transaction 9
DEBUG:pymodbus.transaction:SEND: 0x1 0x4 0x0 0xa 0x0 0x2 0x51 0xc9
DEBUG:pymodbus.framer.rtu_framer:Changing state to IDLE - Last Frame End - 1556734618.39, Current Time stamp - 1556734618.39

DEBUG:pymodbus.framer.rtu_framer:Waiting for 3.5 char before next send - 4.01 ms
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
WARNING:pymodbus.client.sync:Cleanup recv buffer before send: 0x9f 0xeb 0x0

DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0x7f 0xdf 0xeb 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:CRC invalid, discarding header!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer - 0x7f 0xdf 0xeb 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:Frame check failed, ignoring!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer -
DEBUG:pymodbus.transaction:Getting transaction 1

DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
WARNING:root:This was the result of client.read_input_registers 0x0A. Global error is: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response

DEBUG:pymodbus.transaction:Current transaction state - TRANSACTION_COMPLETE
DEBUG:pymodbus.transaction:Running transaction 10
DEBUG:pymodbus.transaction:SEND: 0x1 0x4 0x0 0x10 0x0 0x2 0x70 0xe
DEBUG:pymodbus.framer.rtu_framer:Changing state to IDLE - Last Frame End - 1556734618.41, Current Time stamp - 1556734618.41

DEBUG:pymodbus.framer.rtu_framer:Waiting for 3.5 char before next send - 4.01 ms
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
WARNING:pymodbus.client.sync:Cleanup recv buffer before send: 0x5d 0x6d

DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0x7f 0xdf 0xdf 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:CRC invalid, discarding header!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer - 0x7f 0xdf 0xdf 0xff 0xfb

DEBUG:pymodbus.framer.rtu_framer:Frame check failed, ignoring!!
DEBUG:pymodbus.framer.rtu_framer:Resetting frame - Current Frame in buffer -
DEBUG:pymodbus.transaction:Getting transaction 1

DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
WARNING:root:This was the result of client.read_input_registers 0x0E. Global error is: Modbus Error: [Input/Output] No Response received from the remote unit/Unable to decode response


sanju dhoomakethu

unread,
May 1, 2019, 8:55:35 PM5/1/19
to pymo...@googlegroups.com
Please check with an another USB-RS485 adapter, sometimes there could be issues with the adapter itself. Otherwise, you should be seeing the communication up and running by now if all the serial settings are correct and you have connected the terminals correctly. Btw, what version of pymodbus are you using?

ಗುರು, ಮೇ 2, 2019 00:16 ದಿನಾಂಕದಂದು Marleen Vareman <mvar...@gmail.com> ಅವರು ಬರೆದಿದ್ದಾರೆ:

Marleen Vareman

unread,
May 2, 2019, 1:41:19 AM5/2/19
to pymodbus
OK, will try to get a new adapter.

Versions are:
Pymodbus-2.2.0
Pyserial-3.4
Six--1.10.0

Marleen Vareman

unread,
Jun 10, 2019, 9:12:33 AM6/10/19
to pymodbus
Adapter was not OK, with a new one it works. Thanks for all the support!
Reply all
Reply to author
Forward
0 new messages