Has anyone used USR-TCP232-306?

10 views
Skip to first unread message

Tom Roberts

unread,
Jan 2, 2024, 12:50:12 PMJan 2
to pymodbus
This is an ethernet to RS485 interface. I cannot get it to work. It is a RS485 client. When I send a transaction, its RX light blinks but its TX light does not (!). The transaction gets no response. When connected to a separate USB-to-RS485 interface the same code works (after changing ModbusTcpClient to ModbusSerialClient with correct values).

    client = pymodbus.client.ModbusTcpClient(192.168.149.10, port=502)
    client.connect()
    response = client.read_holding_Registers(0,1,slave=10)

2024-01-02 11:12:46,438 DEBUG logging:103 Connection to Modbus server established. Socket ('192.168.149.1', 65395)
read_holding_registers(0, 1, slave=10).  # my code printed this
2024-01-02 11:12:46,438 DEBUG logging:103 Current transaction state - IDLE
2024-01-02 11:12:46,438 DEBUG logging:103 Running transaction 1
2024-01-02 11:12:46,438 DEBUG logging:103 SEND: 0x0 0x1 0x0 0x0 0x0 0x6 0xa 0x3 0x0 0x0 0x0 0x1
2024-01-02 11:12:46,438 DEBUG logging:103 New Transaction state "SENDING"
2024-01-02 11:12:46,438 DEBUG logging:103 Changing transaction state from "SENDING" to "WAITING FOR REPLY"
2024-01-02 11:12:49,439 DEBUG logging:103 Transaction failed. (Modbus Error: [Invalid Message] No response received, expected at least 8 bytes (0 received))
2024-01-02 11:12:49,439 DEBUG logging:103 Processing:
2024-01-02 11:12:49,439 DEBUG logging:103 Getting transaction 1
2024-01-02 11:12:49,439 DEBUG logging:103 Changing transaction state from "PROCESSING REPLY" to "TRANSACTION_COMPLETE"

Reply all
Reply to author
Forward
0 new messages