You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the Modbus RTU protocol from libmodbus 3.1.10 on VxWorks 7.
I need to set the RTS signal on an RS485/RS422 serial device in order to send and receive RTU data.
Unfortunately, the approach provided by the library does not allow for effective control of the RTS signal. After monitoring the RTS signal of the serial port with an oscilloscope, I can confirm that the RTS signal does not change when using flags in the function _modbus_rtu_ioctl_rts. The only way I have observed the RTS value changing is by directly writing to the hardware register of the desired port via a sysOutByte operation.
Could you provide an implementation to handle the RTS signal when using an RS485 device with Modbus RTU without sysOutByte operation?
Request for a single function capable of managing RS422/RS485/RS232 transmission, and removing of echoed transmitted bytes in RS485 as described in this issue
I would like to ask if it is possible to refactor static ssize_tmodbus_rtu_send(modbus_t* ctx, const uint8* req, int req_length) in order to handle data transmission in RS485 and RS232/RS422.
Now, _modbus_rtu_send is not complete because it is designed for RS232 transmission only. To support RS485 transmission, I need to modify this method based on a previous patch found here.
Furthermore, I have fixed the handling of RTS enabling/disabling around the write operation to successfully transmit in both RS232/RS422 and RS485.
It would be great if you could integrate the patch from the link and provide a single function for sending RTU data in RS232/RS485/RS422.
Thank you in advance!
Actual behavior if applicable
I need to set the RTS signal on an RS485 serial device in order to send and receive RTU data.
I need to set the RTS signal on an RS485 serial device in order to send and receive RTU data.
RTS must be enabled every time the master needs to transmit data. Once the master has transmitted, RTS must be disabled to receive the response from the slave.
It would be great a unique function for transmitting data in RS232/RS422/RS485.
For managing communication in RS485 is necessary the modify proposed here
Steps to reproduce the behavior (commands or source code)
I need to set the RTS signal on an RS485 serial device in order to send and receive RTU data.
I need to set the RTS signal on an RS485 serial device in order to send and receive RTU data.
In this case the ioctl function return -1 and the errno is ENOTSUP.
The text was updated successfully, but these errors were encountered:
Francy3
changed the title
Request for RTS signal management in Modbus RTU on VxWorks 7 using RS485 device
Request for RTS signal management in Modbus RTU on VxWorks 7 using RS485/Rs422 device and for a patch for _modbus_rtu_send
Jan 9, 2025
libmodbus version
3.1.10
OS and/or distribution
VxWorks 7
Environment
processor 6600HLE; Intel 32-bit
Description
Hello @stephane !
I am using the Modbus RTU protocol from libmodbus 3.1.10 on VxWorks 7.
Unfortunately, the approach provided by the library does not allow for effective control of the RTS signal. After monitoring the RTS signal of the serial port with an oscilloscope, I can confirm that the RTS signal does not change when using flags in the function _modbus_rtu_ioctl_rts. The only way I have observed the RTS value changing is by directly writing to the hardware register of the desired port via a sysOutByte operation.
Could you provide an implementation to handle the RTS signal when using an RS485 device with Modbus RTU without sysOutByte operation?
I would like to ask if it is possible to refactor static ssize_t modbus_rtu_send(modbus_t* ctx, const uint8* req, int req_length) in order to handle data transmission in RS485 and RS232/RS422.
Now, _modbus_rtu_send is not complete because it is designed for RS232 transmission only. To support RS485 transmission, I need to modify this method based on a previous patch found here.
Furthermore, I have fixed the handling of RTS enabling/disabling around the write operation to successfully transmit in both RS232/RS422 and RS485.
It would be great if you could integrate the patch from the link and provide a single function for sending RTU data in RS232/RS485/RS422.
Thank you in advance!
Actual behavior if applicable
Expected behavior or suggestion
I need to set the RTS signal on an RS485 serial device in order to send and receive RTU data.
RTS must be enabled every time the master needs to transmit data. Once the master has transmitted, RTS must be disabled to receive the response from the slave.
It would be great a unique function for transmitting data in RS232/RS422/RS485.
For managing communication in RS485 is necessary the modify proposed here
Steps to reproduce the behavior (commands or source code)
libmodbus output with debug mode enabled
In this case the ioctl function return -1 and the errno is ENOTSUP.
The text was updated successfully, but these errors were encountered: