Databeredning i Goteborg
I have a RS485 network with a number of slaves, now I want to add a OpenPLC unit.
The hardware is a Controllino Maxi, that has a RS485 port on it.
On the compile/download I can select baud, but nothing else.
Can I change the source so that it sets the serial port to even parity?
Databits is 8 and stopbits are 1, baud is 9600.
How does OpenPLC determine which serial port it should use for Modbus??
As the Controllino is a Mega2560 based unit it has several ports, the RS485 is from what I remember Serial1 in the Arduino world.
Reply 0 0
thiagoralves
From the drop-down menu in front of “Interface” you can select which serial port you want. As for parity, you will have to change the source code
Reply 0 0
Databeredning i Goteborg
Ok, will give it a try
could you point me to wich source file sets the serial port parameters?
Reply 0 0
thiagoralves
 
You will find this file on your own installation of the OpenPLC Editor, at the same folder hierarchy.
 
You probably will only have to change a line or two in the function:
void mbconfig_serial_iface(HardwareSerial* port, long baud, int txPin)
Reply 0 0
Reply