LS PLC Modbus Communications Setup

LS PLC Modbus Communications Setup

This article is a supplement to the the full LS PLC manual for a given series. Please refer to the full PLC manual for any questions outside of the scope of this article. Additionally, a more detailed quick guide is attached to this article.

 

The example introduced in chapter 11.3 of the full PLC manual is an example of setting 2 PLCs as Modbus Client and Modbus Server, respectively.

In this example, XG5000 software is utilized to setup a VFD as a modbus RTU server.  Setup of the Read area and Save Area respectively in the P2P Block setting are shown below.


First verify that the connection settings match the network you intend to communicate on. Baud rate, data bits, stop bit, and parity should match the device you intend to connect to. Additionally, ensure "Use P2P" is selected. 

 



Set the P2P Channel to use the Modbus RTU client driver. 


Setup the P2P block(s) for the read and write areas. The VFD manufacturers manual may be needed to determine the modbus map addresses. Determine what you need to read and write, and enter the addresses like the below. In this example, we are writing the value D0000 in our program to address 4(hex) on station #1 (node address). Additionally, we are reading register address B(hex) into the PLC register D0101.


Below you can see the online monitoring screen of the ladder logic. 45Hz and a FWD run command is being written to the VFD. DC bus voltage is being read back. 


Lastly, you can watch the following Cnet videos on the LS Electric YouTube page. 

CNet Introduction 

CNet Modbus Example