pymodbus on BeagleBone Black (debian) - Serial interface (RS485) #1950
Replies: 2 comments 2 replies
-
Your slave software is not responding, or you have wired rs485 wrong. A lot of possible problem, but seen from pymodbus there are no response |
Beta Was this translation helpful? Give feedback.
0 replies
-
It looks more like you have to look at pyserial, pymodbus do not handle the physical connection, but uses pyserial. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there,
Has anybody tried the rs485 communication on beaglebone black. I have modified the pymodbus/example/simple_async_client.py to test the serial communication, but I am having issue with the communication.
Slave/server: I am running pyModSlave.exe a modbus slave gui program (on windows) configured to run rtu with rs485-usb
Master/client: I have modified pymodbus/example/simple_async_client.py to run as serial communication (dev/ttyS4, baudrate on both side is same 19200)
Issue: I am not getting the response back, it is because my rs485 interface is not up.
I have tried to setup the uart4 in beaglebone for rs485, I did this:
sudo config-pin p9.11 uart #UART4 /dev/ttyS4 connect to rs485 RX
sudo config-pin p9.13 uart #UART4 /dev/ttyS4 connect to rs485 TX
but when I run the client, I got:
debian@beaglebone:~/projects$ python pymodbus/examples/simple_async_client.py
get client
connect to server
2024-01-22 21:43:01,611 DEBUG logging:103 Connecting to /dev/ttyS4.
2024-01-22 21:43:01,614 DEBUG logging:103 Connecting comm
2024-01-22 21:43:01,641 DEBUG logging:103 Connected to comm
2024-01-22 21:43:01,644 DEBUG logging:103 callback_connected called
get and verify data
2024-01-22 21:43:01,649 DEBUG logging:103 send: 0x1 0x1 0x0 0x1 0x0 0x1 0xac 0xa
2024-01-22 21:43:01,657 DEBUG logging:103 Adding transaction 1
2024-01-22 21:43:04,671 DEBUG logging:103 send: 0x1 0x1 0x0 0x1 0x0 0x1 0xac 0xa
2024-01-22 21:43:04,676 DEBUG logging:103 Adding transaction 1
2024-01-22 21:43:07,690 DEBUG logging:103 send: 0x1 0x1 0x0 0x1 0x0 0x1 0xac 0xa
2024-01-22 21:43:07,695 DEBUG logging:103 Adding transaction 1
2024-01-22 21:43:10,709 DEBUG logging:103 send: 0x1 0x1 0x0 0x1 0x0 0x1 0xac 0xa
2024-01-22 21:43:10,713 DEBUG logging:103 Adding transaction 1
2024-01-22 21:43:13,727 DEBUG logging:103 Connection lost comm due to Server not responding
2024-01-22 21:43:13,734 DEBUG logging:103 Getting transaction 1
Received ModbusException(Modbus Error: [Input/Output] ERROR: No response received after 3 retries) from library
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions