Modbus RTU is available as standard on most leading brands of VSD’s. A recent project completed by AIEglobal used over 20 VSD’s connected to multiple Beckhoff CX2020 PLC’s, with a majority of the drives being speed controlled via PLC PID’s.
The best approach to achieve optimum performance is to split the Modbus PLC software into two parts – a driver part which interfaces to the hardware (EL6021), and a high level part that provides the required control interface. The code in the driver part is kept to a minimum as it will be executed every 5msec or less, whilst the control interface will be executed at a rate dependent on the Modbus cycle time and PID response requirements, usually about every 50 to 200msec. Using this approach the time between send/receive packet pairs as indicated by “minimize” in the following diagram will be a maximum of 5msec or less.
MBrtu
The driver and higher level control FD’s are shown below, with communication between them done via two data structures Px01_mbC and Px01_mbS.
Modbus_05
Multiple VSD’s on one hardware link are handled by multiple instances of the ModbusACH550_T2 FB with the Modbus RTU device sequencing controlled by the PacketNumIn and PacketNumOut variables.

To receive a code example please submit the following form