Hello I have an arduino uno and an HMI WeinView and I am strugling to make them communicate without succes.
For the beggining I just want to read a value from the arduino and view it in the HMI.
In Arduino I wrote this code which is working fine with the Modbus Poll software which communicates by rs232 adapter through a max232 circuit .
/**
- Modbus slave example 1:
- The purpose of this example is to link a data array
- from the Arduino to an external device.
- Recommended Modbus Master: QModbus
-
http://qmodbus.sourceforge.net/
*/
#include <ModbusRtu.h>
// data array for modbus network sharing
uint16_t au16data[16] = {
3, 1415, 9265, 4, 2, 7182, 28182, 8, 0, 0, 0, 0, 0, 0, 1, -1 };
/**
- Modbus object declaration
- u8id : node id = 0 for master, = 1..247 for slave
- u8serno : serial port (use 0 for Serial)
- u8txenpin : 0 for RS-232 and USB-FTDI
- or any pin number > 1 for RS-485
*/
Modbus slave(1,0,0); // this is slave @1 and RS-232 or USB-FTDI
void setup() {
slave.begin( 19200 ); // baud-rate at 19200
}
void loop() {
slave.poll( au16data, 16 );
}
When I connect the circuit to HMI, I have "PLC no response" and Tx Rx not functioning.
- Is it enough to connect the max 232 to the TxD and RxD or also there is neded for RTS and CTS?
- What type of Modbus should be selected in HMI?
Thank you


